From 3fbe6fd367ddb337a25ff261502e2e8dccb69649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Tue, 12 Oct 2021 16:50:46 +0100 Subject: [PATCH 1/9] ; Fix mistakes in last doc rewording about shorthands bug#51089 1. The 'punctuation' syntax class is actually empty in Emacs Lisp. The class used in the implementation is 'symbol constituents'; 2) The prefix to escape shorthands is '#_' together, not '#' or '_'. * doc/lispref/symbols.texi (Shorthands): Fix exception. --- doc/lispref/symbols.texi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/lispref/symbols.texi b/doc/lispref/symbols.texi index 32590d4f99e..b30a16927ec 100644 --- a/doc/lispref/symbols.texi +++ b/doc/lispref/symbols.texi @@ -742,12 +742,12 @@ There are two exceptions to rules governing Shorthand transformations: @itemize @bullet @item -Symbol forms comprised entirely of symbol and punctuation characters -(@pxref{Syntax Class Table}) are not transformed. For example, -it's possible to use @code{-} or @code{/=} as shorthand prefixes, but -that won't shadow the arithmetic @emph{functions} of those names. +Symbol forms comprised entirely of characters in the Emacs Lisp symbol +constituent class (@pxref{Syntax Class Table}) are not transformed. +For example, it's possible to use @code{-} or @code{/=} as shorthand +prefixes, but that won't shadow the arithmetic @emph{functions} of +those names. @item -Symbol forms whose names start with @samp{#} or @samp{_} are not -transformed. +Symbol forms whose names start with @samp{#_} are not transformed. @end itemize From 56d1f42f3007c9b4be8ddb6322e8e2ed21d5da95 Mon Sep 17 00:00:00 2001 From: Gregory Heytings Date: Tue, 12 Oct 2021 12:50:21 +0000 Subject: [PATCH 2/9] Improve handling of non-character events in input methods * lisp/international/quail.el (quail-add-unread-command-events): Handle non-vector event arguments. Fixes bug#51118. --- lisp/international/quail.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 50ff307b73a..ee935b11ec0 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -1382,6 +1382,8 @@ a cons cell of the form (no-record . KEY). If KEY is a vector of events, the events in the vector are prepended to `unread-command-events', after converting each event to a cons cell of the form (no-record . EVENT). +If KEY is an event, it is prepended to `unread-command-events' as a cons +cell of the form (no-record . EVENT). If RESET is non-nil, the events in `unread-command-events' are first discarded, i.e. in this case KEY will end up being the only key in `unread-command-events'." @@ -1390,7 +1392,7 @@ in `unread-command-events'." (if (characterp key) (cons (cons 'no-record key) unread-command-events) (append (mapcan (lambda (e) (list (cons 'no-record e))) - (append key nil)) + (append (if (vectorp key) key (vector key)) nil)) unread-command-events)))) (defun quail-start-translation (key) From ebeaa54f1986b6414c6af60660dc6bd53cbf3bf9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 12 Oct 2021 11:54:32 -0700 Subject: [PATCH 3/9] Pacify GCC 11 -fanalyzer on x86-64 * src/buffer.c (fix_overlays_before): Redo slightly to work around GCC bug 102692 . --- src/buffer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/buffer.c b/src/buffer.c index f405bcb5834..eca2843e2bc 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -3843,7 +3843,9 @@ fix_overlays_before (struct buffer *bp, ptrdiff_t prev, ptrdiff_t pos) or the found one ends before PREV, or the found one is the last one in the list, we don't have to fix anything. */ - if (!tail || end < prev || !tail->next) + if (!tail) + return; + if (end < prev || !tail->next) return; right_pair = parent; From f223ac6ef92b7cf69048c81ff58b5c983c7d25da Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 12 Oct 2021 17:10:46 -0700 Subject: [PATCH 4/9] Fix test bug when calloc returns null MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test/src/emacs-module-resources/mod-test.c (Fmod_test_userptr_make): Don’t dump core if calloc returns null and signal_errno returns. --- test/src/emacs-module-resources/mod-test.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/src/emacs-module-resources/mod-test.c b/test/src/emacs-module-resources/mod-test.c index 5720af8c605..4c0b168e34d 100644 --- a/test/src/emacs-module-resources/mod-test.c +++ b/test/src/emacs-module-resources/mod-test.c @@ -298,7 +298,10 @@ Fmod_test_userptr_make (emacs_env *env, ptrdiff_t nargs, emacs_value args[], { struct super_struct *p = calloc (1, sizeof *p); if (!p) - signal_errno (env, "calloc"); + { + signal_errno (env, "calloc"); + return NULL; + } p->amazing_int = env->extract_integer (env, args[0]); return env->make_user_ptr (env, free, p); } From 4e9452a399c878ab110811b4f890c350d3cb9c36 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Wed, 13 Oct 2021 05:00:10 +0200 Subject: [PATCH 5/9] Improve shortdoc for vector * lisp/emacs-lisp/shortdoc.el (vector): Improve shortdoc with titles. Add mapc. Fix typo where 'seq-reduce' is incorrectly written as 'reduce'. --- lisp/emacs-lisp/shortdoc.el | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el index 25bd17bdb96..17ac3e471c0 100644 --- a/lisp/emacs-lisp/shortdoc.el +++ b/lisp/emacs-lisp/shortdoc.el @@ -647,10 +647,12 @@ There can be any number of :example/:result elements." (define-short-documentation-group vector + "Making Vectors" (make-vector :eval (make-vector 5 "foo")) (vector :eval (vector 1 "b" 3)) + "Operations on Vectors" (vectorp :eval (vectorp [1]) :eval (vectorp "1")) @@ -660,13 +662,16 @@ There can be any number of :example/:result elements." :eval (append [1 2] nil)) (length :eval (length [1 2 3])) - (mapcar - :eval (mapcar #'identity [1 2 3])) - (reduce - :eval (reduce #'+ [1 2 3])) + (seq-reduce + :eval (seq-reduce #'+ [1 2 3] 0)) (seq-subseq :eval (seq-subseq [1 2 3 4 5] 1 3) - :eval (seq-subseq [1 2 3 4 5] 1))) + :eval (seq-subseq [1 2 3 4 5] 1)) + "Mapping Over Vectors" + (mapcar + :eval (mapcar #'identity [1 2 3])) + (mapc + :eval (mapc #'insert ["1" "2" "3"]))) (define-short-documentation-group regexp "Matching Strings" From 3eac7dc780433e2eab046e83315f1d90caf3cab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20M=C3=BCnster?= Date: Tue, 12 Oct 2021 14:31:58 +0200 Subject: [PATCH 6/9] Fix point movement in image-dired * lisp/image-dired.el (image-dired-thumb-file-marked-p): Don't move point in associated dired buffer. (image-dired-delete-marked): Revert "Fix deletion of associated image" because it was wrong and introduced another problem (bug#51152). --- lisp/image-dired.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lisp/image-dired.el b/lisp/image-dired.el index 3ca47300a99..4e6a410c114 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -2314,18 +2314,19 @@ non-nil." (dired-buf (image-dired-associated-dired-buffer))) (when (and dired-buf file-name) (with-current-buffer dired-buf - (when (dired-goto-file file-name) - (image-dired-dired-file-marked-p)))))) + (save-excursion + (when (dired-goto-file file-name) + (image-dired-dired-file-marked-p))))))) (defun image-dired-delete-marked () "Delete current or marked thumbnails and associated images." (interactive) - (with-current-buffer (image-dired-associated-dired-buffer) - (dired-do-delete)) (image-dired--with-marked (image-dired-delete-char) (backward-char)) - (image-dired--line-up-with-method)) + (image-dired--line-up-with-method) + (with-current-buffer (image-dired-associated-dired-buffer) + (dired-do-delete))) (defun image-dired-thumb-update-marks () "Update the marks in the thumbnail buffer." From a338d46060a89ddeb476d030cd0e18a677db8506 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Wed, 13 Oct 2021 13:41:21 +0200 Subject: [PATCH 7/9] Make emacs-lisp-byte-compile-and-load load the .elc file again * lisp/progmodes/elisp-mode.el (emacs-lisp-byte-compile-and-load): Load the compiled file instead of the source (bug#51180). --- lisp/progmodes/elisp-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index c7474b25a78..10a37942571 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -210,7 +210,7 @@ All commands in `lisp-mode-shared-map' are inherited by this map.") (emacs-lisp--before-compile-buffer) (require 'bytecomp) (byte-recompile-file buffer-file-name nil 0) - (load buffer-file-name)) + (load (byte-compile-dest-file buffer-file-name))) (declare-function native-compile "comp") (defun emacs-lisp-native-compile-and-load () From cc796b7409c74992e7b71951c2d9eea24860649a Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Wed, 13 Oct 2021 18:59:10 +0200 Subject: [PATCH 8/9] Tramp doc cleanup * doc/misc/tramp.texi (Overview, Bug Reports) (Frequently Asked Questions): Stylistic changes. (Bug Reports): Mention tramp buffers appended to bug report. --- doc/misc/tramp.texi | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index c2655d6e172..5fdd9a49894 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -290,7 +290,7 @@ file's contents. For external transfers, @value{tramp} sends a command as follows: @example -rcp user@@host:/path/to/remote/file /tmp/tramp.4711 +$ rcp user@@host:/path/to/remote/file /tmp/tramp.4711 @end example @value{tramp} reads the local temporary file @file{/tmp/tramp.4711} into a buffer, and then deletes the temporary file. @@ -4299,7 +4299,7 @@ explicitly, because @command{emacs -Q} ignores installed ELPA packages. Call (version number adapted) @example -emacs -Q -l ~/.emacs.d/elpa/tramp-2.4.5.1/tramp-autoloads +$ emacs -Q -l ~/.emacs.d/elpa/tramp-2.4.5.1/tramp-autoloads @end example When including @value{tramp}'s messages in the bug report, increase @@ -4311,6 +4311,11 @@ non-@acronym{ASCII} characters which are relevant for analysis, append the buffers as attachments to the bug report. This is also needed in order to avoid line breaks during mail transfer. +If you send the message from Emacs, you are asked about to append +these buffers to the bug report. If you use an external mail program, +you must save these buffers to files, and append them with that mail +program. + @strong{Note} that a verbosity level greater than 6 is not necessary at this stage. Also note that a verbosity level of 6 or greater, the contents of files and directories will be included in the debug @@ -5104,7 +5109,7 @@ location. Then start Emacs Client from the command line: @example -emacsclient @trampfn{ssh,user@@host,/file/to/edit} +$ emacsclient @trampfn{ssh,user@@host,/file/to/edit} @end example @code{user} and @code{host} refer to the local host. @@ -5124,7 +5129,7 @@ Then change the environment variable @env{EDITOR} to point to the wrapper script: @example -export EDITOR=/path/to/emacsclient.sh +$ export EDITOR=/path/to/emacsclient.sh @end example From efb1cd7fa9f1a71ad3bf34627fe678acfcb48b38 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 13 Oct 2021 20:02:23 +0300 Subject: [PATCH 9/9] ; * etc/charsets/README: Update the format documentation. --- etc/charsets/README | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etc/charsets/README b/etc/charsets/README index 0045a0f638e..96cba7c6139 100644 --- a/etc/charsets/README +++ b/etc/charsets/README @@ -27,7 +27,9 @@ character code separated by a space. Both code points and Unicode character codes are in hexadecimal preceded by "0x". Comments may be used, starting with "#". Code ranges may also be used, with (inclusive) start and end code points separated by "-" followed by the -Unicode of the start of the range +Unicode of the start of the range. +Code points for which there's no mapping to Unicode should be skipped, +i.e. their lines should be omitted. Examples: 0xA0 0x00A0 # no-break space