commit a8169bee2064282a40214ef65ef0493233ed4669 (HEAD, refs/remotes/origin/master) Author: Manuel Giraud Date: Fri Nov 29 16:35:47 2024 +0100 Fix exiting Emacs after saving a tutorial * lisp/tutorial.el (tutorial--lang) (tutorial--point-before-chkeys): Add both variables as permanent-local, so that saving the tutorial to some file doesn't kill these buffer-local variables. Otherwise, trying to exit Emacs after saving the tutorial will signal an error, because 'tutorial--lang' is nil. (Bug#74364) diff --git a/lisp/tutorial.el b/lisp/tutorial.el index d754db238de..86537d995fe 100644 --- a/lisp/tutorial.el +++ b/lisp/tutorial.el @@ -650,7 +650,12 @@ with some explanatory links." (delete-region prop-start prop-end)))))) (defvar tutorial--starting-point) + +;; For when the user saves the TUTORIAL to a file. (put 'tutorial--starting-point 'permanent-local t) +(put 'tutorial--lang 'permanent-local t) +(put 'tutorial--point-before-chkeys 'permanent-local t) + (defun tutorial--save-on-kill () "Query the user about saving the tutorial when killing Emacs." (when (buffer-live-p tutorial--buffer) commit d06a0153ced177ab41e578baac4b26667f337b58 Author: Eli Zaretskii Date: Sat Nov 30 06:47:12 2024 -0500 ; * etc/NEWS.30: Fix merge problem. diff --git a/etc/NEWS.30 b/etc/NEWS.30 index 9f60ec7e6c3..3d691cfac40 100644 --- a/etc/NEWS.30 +++ b/etc/NEWS.30 @@ -103,6 +103,36 @@ collections of snippets automatically apply to the new Tree-Sitter modes. Note that those modes still do not inherit from the non-TS mode, so configuration settings installed via mode hooks are not affected. +Loading a Tree-Sitter mode (such as by using 'M-x load-library' or with +'M-x load-file') by default causes the corresponding non-Tree-Sitter +mode be remapped to the Tree-Sitter mode. This remapping affects +visiting files for which 'auto-mode-alist' specifies a non-Tree-Sitter +mode, and also affects mode-specification cookies on the first line of a +file and mode specifications in file- and directory-local variables. To +revert to using a non-Tree-Sitter mode, reload the corresponding mode +file anew. To prevent file loading from turning on Tree-Sitter mode +when 'auto-mode-alist' or the file/directory-local variables specify a +non-Tree-Sitter mode, customize the user option 'major-mode-remap-alist' +to specify that a non-Tree-Sitter mode is "remapped" to itself. For +example: + + (add-to-list 'major-mode-remap-alist '(c-mode)) + +specifies that C Mode should not be remapped to 'c-ts-mode' even if and +when 'c-ts-mode' is loaded. Conversely, + + (add-to-list 'major-mode-remap-alist '(c-mode . c-ts-mode)) + +tells Emacs to always invoke 'c-ts-mode' whenever 'c-mode' is +requested, either by 'auto-mode-alist' or by file/directory-local +variables. + +We recommend using 'major-mode-remap-alist' to express your preferences +for using Tree-Sitter or non-Tree-Sitter modes for files for which both +variants of major modes are available, because that variable overrides +the remapping Emacs might decide to perform as result of loading Lisp +files and features. + --- ** Mouse wheel events should now always be 'wheel-up/down/left/right'. At those places where the old 'mouse-4/5/6/7' events could still occur commit 88f6b045f482d5d842eaed1d7e949e488e8cedd1 Merge: 82bdb3bfd03 afb34a3b239 Author: Eli Zaretskii Date: Sat Nov 30 06:44:06 2024 -0500 Merge from origin/emacs-30 afb34a3b239 ; Improve documentation of ':box' face attribute b38eb6da1d1 Fix docstring of c-ts-mode-indent-style 9fdb764898d Support PHP 8.4 and more reliable indentation (bug#74525) bda0bce9e43 Don't inadvertently reset frame scroll bar sizes (Bug#74435) 3f99cdaf26d Mention special variables in lexical binding documentation 0ef0f18f163 Allow to go back to using 'ruby-mode' after loading 'ruby... fc17e8727d4 Delete obsolete section in admin/notes/repo 3e396b2c5bb Improve documentation for 'while-let' 50b91ed458d Remove mention of treesit-defun-prefer-top-level (bug#74474) 03ae07291e8 Fix NS non-native fullscreen on initial frame load (bug#5... 8261d7224d3 Fix user options for listing and marking diary files # Conflicts: # lisp/progmodes/c-ts-mode.el commit 82bdb3bfd035577a43afdf1eafd18ee1a60a987c Merge: ffa9ad5c1fe 6f6a92624e9 Author: Eli Zaretskii Date: Sat Nov 30 06:35:29 2024 -0500 ; Merge from origin/emacs-30 The following commit was skipped: 6f6a92624e9 Avoid loading 'rx' at runtime in 'lua-ts-mode' commit ffa9ad5c1fe732c933e12a7aa65452810ea1eced Merge: 7c90ffcf869 d9531793206 Author: Eli Zaretskii Date: Sat Nov 30 06:35:16 2024 -0500 Merge from origin/emacs-30 d9531793206 Make 'jsonrpc-default-request-timeout' a defcustom 5339c6f69ee ; Improve example of display-buffer-alist category in ELi... e14007ad631 Update MS-Windows build instructions # Conflicts: # etc/NEWS commit 7c90ffcf8698a55229c47845dbdb2dc6cfa9bb6f Author: Eli Zaretskii Date: Sat Nov 30 12:55:19 2024 +0200 ; * src/charset.c (Fmap_charset_chars): Fix last change (bug#74555). diff --git a/src/charset.c b/src/charset.c index 37d08f249c7..499782011a2 100644 --- a/src/charset.c +++ b/src/charset.c @@ -819,7 +819,7 @@ TO-CODE, which are CHARSET code points. */) from = CHARSET_MIN_CODE (cs); else { - CHECK_FIXNAT(from_code); + CHECK_FIXNAT (from_code); from = XFIXNUM (from_code); if (from < CHARSET_MIN_CODE (cs)) from = CHARSET_MIN_CODE (cs); @@ -828,7 +828,7 @@ TO-CODE, which are CHARSET code points. */) to = CHARSET_MAX_CODE (cs); else { - CHECK_FIXNAT(to_code); + CHECK_FIXNAT (to_code); to = XFIXNUM (to_code); if (to > CHARSET_MAX_CODE (cs)) to = CHARSET_MAX_CODE (cs); commit 2125e188ad806134dfc81408822208d75d7f3b5a Author: altermo <107814000+altermo@users.noreply.github.com> Date: Wed Nov 27 10:37:28 2024 +0100 Add more error-checking to Fmap_charset_chars * src/charset.c (Fmap_charset_chars): Signal an error if FROM_CODE or TO_CODE is non-nil and not a fixnum. (Bug#74555) Copyright-paperwork-exempt: yes diff --git a/src/charset.c b/src/charset.c index f7d80cc3f3e..37d08f249c7 100644 --- a/src/charset.c +++ b/src/charset.c @@ -819,6 +819,7 @@ TO-CODE, which are CHARSET code points. */) from = CHARSET_MIN_CODE (cs); else { + CHECK_FIXNAT(from_code); from = XFIXNUM (from_code); if (from < CHARSET_MIN_CODE (cs)) from = CHARSET_MIN_CODE (cs); @@ -827,6 +828,7 @@ TO-CODE, which are CHARSET code points. */) to = CHARSET_MAX_CODE (cs); else { + CHECK_FIXNAT(to_code); to = XFIXNUM (to_code); if (to > CHARSET_MAX_CODE (cs)) to = CHARSET_MAX_CODE (cs); commit afb34a3b2393decb50e250ed8caa559b64020379 Author: Eli Zaretskii Date: Sat Nov 30 12:44:01 2024 +0200 ; Improve documentation of ':box' face attribute * doc/lispref/display.texi (Face Attributes): Describe a subtlety of displaying ':box'. (Bug#74536) diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 11faf1dc9a0..5ecca832b68 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -2803,7 +2803,11 @@ being pressed. If it is @code{pressed-button}, the box looks like a If you use the @code{:box} face attribute on strings displayed instead of buffer text via the @code{display} text property, special considerations might apply if the surrounding buffer text also has the -@code{:box} face attribute. @xref{Replacing Specs}. +@code{:box} face attribute. @xref{Replacing Specs}. Also note that the +vertical lines of the box are only drawn when @code{:box} attribute +changes from @code{nil} to non-@code{nil} or vice versa; two consecutive +face properties with a non-@code{nil} @code{:box} attribute will be +displayed without the vertical line between them. @item :inverse-video Whether or not characters should be displayed in inverse video. The commit 8ef44ca64eb40485751207096ee69930895364d9 Author: Eli Zaretskii Date: Sat Nov 30 12:34:40 2024 +0200 ; Improve commentary of last change. diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 04d995d0404..3aa0f0919bc 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -301,7 +301,7 @@ naming the shell." "^\\s-*\\([[:alpha:]_][[:alnum:]_]*\\)\\s-*()" 1))) ;; The difference between the Bash regular expression and the sh regular - ;; expression is that Bash also allows hyphens (-). + ;; expression is that Bash also allows hyphens (-) in function names. (bash . ((nil ;; function FOO commit 2ea0919550366babfea1de6468ef9e8b1857b478 Author: James Cherti Date: Sun Nov 24 12:09:33 2024 -0500 Support hyphen in Bash function names * lisp/progmodes/sh-script.el (sh-imenu-generic-expression): Add hyphen to function-name regexp. Copyright-paperwork-exempt: yes diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 8ba64100203..04d995d0404 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -300,6 +300,18 @@ naming the shell." (nil "^\\s-*\\([[:alpha:]_][[:alnum:]_]*\\)\\s-*()" 1))) + ;; The difference between the Bash regular expression and the sh regular + ;; expression is that Bash also allows hyphens (-). + (bash + . ((nil + ;; function FOO + ;; function FOO() + "^\\s-*function\\s-+\\([[:alpha:]_][[:alnum:]_-]*\\)\\s-*\\(?:()\\)?" + 1) + ;; FOO() + (nil + "^\\s-*\\([[:alpha:]_][[:alnum:]_-]*\\)\\s-*()" + 1))) (mksh . ((nil ;; function FOO commit b38eb6da1d164b50f4b727b2539cf02c40b73123 Author: Yuan Fu Date: Fri Nov 29 21:11:19 2024 -0800 Fix docstring of c-ts-mode-indent-style * lisp/progmodes/c-ts-mode.el (c-ts-mode-indent-style): Make the docstring reflect what's expected by the code. diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index 31f822b219d..e08e99cf087 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -147,10 +147,11 @@ symbol." (defcustom c-ts-mode-indent-style 'gnu "Style used for indentation. -The selected style could be one of GNU, K&R, LINUX or BSD. If -one of the supplied styles doesn't suffice, the value could be -a function instead. This function is expected to return a list -that follows the form of `treesit-simple-indent-rules'." +The selected style could be one of GNU, K&R, LINUX or BSD. If the +supplied styles don't suffice, the value could be a function instead. +This function takes no arguments and is expected to return a list of +indent RULEs as described in `treesit-simple-indent-rules'. Note that +the list of RULEs doesn't need to contain the language symbol." :version "29.1" :type '(choice (symbol :tag "Gnu" gnu) (symbol :tag "K&R" k&r) commit 9fdb764898dd4f40f562f8540767a18c827fe7d3 Author: Vincenzo Pupillo Date: Mon Nov 25 11:06:02 2024 +0100 Support PHP 8.4 and more reliable indentation (bug#74525) Added support for PHP 8.4 property hook. More reliable CSS and Javascript syntax indentation when there are attributes in