From c0a913ea4f3445567ded55da7cd8436a4b872276 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 8 Jun 2025 18:43:20 +0300 Subject: [PATCH 1/5] ; * doc/lispref/modes.texi (Font Lock Basics): Remove old info (bug#78720). --- doc/lispref/modes.texi | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 3a6b163c81c..421ec136c7c 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -3263,10 +3263,7 @@ Lock mode is enabled, to set all the other variables. @defvar font-lock-defaults This variable is set by modes to specify how to fontify text in that mode. It automatically becomes buffer-local when set. If its value -is @code{nil}, Font Lock mode does no highlighting, and you can use -the @samp{Faces} menu (under @samp{Edit} and then @samp{Text -Properties} in the menu bar) to assign faces explicitly to text in the -buffer. +is @code{nil}, Font Lock mode does no highlighting. If non-@code{nil}, the value should look like this: From 888f846d377a589c6fca5be5d2f4274f423e5fcf Mon Sep 17 00:00:00 2001 From: Pip Cet Date: Tue, 10 Jun 2025 12:00:30 +0000 Subject: [PATCH 2/5] Fix crash when evaluating "(signal nil 5)" (bug#78738) The docstring already warns against calling signal with a nil error symbol, which is for internal use only, but we can avoid crashing in this case. * src/eval.c (Fsignal): Produce a "peculiar error" for more arguments involving non-lists. --- src/eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eval.c b/src/eval.c index caae4cb17e2..ecff5d40a10 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1817,7 +1817,7 @@ See also the function `condition-case'. */ (Lisp_Object error_symbol, Lisp_Object data) { /* If they call us with nonsensical arguments, produce "peculiar error". */ - if (NILP (error_symbol) && NILP (data)) + if (NILP (error_symbol) && !CONSP (data)) error_symbol = Qerror; signal_or_quit (error_symbol, data, false); eassume (false); From 941158fc133f9722abbca8b89a0a346230b83998 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Tue, 10 Jun 2025 22:55:58 -0700 Subject: [PATCH 3/5] Support new tree-sitter grammar filename format (bug#78754) Previously Emacs only looks for filenames like libtree-sitter-json.so.0.0. Now Emacs also look for filenames like libtree-sitter-json.so.15.0. * src/treesit.c: (treesit_load_language_push_for_each_suffix): Add versioned candidate to candidate list too. --- src/treesit.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/treesit.c b/src/treesit.c index 3a0e9674f65..45d1bc58b06 100644 --- a/src/treesit.c +++ b/src/treesit.c @@ -603,14 +603,29 @@ treesit_load_language_push_for_each_suffix (Lisp_Object lib_base_name, Lisp_Object candidate1 = concat2 (lib_base_name, XCAR (suffixes)); #ifndef WINDOWSNT /* On Posix hosts, support libraries named with ABI version - numbers. In the foreseeable future we only need to support - version 0.0. For more details, see + numbers. Originally tree-sitter grammars are always versioned + at 0.0, so we first try that. For more details, see https://lists.gnu.org/archive/html/emacs-devel/2023-04/msg00386.html. */ Lisp_Object candidate2 = concat2 (candidate1, Vtreesit_str_dot_0); Lisp_Object candidate3 = concat2 (candidate2, Vtreesit_str_dot_0); *path_candidates = Fcons (candidate3, *path_candidates); *path_candidates = Fcons (candidate2, *path_candidates); + + /* Since 2025, tree-sitter grammars use their supported + TREE_SITTER_LANGUAGE_VERSION as the major version. So we need + to try all the version supported by the tree-sitter library + too. (See bug#78754) */ + for (int version = TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION; + version <= TREE_SITTER_LANGUAGE_VERSION; + version++) + { + char ext[16]; // 16 should be enough until the end of universe. + snprintf ((char *) &ext, 16, ".%d.0", version); + Lisp_Object versioned_candidate = concat2 (candidate1, + build_string (ext)); + *path_candidates = Fcons (versioned_candidate, *path_candidates); + } #endif *path_candidates = Fcons (candidate1, *path_candidates); } From 1bed29495836dab96fe642dbd6f4c1625c50b12a Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Tue, 10 Jun 2025 09:48:20 +0200 Subject: [PATCH 4/5] * lisp/keymap.el (keymap-set): Refer to 'key-description'. (Bug#78714) --- lisp/keymap.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/keymap.el b/lisp/keymap.el index b2c7321a1d5..173600f4d4b 100644 --- a/lisp/keymap.el +++ b/lisp/keymap.el @@ -60,7 +60,11 @@ DEFINITION is anything that can be a key's definition: keymap has been created with a menu name, see `make-keymap'), or a cons (MAP . CHAR), meaning use definition of CHAR in keymap MAP, or an extended menu item definition. - (See info node `(elisp)Extended Menu Items'.)" + (See info node `(elisp)Extended Menu Items'.) + +The `key-description' convenience function converts a simple +string of characters to an equivalent form that is acceptable for +COMMAND." (declare (compiler-macro (lambda (form) (keymap--compile-check key) form))) (keymap--check key) ;; If we're binding this key to another key, then parse that other From df3fb94f09143285980348a3c6264ace913d3c73 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 11 Jun 2025 15:23:32 +0100 Subject: [PATCH 5/5] Insert missing step to make use of directory tracking OSC codes * doc/emacs/misc.texi (Interactive Shell): Say to add comint-osc-process-output to comint-output-filter-function. --- doc/emacs/misc.texi | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index c35afcf802c..4782fe673e0 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -955,6 +955,13 @@ at each prompt, for instance with the following command: printf "\e]7;file://%s%s\e\\" "$HOSTNAME" "$PWD" @end example +@noindent +Then tell Emacs to process the escape codes: + +@lisp +(add-hook 'comint-output-filter-functions #'comint-osc-process-output) +@end lisp + @vindex explicit-shell-file-name @cindex environment variables for subshells @cindex @env{ESHELL} environment variable @@ -1188,7 +1195,7 @@ supports some extend escape codes, like some of the @acronym{OSC} (Operating System Codes) if you put the following in your init file: @lisp -(add-hook 'comint-output-filter-functions 'comint-osc-process-output) +(add-hook 'comint-output-filter-functions #'comint-osc-process-output) @end lisp With this enabled, the output from, for instance, @code{ls