From a6abb88fdcc71f2959c95ee5cda57c28719c5a0a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 12 Mar 2025 14:53:03 +0200 Subject: [PATCH 1/6] ; * lisp/files.el (executable-find): Doc fix. --- lisp/files.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index 79dbe5ad53e..2707a4e8bbe 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1286,9 +1286,9 @@ the value of the variable `exec-path'." (defun executable-find (command &optional remote) "Search for COMMAND in `exec-path' and return the absolute file name. -Return nil if COMMAND is not found anywhere in `exec-path'. If -REMOTE is non-nil, search on the remote host indicated by -`default-directory' instead." +Return nil if COMMAND is not found anywhere in `exec-path'. +If REMOTE is non-nil, search on a remote host if `default-directory' is +remote, otherwise search locally." (if (and remote (file-remote-p default-directory)) (let ((res (locate-file command From f729828bcfbca8e972467ace85dd32744e4dd6de Mon Sep 17 00:00:00 2001 From: Jeremy Bryant Date: Sun, 9 Mar 2025 22:25:03 +0000 Subject: [PATCH 2/6] ; Add texinfo reference to GNU Coding Standards. * doc/emacs/trouble.texi (Coding Standards): Add texinfo reference to GNU Coding Standards manual. (Bug#76901) --- doc/emacs/trouble.texi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index 2211369b121..45f15c7dd0d 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -1494,9 +1494,10 @@ the Emacs Lisp Reference Manual @subsection Coding Standards @cindex coding standards for Emacs submissions -Contributed code should follow the GNU Coding Standards -@url{https://www.gnu.org/prep/standards/}. This may also be available -in info on your system. +Contributed code should follow the GNU Coding Standards. This manual +is available online at @url{https://www.gnu.org/prep/standards/}. It +may also be available locally in Info on your system, see @pxref{Top,,, +standards, GNU Coding Standards}. If it doesn't, we'll need to find someone to fix the code before we can use it. From f8443dffc1fd2bc4b561b94c21cda887d2936d63 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 13 Mar 2025 10:14:07 +0200 Subject: [PATCH 3/6] ; * lisp/register.el (register-use-preview): Doc fix (bug#76739). --- lisp/register.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/register.el b/lisp/register.el index 373d7e54550..e802617025a 100644 --- a/lisp/register.el +++ b/lisp/register.el @@ -129,11 +129,11 @@ description of the argument. The function to use is set according to the value of `register--read-with-preview-function'.") (defcustom register-use-preview 'traditional - "Whether to show register preview when modifying registers. + "Whether register commands show preview of registers with non-nil values. When set to t, show a preview buffer with navigation and highlighting. -When set `insist', behave as with t, but allow exiting the minibuffer by +When set to `insist', behave as with t, but allow exiting the minibuffer by pressing the register name a second time. For example, press \\`a' to select register \"a\", then press \\`a' again to exit the minibuffer. From 04034cd9ce746e3914daa66add34c66ad2db032d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 13 Mar 2025 12:34:23 +0200 Subject: [PATCH 4/6] Fix 'dired-movement-style' in Dired when subdirs are shown * lisp/dired.el (dired--move-to-next-line): Don't consider sub-directory lines as empty. (Bug#76596) --- lisp/dired.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lisp/dired.el b/lisp/dired.el index 90d944c5dd4..17c8ba5f123 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -2888,15 +2888,19 @@ is controlled by `dired-movement-style'." (setq wrapped t)) ;; `bounded': go back to the last non-empty line. (dired-movement-style ; Either 'bounded or anything else non-nil. - (while (and (dired-between-files) (not (zerop arg))) + (while (and (dired-between-files) + (not (dired-get-subdir)) + (not (zerop arg))) (funcall jumpfun (- moving-down)) ;; Point not moving means infinite loop. (if (= old-position (point)) (setq arg 0) (setq old-position (point)))) ;; Encountered a boundary, so let's stop movement. - (setq arg (if (dired-between-files) 0 moving-down))))) - (unless (dired-between-files) + (setq arg (if (and (dired-between-files) + (not (dired-get-subdir))) + 0 moving-down))))) + (unless (and (dired-between-files) (not (dired-get-subdir))) ;; Has moved to a non-empty line. This movement does ;; make sense. (cl-decf arg moving-down)) From 20ac26e6751664b08636d16e515abfa1b8419a2d Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Thu, 13 Mar 2025 13:36:19 +0100 Subject: [PATCH 5/6] ; Fix with-delayed-message docstring metavars. --- lisp/subr.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/subr.el b/lisp/subr.el index 42706397674..87a06575de7 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -7343,7 +7343,7 @@ not a list, return a one-element list containing OBJECT." The MESSAGE form will be evaluated immediately, but the resulting string will be displayed only if BODY takes longer than TIMEOUT seconds. -\(fn (timeout message) &rest body)" +\(fn (TIMEOUT MESSAGE) &rest BODY)" (declare (indent 1)) `(funcall-with-delayed-message ,(car args) ,(cadr args) (lambda () From defc55bb6f954276a1cb9e3b5c50251ba5e5b40f Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Thu, 13 Mar 2025 00:33:47 -0700 Subject: [PATCH 6/6] Fix treesit-parser-create behavior regarding indirect buffers The previous fix fixed the problem that treesit-parser-create always use the current buffer, but that introduce another subtle problem: if an indirect buffer creates a parser, the parser saves the base buffer rather than the indirect buffer. In Emacs 29, if you create a parser in an indirect buffer, the parser saves the indirect buffer. This change of behavior breaks some existing use-cases for people using indirect buffer with tree-sitter. In Emacs 31, indirect buffers and base buffer get their own parser list, so this problem doesn't exist anymore. The fix is only for Emacs 30. * src/treesit.c (Ftreesit_parser_create): Use the buffer that's given to treesit-parser-create, even if it's an indirect buffer. --- src/treesit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/treesit.c b/src/treesit.c index f234698defd..3a0e9674f65 100644 --- a/src/treesit.c +++ b/src/treesit.c @@ -1560,6 +1560,9 @@ an indirect buffer. */) CHECK_BUFFER (buffer); buf = XBUFFER (buffer); } + + struct buffer *buffer_given = buf; + if (buf->base_buffer) buf = buf->base_buffer; @@ -1595,7 +1598,7 @@ an indirect buffer. */) /* Create parser. */ Lisp_Object lisp_buf; - XSETBUFFER (lisp_buf, buf); + XSETBUFFER (lisp_buf, buffer_given); Lisp_Object lisp_parser = make_treesit_parser (lisp_buf, parser, NULL, language, tag);