commit e4c8ba6c0589f1ba0ba9993c4f1e9c0821d3ca6c (HEAD, refs/remotes/origin/master) Merge: df620591e8c 09bf4768360 Author: Stefan Monnier Date: Wed May 10 11:18:43 2023 -0400 Merge branch 'emacs-29' commit 09bf4768360dd5b8928f90b0b1437f3f5ee43c41 (refs/remotes/origin/emacs-29) Author: Alan Mackenzie Date: Fri Apr 14 10:33:03 2023 +0000 Make c-emacs-features use the proper binding of parse-sexp-lookup-properties This is relevant for bug #58558, although it does not fix it. Due to a wrong ordering of with-current-buffer and a let form, the function overwrote the global value of parse-sexp-lookup-properties and two other variables. * lisp/progmodes/cc-defs.el (c-emacs-features): Change the nesting of with-current-buffer and let so that the let bindings get used. diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index aa6f33e9cab..1d98b215525 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el @@ -2153,86 +2153,79 @@ c-emacs-features ;; Record whether the `category' text property works. (if c-use-category (setq list (cons 'category-properties list))) - (let ((buf (generate-new-buffer " test")) - parse-sexp-lookup-properties - parse-sexp-ignore-comments - lookup-syntax-properties) ; XEmacs + (let ((buf (generate-new-buffer " test"))) (with-current-buffer buf - (set-syntax-table (make-syntax-table)) - - ;; For some reason we have to set some of these after the - ;; buffer has been made current. (Specifically, - ;; `parse-sexp-ignore-comments' in Emacs 21.) - (setq parse-sexp-lookup-properties t - parse-sexp-ignore-comments t - lookup-syntax-properties t) - - ;; Find out if the `syntax-table' text property works. - (modify-syntax-entry ?< ".") - (modify-syntax-entry ?> ".") - (insert "<()>") - (c-mark-<-as-paren (point-min)) - (c-mark->-as-paren (+ 3 (point-min))) - (goto-char (point-min)) - (c-forward-sexp) - (if (= (point) (+ 4 (point-min))) - (setq list (cons 'syntax-properties list)) - (error (concat - "CC Mode is incompatible with this version of Emacs - " - "support for the `syntax-table' text property " - "is required."))) - - ;; Find out if "\\s!" (generic comment delimiters) work. - (c-safe - (modify-syntax-entry ?x "!") - (if (string-match "\\s!" "x") - (setq list (cons 'gen-comment-delim list)))) - - ;; Find out if "\\s|" (generic string delimiters) work. - (c-safe - (modify-syntax-entry ?x "|") - (if (string-match "\\s|" "x") - (setq list (cons 'gen-string-delim list)))) - - ;; See if POSIX char classes work. - (when (and (string-match "[[:alpha:]]" "a") - ;; All versions of Emacs 21 so far haven't fixed - ;; char classes in `skip-chars-forward' and - ;; `skip-chars-backward'. - (progn - (delete-region (point-min) (point-max)) - (insert "foo123") - (skip-chars-backward "[:alnum:]") - (bobp)) - (= (skip-chars-forward "[:alpha:]") 3)) - (setq list (cons 'posix-char-classes list))) - - ;; See if `open-paren-in-column-0-is-defun-start' exists and - ;; isn't buggy (Emacs >= 21.4). - (when (boundp 'open-paren-in-column-0-is-defun-start) - (let ((open-paren-in-column-0-is-defun-start nil) - (parse-sexp-ignore-comments t)) - (delete-region (point-min) (point-max)) - (set-syntax-table (make-syntax-table)) - (modify-syntax-entry ?\' "\"") - (cond - ;; XEmacs. Afaik this is currently an Emacs-only - ;; feature, but it's good to be prepared. - ((memq '8-bit list) - (modify-syntax-entry ?/ ". 1456") - (modify-syntax-entry ?* ". 23")) - ;; Emacs - ((memq '1-bit list) - (modify-syntax-entry ?/ ". 124b") - (modify-syntax-entry ?* ". 23"))) - (modify-syntax-entry ?\n "> b") - (insert "/* '\n () */") - (backward-sexp) - (if (bobp) - (setq list (cons 'col-0-paren list))))) - - (set-buffer-modified-p nil)) - (kill-buffer buf)) + (let ((parse-sexp-lookup-properties t) + (parse-sexp-ignore-comments t) + (lookup-syntax-properties t)) + (set-syntax-table (make-syntax-table)) + + ;; Find out if the `syntax-table' text property works. + (modify-syntax-entry ?< ".") + (modify-syntax-entry ?> ".") + (insert "<()>") + (c-mark-<-as-paren (point-min)) + (c-mark->-as-paren (+ 3 (point-min))) + (goto-char (point-min)) + (c-forward-sexp) + (if (= (point) (+ 4 (point-min))) + (setq list (cons 'syntax-properties list)) + (error (concat + "CC Mode is incompatible with this version of Emacs - " + "support for the `syntax-table' text property " + "is required."))) + + ;; Find out if "\\s!" (generic comment delimiters) work. + (c-safe + (modify-syntax-entry ?x "!") + (if (string-match "\\s!" "x") + (setq list (cons 'gen-comment-delim list)))) + + ;; Find out if "\\s|" (generic string delimiters) work. + (c-safe + (modify-syntax-entry ?x "|") + (if (string-match "\\s|" "x") + (setq list (cons 'gen-string-delim list)))) + + ;; See if POSIX char classes work. + (when (and (string-match "[[:alpha:]]" "a") + ;; All versions of Emacs 21 so far haven't fixed + ;; char classes in `skip-chars-forward' and + ;; `skip-chars-backward'. + (progn + (delete-region (point-min) (point-max)) + (insert "foo123") + (skip-chars-backward "[:alnum:]") + (bobp)) + (= (skip-chars-forward "[:alpha:]") 3)) + (setq list (cons 'posix-char-classes list))) + + ;; See if `open-paren-in-column-0-is-defun-start' exists and + ;; isn't buggy (Emacs >= 21.4). + (when (boundp 'open-paren-in-column-0-is-defun-start) + (let ((open-paren-in-column-0-is-defun-start nil) + (parse-sexp-ignore-comments t)) + (delete-region (point-min) (point-max)) + (set-syntax-table (make-syntax-table)) + (modify-syntax-entry ?\' "\"") + (cond + ;; XEmacs. Afaik this is currently an Emacs-only + ;; feature, but it's good to be prepared. + ((memq '8-bit list) + (modify-syntax-entry ?/ ". 1456") + (modify-syntax-entry ?* ". 23")) + ;; Emacs + ((memq '1-bit list) + (modify-syntax-entry ?/ ". 124b") + (modify-syntax-entry ?* ". 23"))) + (modify-syntax-entry ?\n "> b") + (insert "/* '\n () */") + (backward-sexp) + (if (bobp) + (setq list (cons 'col-0-paren list))))) + + (set-buffer-modified-p nil)) + (kill-buffer buf))) ;; Check how many elements `parse-partial-sexp' returns. (let ((ppss-size (or (c-safe (length commit c9e2a5ec26c52df40eda415c78046d38c4171d2b Author: Eli Zaretskii Date: Wed May 10 16:51:17 2023 +0300 ; * lisp/obsolete/autoload.el (make-directory-autoloads): Doc fix. diff --git a/lisp/obsolete/autoload.el b/lisp/obsolete/autoload.el index fae5db0fd52..ecf931d0881 100644 --- a/lisp/obsolete/autoload.el +++ b/lisp/obsolete/autoload.el @@ -723,7 +723,7 @@ update-directory-autoloads ;;;###autoload (defun make-directory-autoloads (dir output-file) - "Update autoload definitions for Lisp files in the directories DIRS. + "Update autoload definitions for Lisp files in the directories DIR. DIR can be either a single directory or a list of directories. (The latter usage is discouraged.) commit 346f4ac3bf5068df1ad69784e02ad5e4607ec2ff Author: Eli Zaretskii Date: Wed May 10 16:47:14 2023 +0300 ; Fix example in ELisp manual * doc/lispref/minibuf.texi (Yes-or-No Queries): Fix example. (Bug#63399) diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index 114e5d38a80..a4916ecda30 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -2245,7 +2245,7 @@ Yes-or-No Queries @smallexample @group -(yes-or-no-p "Do you really want to remove everything?") +(yes-or-no-p "Do you really want to remove everything? ") ;; @r{After evaluation of the preceding expression,} ;; @r{the following prompt appears,} commit 91fff05ae3544f2a825c7c387878862a8e661be6 Author: Eli Zaretskii Date: Wed May 10 16:36:14 2023 +0300 ; Fix wording in Emacs manual * doc/emacs/search.texi (Replacement and Lax Matches): Fix wording. (Bug#63398) diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index a5048093869..fb79fe8f3fc 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -1653,9 +1653,9 @@ Replacement and Lax Matches @code{nil}, case is always significant in all searches. @vindex case-replace - In addition, when the @var{newstring} argument is all or partly lower -case, replacement commands try to preserve the case pattern of each -occurrence. Thus, the command + In addition, when the second argument of a replace command is all or +partly lower case, replacement commands try to preserve the case +pattern of each occurrence. Thus, the command @example M-x replace-string @key{RET} foo @key{RET} bar @key{RET} commit 2438fa2e6cc6b747206b10da2b0fd2b431df70eb Author: Eli Zaretskii Date: Wed May 10 16:01:28 2023 +0300 ; Fix minor documentation issue ion replace.el * lisp/replace.el (query-replace, query-replace-regexp): Doc fix. (Bug#63397) diff --git a/lisp/replace.el b/lisp/replace.el index 3c2b925ea92..1555731f6e3 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -436,6 +436,8 @@ query-replace Arguments FROM-STRING, TO-STRING, DELIMITED, START, END, BACKWARD, and REGION-NONCONTIGUOUS-P are passed to `perform-replace' (which see). +\(TO-STRING is passed to `perform-replace' as REPLACEMENTS and +DELIMITED is passed as DELIMITED-FLAG.) To customize possible responses, change the bindings in `query-replace-map'." (declare (interactive-args @@ -533,7 +535,10 @@ query-replace-regexp Use \\[repeat-complex-command] after this command for details. Arguments REGEXP, TO-STRING, DELIMITED, START, END, BACKWARD, and -REGION-NONCONTIGUOUS-P are passed to `perform-replace' (which see)." +REGION-NONCONTIGUOUS-P are passed to `perform-replace' (which see). +\(REGEXP is passed to `perform-replace' as FROM-STRING, +TO-STRING is passed as REPLACEMENTS, and DELIMITED is passed +as DELIMITED-FLAG.)" (declare (interactive-args (start (use-region-beginning)) (end (use-region-end)) commit df620591e8cd5d2733659e9c43e97779b0cb8ec5 Author: Mattias Engdegård Date: Wed May 10 14:36:32 2023 +0200 Clean up files created by arc-mode-tests * test/lisp/arc-mode-tests.el (arc-mode-test-zip-ensure-ext): Remove created files at the end of the test. diff --git a/test/lisp/arc-mode-tests.el b/test/lisp/arc-mode-tests.el index b6e06a563fe..c42fd8d432c 100644 --- a/test/lisp/arc-mode-tests.el +++ b/test/lisp/arc-mode-tests.el @@ -50,17 +50,20 @@ arc-mode-test-zip-ensure-ext "Regression test for bug#61326." (skip-unless (executable-find "zip")) (let* ((default-directory arc-mode-tests-data-directory) + (created-files nil) (base-zip-1 "base-1.zip") (base-zip-2 "base-2.zip") (content-1 '("1" "2")) (content-2 '("3" "4")) (make-file (lambda (name) + (push name created-files) (with-temp-buffer (insert name) (write-file name)))) (make-zip (lambda (zip files) (delete-file zip nil) + (push zip created-files) (funcall (archive--act-files '("zip") files) zip))) (update-fn (lambda (zip-nonempty) @@ -92,26 +95,35 @@ arc-mode-test-zip-ensure-ext (lambda (zip mod-fn) (let ((zip-base (concat zip ".zip")) (tag (gensym))) + (push zip created-files) (copy-file base-zip-1 zip t) + (push zip-base created-files) (copy-file base-zip-2 zip-base t) (file-has-changed-p zip tag) (file-has-changed-p zip-base tag) (funcall mod-fn zip) (should-not (file-has-changed-p zip-base tag)) (should (file-has-changed-p zip tag)))))) - ;; setup: make two zip files with different contents - (mapc make-file (append content-1 content-2)) - (mapc (lambda (args) (apply make-zip args)) - (list (list base-zip-1 content-1) - (list base-zip-2 content-2))) - ;; test 1: with "test-update" and "test-update.zip", update - ;; "test-update": (1) ensure only "test-update" is modified, (2) - ;; ensure the contents of the new member is expected. - (funcall test-modify "test-update" update-fn) - ;; test 2: with "test-delete" and "test-delete.zip", delete entry - ;; from "test-delete": (1) ensure only "test-delete" is modified, - ;; (2) ensure the file list is reduced as expected. - (funcall test-modify "test-delete" delete-fn))) + (unwind-protect + (progn + ;; setup: make two zip files with different contents + (mapc make-file (append content-1 content-2)) + (funcall make-zip base-zip-1 content-1) + (funcall make-zip base-zip-2 content-2) + + ;; test 1: with "test-update" and "test-update.zip", update + ;; "test-update": (1) ensure only "test-update" is modified, (2) + ;; ensure the contents of the new member is expected. + (funcall test-modify "test-update" update-fn) + + ;; test 2: with "test-delete" and "test-delete.zip", delete entry + ;; from "test-delete": (1) ensure only "test-delete" is modified, + ;; (2) ensure the file list is reduced as expected. + (funcall test-modify "test-delete" delete-fn)) + + ;; Clean up created files. + (dolist (file created-files) + (ignore-errors (delete-file file)))))) (provide 'arc-mode-tests) commit 93005cd9dc2bab882e66ac7b81f593cd6c021e43 Author: Stefan Monnier Date: Tue May 9 22:30:52 2023 -0400 with-display-message: Workaround for bug#63253 Running arbitrary ELisp code from an atimer is still dangerous, at least because the regexp engine is not-reentrant, so let's patch up the case we bumped into. There are probably many other such holes :-( * src/alloc.c (garbage_collection_inhibited): Make it non-static. * src/xdisp.c (garbage_collection_inhibited): Declare it. (set_message, clear_message): Use it as a proxy for "we're in a dangerous context like within `probably_quit`". diff --git a/src/alloc.c b/src/alloc.c index 05a19f0b7e9..7ff2cd3b100 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -367,7 +367,7 @@ #define PUREBEG (char *) pure /* If positive, garbage collection is inhibited. Otherwise, zero. */ -static intptr_t garbage_collection_inhibited; +intptr_t garbage_collection_inhibited; /* The GC threshold in bytes, the last time it was calculated from gc-cons-threshold and gc-cons-percentage. */ diff --git a/src/xdisp.c b/src/xdisp.c index 43847544396..e960901d5dc 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -12810,6 +12810,8 @@ truncate_message_1 (void *a1, Lisp_Object a2) return false; } +extern intptr_t garbage_collection_inhibited; + /* Set the current message to STRING. */ static void @@ -12819,7 +12821,11 @@ set_message (Lisp_Object string) eassert (STRINGP (string)); - if (FUNCTIONP (Vset_message_function)) + if (FUNCTIONP (Vset_message_function) + /* FIXME: (bug#63253) We should really make the regexp engine re-entrant, + but in the mean time, let's ignore `set-message-function` when + called from `probably_quit`. */ + && !garbage_collection_inhibited) { specpdl_ref count = SPECPDL_INDEX (); specbind (Qinhibit_quit, Qt); @@ -12896,7 +12902,9 @@ clear_message (bool current_p, bool last_displayed_p) if (current_p) { - if (FUNCTIONP (Vclear_message_function)) + if (FUNCTIONP (Vclear_message_function) + /* FIXME: (bug#63253) Same as for `set-message-function` above. */ + && !garbage_collection_inhibited) { specpdl_ref count = SPECPDL_INDEX (); specbind (Qinhibit_quit, Qt); commit 6924c81a6d223e62465a8c584c6b0d777afa354b Author: Eli Zaretskii Date: Tue May 9 12:06:32 2023 +0300 ; Don't use literal non-ASCII characters in Texinfo * doc/emacs/mule.texi (Input Methods): Don't use non-ASCII characters in Texinfo sources, where Texinfo provides an ASCII command to insert it. diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index 3b98a93c5aa..3a4ff5baccf 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi @@ -515,9 +515,9 @@ Input Methods do the highlighting in the buffer showing the possible characters, rather than in the echo area. - To enter characters according to the @dfn{pīnyīn} transliteration + To enter characters according to the @dfn{p@=iny@=in} transliteration method instead, use the @code{chinese-sisheng} input method. This is -a composition based method, where e.g. @kbd{pi1} results in @samp{pī}. +a composition based method, where e.g. @kbd{pi1} results in @samp{p@=i}. In Japanese input methods, first you input a whole word using phonetic spelling; then, after the word is in the buffer, Emacs commit f1675df3d0c6ea723693dedc2c2b9ae39e1be339 Author: João Távora Date: Fri May 5 19:44:11 2023 +0100 Fido-mode: never shadow 'external' completion style As explained in the manual (20.7.2 Fast minibuffer selection) 'fido-mode' and 'fido-vertical-mode' give priority the "flex" completion style. In fact, bug#62015 was recently fixed in commit because that priority was not taking place correctly and some completions were missed. However, an exception must be made for the 'external' completion style. That style, made available by the lisp/external-completion.el library, is specifically designed to work with backends that provide only a partial view of all completions. If we allow 'flex' to step in front of 'external' it could mean that 'flex' matches something and 'external' isn't triggered as it probably should. To reproduce have the rust-mode ELPA package and the rust-analyzer LSP server handy. Then: emacs -Q -f package-initialize main.rs Where main.rs is this content: fn foo1() {} fn foo2() {} fn foo3() {} fn foobar1() {} fn foobar2() {} fn foobar3() {} The rust-analyzer server can be quickly configured to return only 3 workspace symbols max, so evaluate: (setq-default eglot-workspace-configuration '(:rust-analyzer (:workspace (:symbol (:search (:limit 3)))))) Now start M-x eglot and M-x fido-vertical-mode and type C-u M-. to find an arbitrary symbol in this one-file project. Type 'f'. You will see the three foo's are listed, correctly. Now type '3'. You will only see "foo3". But that's wrong because "foobar3" was available, if only the server had been asked for it. This commit fixes the situation and no completions are lost. As an unfortunate side-effect of this commit, the fontification of completions-common-part on the matches is lost, but that is not worse than missing out on completions and there are better ways to recover the fontification anyway (in external-completion.el). See also: https://github.com/joaotavora/eglot/discussions/1219#discussioncomment-5818336 * lisp/icomplete.el (icomplete--fido-ccd): Do not touch entries with 'external in them. Do not merge to master. Backport: (cherry picked from commit 0e8d8a72284f6b3aaa1bbce73d41c7d84bbc4d3c) diff --git a/lisp/icomplete.el b/lisp/icomplete.el index f46127a20e0..cfe6244b511 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -425,7 +425,10 @@ icomplete--fido-ccd for (cat . alist) in completion-category-defaults collect `(,cat . ,(cl-loop for entry in alist for (prop . val) = entry - if (eq prop 'styles) + if (and (eq prop 'styles) + ;; Never step in front of 'external', as that + ;; might lose us completions. + (not (memq 'external val))) collect `(,prop . (flex ,@(delq 'flex val))) else collect entry)))) commit 56d2949d44c1ad4ba6b00e9c548831cae28a12b7 Author: Eli Zaretskii Date: Tue May 9 08:34:43 2023 +0300 ; * lisp/leim/quail/persian.el: Fix a typo in last commit. diff --git a/lisp/leim/quail/persian.el b/lisp/leim/quail/persian.el index 77f1a4cd293..758d2951292 100644 --- a/lisp/leim/quail/persian.el +++ b/lisp/leim/quail/persian.el @@ -1,6 +1,6 @@ ;;; persian.el --- Quail package for inputting Persian/Farsi keyboard -*- coding: utf-8; lexical-binding: t -*- -;; Copyright (C) 2011-2022 Free Software Foundation, Inc. +;; Copyright (C) 2011-2023 Free Software Foundation, Inc. ;; Author: Mohsen BANAN ;; URL: http://mohsen.1.banan.byname.net/contact commit d94ea9efca663510ce2cf8c6df327404d92afa0a Author: Eli Zaretskii Date: Tue May 9 08:20:57 2023 +0300 Avoid crashes in --without-all build trying to scale non-ASCII char * src/fontset.c (face_for_char): Display a non-ASCII character as glyphless if the ASCII face has no fontset. (Bug#63283) diff --git a/src/fontset.c b/src/fontset.c index f196dee8259..c0e00cfa346 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -967,6 +967,15 @@ face_for_char (struct frame *f, struct face *face, int c, #endif } + /* If the parent face has no fontset we could work with, and has no + font, just return that same face, so that the caller will + consider the character to have no font capable of displaying it, + and display it as "glyphless". That is certainly better than + violating the assertion below or crashing when assertions are not + compiled in. */ + if (face->fontset < 0 && !face->font) + return face->id; + eassert (fontset_id_valid_p (face->fontset)); fontset = FONTSET_FROM_ID (face->fontset); eassert (!BASE_FONTSET_P (fontset)); commit 387ddc0ccc1b21f612b9106bafec63170ede30e6 Author: Eli Zaretskii Date: Tue May 9 07:52:04 2023 +0300 Improve instructions for dealing with Emacs crashes * doc/emacs/trouble.texi (Crashing): Show the variant of the 'addr2line' command for MS-Windows. diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index db78895bb5b..bccdea72b19 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -313,14 +313,36 @@ Crashing addr2line -C -f -i -p -e @var{bindir}/@var{emacs-binary} @end example +@noindent +On MS-Windows, the backtrace looks somewhat differently, for example: + +@example +Backtrace: +00007ff61166a12e +00007ff611538be1 +00007ff611559601 +00007ff6116ce84a +00007ff9b7977ff0 +@dots{} +@end example + +@noindent +Therefore, the filtering via @command{sed} is not required, and the +command to show the source-code line number is + +@example + addr2line -C -f -i -p -e @var{bindir}/@var{emacs-binary} < @var{backtrace} +@end example + @noindent Here, @var{backtrace} is the name of a text file containing a copy of -the backtrace, @var{bindir} is the name of the directory that -contains the Emacs executable, and @var{emacs-binary} is the name of -the Emacs executable file, normally @file{emacs} on GNU and Unix -systems and @file{emacs.exe} on MS-Windows and MS-DOS@. Omit the -@option{-p} option if your version of @command{addr2line} is too old -to have it. +the backtrace (on MS-Windows, @file{emacs_backtrace.txt} in the +directory where Emacs was started), @var{bindir} is the name of the +directory that contains the Emacs executable, and @var{emacs-binary} +is the name of the Emacs executable file, normally @file{emacs} on GNU +and Unix systems and @file{emacs.exe} on MS-Windows and MS-DOS@. Omit +the @option{-p} option if your version of @command{addr2line} is too +old to have it. @cindex core dump Optionally, Emacs can generate a @dfn{core dump} when it crashes, on commit e6b4784a37fb6bfecfa5ee5d84b60fc79c1fc2db Author: Mohsen Banan Date: Sun May 7 10:11:55 2023 -0700 Improved transliterations + improved bidi insertion support for Farsi * lisp/leim/quail/persian.el ("farsi-transliterate-banan"): Improve and add transliterations. (Bug#63361) diff --git a/lisp/leim/quail/persian.el b/lisp/leim/quail/persian.el index 2915f362ee6..77f1a4cd293 100644 --- a/lisp/leim/quail/persian.el +++ b/lisp/leim/quail/persian.el @@ -1,8 +1,8 @@ ;;; persian.el --- Quail package for inputting Persian/Farsi keyboard -*- coding: utf-8; lexical-binding: t -*- -;; Copyright (C) 2011-2023 Free Software Foundation, Inc. +;; Copyright (C) 2011-2022 Free Software Foundation, Inc. -;; Author: Mohsen BANAN +;; Author: Mohsen BANAN ;; URL: http://mohsen.1.banan.byname.net/contact ;; Keywords: multilingual, input method, Farsi, Persian, keyboard @@ -23,7 +23,7 @@ ;; along with GNU Emacs. If not, see . ;;; Commentary: - +;; ;; This file contains a collection of input methods for ;; Persian languages (Farsi, Urdu, Pashto/Afghanic, ...) ;; @@ -395,6 +395,7 @@ ("u" ?و) ("V" ?ؤ) ("h" ?ه) + ("Hh" ?ه) ;; to take care of هه -- hHh ("y" ?ی) ("i" ?ی) ("I" ?ئ) @@ -402,7 +403,7 @@ ;;;;;;;;;;; isiri-6219 Table 6 -- جدول ۶ - حروِفِ عربی ("F" ?إ) - ("D" ?\u0671) ;; (insert-char #x0671)ٱ named: حرفِ الفِ وصل + ("D" ?\u0671) ;; (ucs-insert #x0671)ٱ named: حرفِ الفِ وصل ("K" ?ك) ;; Arabic kaf ("Th" ?ة) ;; ta marbuteh ("Y" ?ي) @@ -421,40 +422,40 @@ ("8" ?۸) ("9" ?۹) - ("\\/" ?\u066B) ;; (insert-char #x066B)٫ named: ممیزِ فارسی - ("\\," ?\u066C) ;; (insert-char #x066C)٬ named: جداکننده‌ی هزارهای فارسی - ("%" ?\u066A) ;; (insert-char #x066A)٪ named: درصدِ فارسی - ("+" ?\u002B) ;; (insert-char #x002B)+ named: علامتِ به‌اضافه - ("-" ?\u2212) ;; (insert-char #x2212)− named: علامتِ منها - ("\\*" ?\u00D7) ;; (insert-char #x00D7)× named: علامتِ ضرب - ("\\-" ?\u00F7) ;; (insert-char #x00F7)÷ named: علامتِ تقسیم - ("<" ?\u003C) ;; (insert-char #x003C)< named: علامتِ کوچکتر - ("=" ?\u003D) ;; (insert-char #x003D)= named: علامتِ مساوی - (">" ?\u003E) ;; (insert-char #x003E)> named: علامتِ بزرگتر + ("\\/" ?\u066B) ;; (ucs-insert #x066B)٫ named: ممیزِ فارسی + ("\\," ?\u066C) ;; (ucs-insert #x066C)٬ named: جداکننده‌ی هزارهای فارسی + ("%" ?\u066A) ;; (ucs-insert #x066A)٪ named: درصدِ فارسی + ("+" ?\u002B) ;; (ucs-insert #x002B)+ named: علامتِ به‌اضافه + ("-" ?\u2212) ;; (ucs-insert #x2212)− named: علامتِ منها + ("\\*" ?\u00D7) ;; (ucs-insert #x00D7)× named: علامتِ ضرب + ("\\-" ?\u00F7) ;; (ucs-insert #x00F7)÷ named: علامتِ تقسیم + ("<" ?\u003C) ;; (ucs-insert #x003C)< named: علامتِ کوچکتر + ("=" ?\u003D) ;; (ucs-insert #x003D)= named: علامتِ مساوی + (">" ?\u003E) ;; (ucs-insert #x003E)> named: علامتِ بزرگتر ;;;;;;;;;;; isiri-6219 Table 2 -- جدول ۲ - علائم نقطه گذاریِ مشترک ;;; Space ("." ?.) ;; - (":" ?\u003A) ;; (insert-char #x003A): named: - ("!" ?\u0021) ;; (insert-char #x0021)! named: - ("\\." ?\u2026) ;; (insert-char #x2026)… named: - ("\\-" ?\u2010) ;; (insert-char #x2010)‐ named: - ("-" ?\u002D) ;; (insert-char #x002D)- named: + (":" ?\u003A) ;; (ucs-insert #x003A): named: + ("!" ?\u0021) ;; (ucs-insert #x0021)! named: + ("\\." ?\u2026) ;; (ucs-insert #x2026)… named: + ("\\-" ?\u2010) ;; (ucs-insert #x2010)‐ named: + ("-" ?\u002D) ;; (ucs-insert #x002D)- named: ("|" ?|) ;;("\\\\" ?\) ("//" ?/) - ("*" ?\u002A) ;; (insert-char #x002A)* named: - ("(" ?\u0028) ;; (insert-char #x0028)( named: - (")" ?\u0029) ;; (insert-char #x0029)) named: - ("[" ?\u005B) ;; (insert-char #x005B)[ named: - ("[" ?\u005D) ;; (insert-char #x005D)] named: - ("{" ?\u007B) ;; (insert-char #x007B){ named: - ("}" ?\u007D) ;; (insert-char #x007D)} named: - ("\\<" ?\u00AB) ;; (insert-char #x00AB)« named: - ("\\>" ?\u00BB) ;; (insert-char #x00BB)» named: - ("N" ?\u00AB) ;; (insert-char #x00AB)« named: - ("M" ?\u00BB) ;; (insert-char #x00BB)» named: + ("*" ?\u002A) ;; (ucs-insert #x002A)* named: + ("(" ?\u0028) ;; (ucs-insert #x0028)( named: + (")" ?\u0029) ;; (ucs-insert #x0029)) named: + ("[" ?\u005B) ;; (ucs-insert #x005B)[ named: + ("[" ?\u005D) ;; (ucs-insert #x005D)] named: + ("{" ?\u007B) ;; (ucs-insert #x007B){ named: + ("}" ?\u007D) ;; (ucs-insert #x007D)} named: + ("\\<" ?\u00AB) ;; (ucs-insert #x00AB)« named: + ("\\>" ?\u00BB) ;; (ucs-insert #x00BB)» named: + ("N" ?\u00AB) ;; (ucs-insert #x00AB)« named: + ("M" ?\u00BB) ;; (ucs-insert #x00BB)» named: ;;;;;;;;;;; isiri-6219 Table 3 -- جدول ۳ - علائم نقطه گذاریِ فارسی ("," ?،) ;; farsi @@ -463,24 +464,49 @@ ("_" ?ـ) ;; -;;;;;;;;;;; isiri-6219 Table 1 -- جدول ۱ - نویسه‌های کنترلی +;;;;;;;;;;; isiri-6219 Table 1 (plus bidi updates) - جدول ۱ - نویسه‌های کنترلی ;; LF ;; CR - ("‌" ?\u200C) ;; (insert-char #x200C)‌ named: فاصله‌ی مجازی + ("‌" ?\u200C) ;; (ucs-insert #x200C)‌ named: فاصله‌ی مجازی ("/" ?\u200C) ;; - ("‍" ?\u200D) ;; (insert-char #x200D)‍ named: اتصالِ مجازی + ("‍" ?\u200D) ;; (ucs-insert #x200D)‍ named: اتصالِ مجازی ("J" ?\u200D) ;; - ("‎" ?\u200E) ;; (insert-char #x200E)‎ named: نشانه‌ی چپ‌به‌راست - ("‏" ?\u200F) ;; (insert-char #x200F)‏ named: نشانه‌ی راست‌به‌چپ - ("&ls;" ?\u2028) ;; (insert-char #x2028)
 named: جداکننده‌ی سطرها - ("&ps;" ?\u2028) ;; (insert-char #x2029)
 named: جداکننده‌ی بندها - ("&lre;" ?\u202A) ;; (insert-char #x202A)‪ named: زیرمتنِ چپ‌به‌راست - ("&rle;" ?\u202B) ;; (insert-char #x202B) named: زیرمتنِ راست‌به‌چپ - ("&pdf;" ?\u202C) ;; (insert-char #x202C) named: پایانِ زیرمتن - ("&lro;" ?\u202D) ;; (insert-char #x202D) named: زیرمتنِ اکیداً چپ‌به‌راست - ("&rlo;" ?\u202D) ;; (insert-char #x202E) named: زیرمتنِ اکیداً راست‌به‌چپ - ("&bom;" ?\uFEFF) ;; (insert-char #xFEFF) named: نشانه‌ی ترتیبِ بایت‌ها - + ("&ls;" ?\u2028) ;; (ucs-insert #x2028)
 named: جداکننده‌ی سطرها + ("&ps;" ?\u2029) ;; (ucs-insert #x2029)
 named: جداکننده‌ی بندها + ;; + ;; Byte Order Mark (Historic) + ("&bom;" ?\uFEFF) ;; (ucs-insert #xFEFF) named: نشانه‌ی ترتیبِ بایت‌ها + ;; BIDI Controls + ;; ------- + ;; LEFT-TO-RIGHT MARK (strongly typed LTR character) + ("‎" ?\u200E) ;; (ucs-insert #x200E) named: نشانه‌ی چپ‌به‌راست + ("L" ?\u200E) + ;; RIGHT-TO-LEFT MARK (strongly typed RTL character) + ("‏" ?\u200F) ;; (ucs-insert #x200F) named: نشانه‌ی راست‌به‌چپ + ("R" ?\u200F) + ;; LEFT-TO-RIGHT ISOLATE (sets base direction to LTR & isolates the embedded) + ("&lri;" ?\u2066) ;; (ucs-insert #x2066) + ;; RIGHT-TO-LEFT ISOLATE (sets base direction to RTL & isolates the embedded) + ("&rli;" ?\u2067) ;; (ucs-insert #x2067) + ;; FIRST-STRONG ISOLATE (isolates content & sets dir to first strongly typed) + ("&fsi;" ?\u2068) ;; (ucs-insert #x2068) + ;; POP DIRECTIONAL ISOLATE (used for RLI, LRI or FSI) + ;; EMACS BUG + ;; If ("&pdi;" ?\u2069) is included Emacs fully hangs with a (describe-input-method 'farsi-transliterate-banan) + ;;("&pdi;" ?\u2069) ;; (ucs-insert #x2069) + ;; LEFT-TO-RIGHT EMBEDDING (sets base dir to LTR but allows embedded text) + ("&lre;" ?\u202A) ;; (ucs-insert #x202A) named: زیرمتنِ چپ‌به‌راست + ("B" ?\u202A) + ;; RIGHT-TO-LEFT EMBEDDING (sets base dir to RTL but allows embedded text) + ("&rle;" ?\u202B) ;; (ucs-insert #x202B) named: زیرمتنِ راست‌به‌چپ + ;; POP DIRECTIONAL FORMATTING (used for RLE or LRE and RLO or LRO) + ;; EMACS ANOMOLY --- Why does &pdf not show up in (describe-input-method 'farsi-transliterate-banan) + ("&pdf;" ?\u202C) ;; (ucs-insert #x202C) named: پایانِ زیرمتن + ("P" ?\u202C) + ;; LEFT-TO-RIGHT OVERRIDE (overrides the bidirectional algorithm, display LTR) + ("&lro;" ?\u202D) ;; (ucs-insert #x202D) named: زیرمتنِ اکیداً چپ‌به‌راست + ;; RIGHT-TO-LEFT OVERRIDE (overrides the bidirectional algorithm, display RTL) + ("&rlo;" ?\u202E) ;; (ucs-insert #x202E) named: زیرمتنِ اکیداً راست‌به‌چپ ;;;;;;;;;;; isiri-6219 Table 7 -- جدول ۷ - نشانه‌هایِ فارسی ("^" ?َ) ;; zbar ;; زبر فارسى @@ -491,14 +517,14 @@ ("O" ?ٌ) ;; دو پيش فارسى -- تنوين رفع ("~" ?ّ) ;; tashdid ;; تشديد فارسى ("@" ?ْ) ;; ساکن فارسى - ("U" ?\u0653) ;; (insert-char #x0653)ٓ named: مدِ فارسی + ("U" ?\u0653) ;; (ucs-insert #x0653)ٓ named: مدِ فارسی ("`" ?ٔ) ;; همزه فارسى بالا - ("C" ?\u0655) ;; (insert-char #x0655)ٕ named: همزه فارسى پایین - ("$" ?\u0670) ;; (insert-char #x0670)ٰ named: الفِ مقصوره‌ی فارسی + ("C" ?\u0655) ;; (ucs-insert #x0655)ٕ named: همزه فارسى پایین + ("$" ?\u0670) ;; (ucs-insert #x0670)ٰ named: الفِ مقصوره‌ی فارسی ;;;;;;;;;;; isiri-6219 Table 8 - Forbidden Characters -- جدول ۸ - نویسه‌هایِ ممنوع -;; ;; he ye (insert-char 1728) (insert-char #x06c0) kills emacs-24.0.90 +;; ;; he ye (ucs-insert 1728) (ucs-insert #x06c0) kills emacs-24.0.90 ;; arabic digits 0-9 @@ -508,7 +534,7 @@ ("\\~" ?~) ("\\@" ?@) ("\\#" ?#) - ("\\$" ?\uFDFC) ;; (insert-char #xFDFC)﷼ named: + ("\\$" ?\uFDFC) ;; (ucs-insert #xFDFC)﷼ named: ("\\^" ?^) ("\\1" ?1) ("\\2" ?2) commit c1363a04bb201f8444072903a89a77f8203a9e3a Author: Alan Third Date: Thu Apr 27 20:08:23 2023 +0100 Fix crash when creating a child frame in NS (bug#63107) * src/nsterm.m ([EmacsView initFrameFromEmacs:]): Have a second go at creating the toolbar. ([EmacsWindow createToolbar:]): If there is already a toolbar or the EmacsView's layer is not an EmacsLayer, then do nothing. (cherry picked from commit 3adc1e7f37901235bda83ea65a90644b7b0a8dbf) diff --git a/src/nsterm.m b/src/nsterm.m index 37462cf49e2..c26528e0154 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -7938,6 +7938,10 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f [self setLayerContentsRedrawPolicy: NSViewLayerContentsRedrawOnSetNeedsDisplay]; [self setLayerContentsPlacement:NSViewLayerContentsPlacementTopLeft]; + + /* initWithEmacsFrame can't create the toolbar before the layer is + set, so have another go at creating the toolbar here. */ + [(EmacsWindow*)[self window] createToolbar:f]; #endif if (ns_drag_types) @@ -9182,11 +9186,18 @@ - (instancetype) initWithEmacsFrame: (struct frame *) f - (void)createToolbar: (struct frame *)f { - if (FRAME_UNDECORATED (f) || !FRAME_EXTERNAL_TOOL_BAR (f)) + if (FRAME_UNDECORATED (f) || !FRAME_EXTERNAL_TOOL_BAR (f) || [self toolbar] != nil) return; EmacsView *view = (EmacsView *)FRAME_NS_VIEW (f); +#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 + /* If the view's layer isn't an EmacsLayer then we can't create the + toolbar yet. */ + if (! [[view layer] isKindOfClass:[EmacsLayer class]]) + return; +#endif + EmacsToolbar *toolbar = [[EmacsToolbar alloc] initForView:view withIdentifier:[NSString stringWithFormat:@"%p", f]]; commit 7d6855c9ab6e0d5128d81b4bcb685799a3c316e9 Author: Andrew G Cohen Date: Sun Apr 30 09:55:42 2023 +0800 Fix outgoing mime type regression (Bug#62815) * lisp/net/mailcap.el (mailcap-mime-extensions, mailcap-parse-mimetype-file, mailcap-mime-types): Don't regexp-quote mimetypes in a context where they should be strings. (mailcap--regexp-quote-type): Remove. (cherry picked from commit 605414d018da47f99dec5019142f584b6eb174c8) diff --git a/lisp/net/mailcap.el b/lisp/net/mailcap.el index 722e98be2fc..be13272f3b0 100644 --- a/lisp/net/mailcap.el +++ b/lisp/net/mailcap.el @@ -979,7 +979,7 @@ mailcap-mime-extensions (".vox" . "audio/basic") (".vrml" . "x-world/x-vrml") (".wav" . "audio/x-wav") - (".xls" . "application/vnd\\.ms-excel") + (".xls" . "application/vnd.ms-excel") (".wrl" . "x-world/x-vrml") (".xbm" . "image/xbm") (".xpm" . "image/xpm") @@ -1051,8 +1051,7 @@ mailcap-parse-mimetype-file (setq save-pos (point)) (skip-chars-forward "^ \t\n") (downcase-region save-pos (point)) - (setq type (mailcap--regexp-quote-type - (buffer-substring save-pos (point)))) + (setq type (buffer-substring save-pos (point))) (while (not (eolp)) (skip-chars-forward " \t") (setq save-pos (point)) @@ -1065,12 +1064,6 @@ mailcap-parse-mimetype-file (setq mailcap-mime-extensions (append extns mailcap-mime-extensions) extns nil))))) -(defun mailcap--regexp-quote-type (type) - (if (not (string-search "/" type)) - type - (pcase-let ((`(,major ,minor) (split-string type "/"))) - (concat major "/" (regexp-quote minor))))) - (defun mailcap-extension-to-mime (extn) "Return the MIME content type of the file extensions EXTN." (mailcap-parse-mimetypes) @@ -1107,7 +1100,7 @@ mailcap-mime-types (dolist (info (cdr data)) (setq type (cdr (assq 'type (cdr info)))) (unless (string-search "*" type) - (push type res)))) + (push (string-replace "\\" "" type) res)))) (nreverse res))))) ;;; commit e920dd2b6f92e472372ee3499d7f9353f0432cf7 Author: Nicholas Vollmer Date: Sun May 7 00:06:18 2023 -0400 define-minor-mode: sanitize mode function messages * emacs-lisp/easy-mmode.el (define-minor-mode): Ensure mode's pretty name is not interprted as a message formatting string, e.g., if the mode name contains a '%'. (Bug#63343) diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 0f6711209a5..22ea12f0960 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -390,7 +390,7 @@ define-minor-mode (not (equal ,last-message (current-message)))) (let ((local ,(if globalp "" " in current buffer"))) - (message ,(format "%s %%sabled%%s" pretty-name) + (message "%s %sabled%s" ,pretty-name (if ,getter "en" "dis") local))))) ,@(when after-hook `(,after-hook))) (force-mode-line-update) commit 910a7b30dfd185eda78caf48e6f634a6a6e086f1 Author: Eli Zaretskii Date: Sun May 7 09:13:10 2023 +0300 Fix beginning/end-of-defun with tree-sitter * lisp/treesit.el (treesit-beginning-of-defun) (treesit-end-of-defun): Push mark, as other beginning/end-of-defun functions do. diff --git a/lisp/treesit.el b/lisp/treesit.el index 1d4749c8cd2..147b052d287 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -1862,6 +1862,10 @@ treesit-beginning-of-defun Behavior of this function depends on `treesit-defun-type-regexp' and `treesit-defun-skipper'." (interactive "^p") + (or (not (eq this-command 'treesit-beginning-of-defun)) + (eq last-command 'treesit-beginning-of-defun) + (and transient-mark-mode mark-active) + (push-mark)) (let ((orig-point (point)) (success nil)) (catch 'done @@ -1892,6 +1896,10 @@ treesit-end-of-defun (interactive "^p\nd") (let ((orig-point (point))) (if (or (null arg) (= arg 0)) (setq arg 1)) + (or (not (eq this-command 'treesit-end-of-defun)) + (eq last-command 'treesit-end-of-defun) + (and transient-mark-mode mark-active) + (push-mark)) (catch 'done (dotimes (_ 2) ; Not making progress is better than infloop. commit e205f68717e960a929e5657e8351ba6ef0e5f480 Author: Theodor Thornhill Date: Sat May 6 21:13:15 2023 +0200 Fix indent for enums in csharp-mode * lisp/progmodes/csharp-mode.el (csharp-guess-basic-syntax): Check for keywords containing 'enum' on the line before an opening bracket, and make it behave like a class-open token. diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el index 4f7cbc3d51d..869a207c567 100644 --- a/lisp/progmodes/csharp-mode.el +++ b/lisp/progmodes/csharp-mode.el @@ -464,6 +464,15 @@ csharp-at-lambda-header (defun csharp-guess-basic-syntax (orig-fun &rest args) (cond + (;; enum + (save-excursion + (goto-char (c-point 'boi)) + (and + (eq (char-after) ?\{) + (save-excursion + (goto-char (c-point 'iopl)) + (looking-at ".*enum.*")))) + `((class-open ,(c-point 'iopl)))) (;; Attributes (save-excursion (goto-char (c-point 'iopl)) commit dfde902f3b9c7eea7e58e09c4d52c1346ef52ee4 Author: Philip Kaludercic Date: Sat May 6 20:51:39 2023 +0200 ; Expand 'package-vc-install' documentation * lisp/emacs-lisp/package-vc.el (package-vc-install): Go into further detail on the handling of the REV argument. (Bug#60418) diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index 8f62e7d65f3..85193dd7a30 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -747,11 +747,13 @@ package-vc-install symbol whose name is the package name, and the URL for the package will be taken from the package's metadata. -By default, this function installs the last version of the package -available from its repository, but if REV is given and non-nil, it -specifies the revision to install. If REV has the special value -`:last-release' (interactively, the prefix argument), that stands -for the last released version of the package. +By default, this function installs the last revision of the +package available from its repository. If REV is a string, it +describes the revision to install, as interpreted by the VC +backend. The special value `:last-release' (interactively, the +prefix argument), will use the commit of the latest release, if +it exists. The last release is the latest revision which changed +the \"Version:\" header of the package's main Lisp file. Optional argument BACKEND specifies the VC backend to use for cloning the package's repository; this is only possible if NAME-OR-URL is a URL, commit 71337843036d6a6b53aedcf898febd1b591b5f41 Author: Eli Zaretskii Date: Sat May 6 15:15:42 2023 +0300 Teach c-ts-mode about the 'restrict' keyword * lisp/progmodes/c-ts-mode.el (c-ts-mode--keywords): Add "restrict" and "_Atomic" type qualifiers. (Bug#63323) diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index 1186bd5b8df..b042782efa7 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -504,10 +504,10 @@ c-ts-mode--keywords "C/C++ keywords for tree-sitter font-locking. MODE is either `c' or `cpp'." (let ((c-keywords - '("break" "case" "const" "continue" + '("_Atomic" "break" "case" "const" "continue" "default" "do" "else" "enum" "extern" "for" "goto" "if" "inline" - "register" "return" + "register" "restrict" "return" "sizeof" "static" "struct" "switch" "typedef" "union" "volatile" "while"))) commit 15e06260ae8f622370b935920b2618cfff4cc8e7 Author: Eli Zaretskii Date: Sat May 6 14:16:36 2023 +0300 * lisp/x-dnd.el (x-dnd-after-move-frame): Skip dead frames. (Bug#63312) diff --git a/lisp/x-dnd.el b/lisp/x-dnd.el index 9286a1858cf..acfbbed9677 100644 --- a/lisp/x-dnd.el +++ b/lisp/x-dnd.el @@ -609,8 +609,9 @@ x-dnd-init-xdnd-for-frame (defun x-dnd-after-move-frame (frame) "Handle FRAME moving to a different position. Clear any cached root window position." - (set-frame-parameter frame 'dnd-root-window-position - nil)) + (and (frame-live-p frame) + (set-frame-parameter frame 'dnd-root-window-position + nil))) (add-hook 'move-frame-functions #'x-dnd-after-move-frame) commit a081b6625bd3afa67d82403de8fa02de7e428bfd Author: Shynur Date: Fri Apr 7 11:45:28 2023 +0800 ; Updated Elispref-Manual: `nil' cannot be defun'ed * doc/lispref/functions.texi (Function Cells): Fix inaccuracy. (Bug#62746) diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index 948c6bb96f8..4ab7a194eb0 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi @@ -1482,7 +1482,7 @@ Function Cells Note that void is not the same as @code{nil} or the symbol @code{void}. The symbols @code{nil} and @code{void} are Lisp objects, and can be stored into a function cell just as any other object can be -(and they can be valid functions if you define them in turn with +(and @code{void} can be a valid function if you define it with @code{defun}). A void function cell contains no object whatsoever. You can test the voidness of a symbol's function definition with commit 97b818a4fb91668f70bc9b298e10fd8ae600339b Author: Eli Zaretskii Date: Sat May 6 11:47:31 2023 +0300 Fix doc strings of 'mark-sexp' and 'mark-word' * lisp/emacs-lisp/lisp.el (mark-sexp): * lisp/simple.el (mark-word): Clarify the doc strings in various usage cases. (Bug#62892) diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index e3ed28f097a..b91d56cfb4f 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -92,12 +92,22 @@ backward-sexp (forward-sexp (- arg) interactive)) (defun mark-sexp (&optional arg allow-extend) - "Set mark ARG sexps from point. -The place mark goes is the same place \\[forward-sexp] would -move to with the same argument. -Interactively, if this command is repeated -or (in Transient Mark mode) if the mark is active, -it marks the next ARG sexps after the ones already marked. + "Set mark ARG sexps from point or move mark one sexp. +When called from Lisp with ALLOW-EXTEND ommitted or nil, mark is +set ARG sexps from point. +With ARG and ALLOW-EXTEND both non-nil (interactively, with prefix +argument), the place to which mark goes is the same place \\[forward-sexp] +would move to with the same argument; if the mark is active, it moves +ARG sexps from its current position, otherwise it is set ARG sexps +from point. +When invoked interactively without a prefix argument and no active +region, mark moves one sexp forward. +When invoked interactively without a prefix argument, and region +is active, mark moves one sexp away of point (i.e., forward +if mark is at or after point, back if mark is before point), thus +extending the region by one sexp. Since the direction of region +extension depends on the relative position of mark and point, you +can change the direction by \\[exchange-point-and-mark]. This command assumes point is not in a string or comment." (interactive "P\np") (cond ((and allow-extend diff --git a/lisp/simple.el b/lisp/simple.el index b6efb06fc27..959e28c7b75 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -8668,12 +8668,22 @@ backward-word (forward-word (- (or arg 1)))) (defun mark-word (&optional arg allow-extend) - "Set mark ARG words away from point. -The place mark goes is the same place \\[forward-word] would -move to with the same argument. -Interactively, if this command is repeated -or (in Transient Mark mode) if the mark is active, -it marks the next ARG words after the ones already marked." + "Set mark ARG words from point or move mark one word. +When called from Lisp with ALLOW-EXTEND ommitted or nil, mark is +set ARG words from point. +With ARG and ALLOW-EXTEND both non-nil (interactively, with prefix +argument), the place to which mark goes is the same place \\[forward-word] +would move to with the same argument; if the mark is active, it moves +ARG words from its current position, otherwise it is set ARG words +from point. +When invoked interactively without a prefix argument and no active +region, mark moves one word forward. +When invoked interactively without a prefix argument, and region +is active, mark moves one word away of point (i.e., forward +if mark is at or after point, back if mark is before point), thus +extending the region by one word. Since the direction of region +extension depends on the relative position of mark and point, you +can change the direction by \\[exchange-point-and-mark]." (interactive "P\np") (cond ((and allow-extend (or (and (eq last-command this-command) (mark t)) commit 6f910ad93224bad63099d553fd15bdbbc7beef8d Author: Eli Zaretskii Date: Sat May 6 09:45:05 2023 +0300 ; * etc/EGLOT-NEWS: Fix misspellings. diff --git a/etc/EGLOT-NEWS b/etc/EGLOT-NEWS index ad92748f77c..088bdd28bf3 100644 --- a/etc/EGLOT-NEWS +++ b/etc/EGLOT-NEWS @@ -171,12 +171,12 @@ may be disabled via 'eglot-ignored-server-capabilities' ** Basic LSP "workspace folders" support added. Eglot now advertises 'project-root' and 'project-external-roots' as workspace-folders. (Configuring 'project-vc-external-roots-function' -via Elisp or 'tags-table-list' via Custtomize are two ways to set the +via Elisp or 'tags-table-list' via Customize are two ways to set the external roots of a simple git project.) (github#893) -** Eglot can now show project wide diagnosics via Flymake. +** Eglot can now show project wide diagnostics via Flymake. Some LSP servers report diagnostics for all files in the current workspace. Flymake has (as of version 1.2.1) the option to show diagnostics from buffers other than the currently visited one. The @@ -394,7 +394,7 @@ these two domains. * Changes in Eglot 1.3 (10/12/2018) -** Provide strict checking of incoming LSP messagesp. +** Provide strict checking of incoming LSP messages. (github#144, github#156) @@ -488,7 +488,7 @@ here. * Changes in Eglot 1.1 (9/7/2018) ** Implement TCP autostart/autoconnect (and support Ruby's Solargraph). -The ':autoport' symbol in the server incovation is replaced +The ':autoport' symbol in the server invocation is replaced dynamically by a local port believed to be vacant, so that the ensuing TCP connection finds a listening server. commit 9b775ddc057b61d2f8c6d28997f08e4d70e45c78 Author: Eli Zaretskii Date: Sat May 6 09:38:20 2023 +0300 ; * etc/EGLOT-NEWS: Fix wording of last change. diff --git a/etc/EGLOT-NEWS b/etc/EGLOT-NEWS index fd0d9a24568..ad92748f77c 100644 --- a/etc/EGLOT-NEWS +++ b/etc/EGLOT-NEWS @@ -20,12 +20,12 @@ https://github.com/joaotavora/eglot/issues/1234. * Changes in Eglot 1.12.29 (Eglot bundled with Emacs 29.1) -** Eglot can upgrade itself to the latest version. +** Eglot has a new command to upgrade to the latest version. -The new command 'eglot-upgrade-eglot' works around behaviour in the -existing 'package-install' command and the new 'package-upgrade' -command which would prevent the user from easily grabbing the latest -version as usual. +The new command 'eglot-upgrade-eglot' allows easily grabbing the +latest version of Eglot from ELPA. This might be more convenient than +using the more general command 'package-install', which by default +will not upgrade "built-in" packages, those that come with Emacs. ** LSP inlay hints are now supported. Inlay hints are small text annotations not unlike diagnostics, but