commit 9f03300c5c626bf6f8f839be4943cc20db89c24d (HEAD, refs/remotes/origin/master) Author: Thomas Fitzsimmons Date: Thu Aug 8 22:58:48 2024 -0400 Add PROBLEMS entry for bug#72517 * etc/PROBLEMS (X runtime problems): Document ssh -X session hang-on-exit after deletion of remote emacsclient -c frame. (bug#72517) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 7d7c9ab5f27..4d6927705b1 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -1778,6 +1778,23 @@ happen without any special user interaction, for example, when Emacs restores a saved desktop. A fix is to install version 2.6.8 of FVWM, see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31650. +*** ssh -X session hangs on exit after remote emacsclient -c frame is deleted. + +When Emacs is configured with an X toolkit, for example, +--with-x-toolkit=lucid, and "emacsclient -c" is run over an "ssh -X" +connection, deleting the emacsclient frame (via C-x 5 0 or C-x C-c) can +leave the X display connection open. + +The symptom is that after you delete the "emacsclient -c" frame and then +attempt to exit ssh (with C-d, or "exit"), ssh will hang before +returning you to the local shell. You will have to press C-c (to sever +the X connection) before ssh returns you to your local shell (that is, +the shell from which you invoked "ssh -X"). + +To avoid this issue configure Emacs with --with-x-toolkit=no. + +See . + ** General X problems *** Redisplay using X is much slower than previous Emacs versions. commit 3896f5034f4b8a82c0b4f8dd1b7c579c2e723fa9 Merge: 007ccba141a 16462b1a62d Author: Po Lu Date: Fri Aug 9 10:12:26 2024 +0800 Merge from savannah/emacs-30 16462b1a62d Register for more Intents actions on Android commit 007ccba141ae93d05cff8e0c794a92f152657594 Merge: 673c5e4abcb a1b8c2610a4 Author: Po Lu Date: Fri Aug 9 10:12:08 2024 +0800 Merge from savannah/emacs-30 a1b8c2610a4 * lisp/help-macro.el: Add 'help-for-help-use-variable-pit... a577eccdbbc ; * doc/lispref/strings.texi (String Conversion): Fix las... d22e52375a6 Remove manual entry for string-to-int 341e5795d5d Support minibuffer-visible-completions in completing-read... 3e30c779a70 * lisp/imenu.el (imenu-flatten): Fix doc about annotation... commit 673c5e4abcb77f1e7153d84e8757401580f25cda Merge: 8b662047074 09d2125a7fd Author: Po Lu Date: Fri Aug 9 10:12:08 2024 +0800 ; Merge from savannah/emacs-30 The following commit was skipped: 09d2125a7fd Fix cmake-ts-mode number fontification (Bug#72228) commit 16462b1a62d04a726f99f275b37fd3e6fd512202 Author: Po Lu Date: Fri Aug 9 10:11:47 2024 +0800 Register for more Intents actions on Android * java/AndroidManifest.xml.in : Register for SEND Intents with mailto URIs. * java/org/gnu/emacs/EmacsOpenActivity.java (onCreate): Use Intent constants rather than string literals. diff --git a/java/AndroidManifest.xml.in b/java/AndroidManifest.xml.in index f3bab2c1b76..df00e497f8f 100644 --- a/java/AndroidManifest.xml.in +++ b/java/AndroidManifest.xml.in @@ -270,6 +270,7 @@ along with GNU Emacs. If not, see . --> + diff --git a/java/org/gnu/emacs/EmacsOpenActivity.java b/java/org/gnu/emacs/EmacsOpenActivity.java index 28e1e261821..366283168dd 100644 --- a/java/org/gnu/emacs/EmacsOpenActivity.java +++ b/java/org/gnu/emacs/EmacsOpenActivity.java @@ -422,11 +422,11 @@ private class EmacsClientThread extends Thread /* Now see if the action specified is supported by Emacs. */ - if (action.equals ("android.intent.action.VIEW") - || action.equals ("android.intent.action.EDIT") - || action.equals ("android.intent.action.PICK") - || action.equals ("android.intent.action.SEND") - || action.equals ("android.intent.action.SENDTO")) + if (action.equals (Intent.ACTION_VIEW) + || action.equals (Intent.ACTION_EDIT) + || action.equals (Intent.ACTION_PICK) + || action.equals (Intent.ACTION_SEND) + || action.equals (Intent.ACTION_SENDTO)) { /* Obtain the URI of the action. */ uri = intent.getData (); commit 8b662047074f7413c280c9092d1c39763f8b0e5b Author: Michael Albinus Date: Thu Aug 8 17:29:40 2024 +0200 Fix problem in tramp-container.el * lisp/net/tramp-container.el (tramp-kubernetes--context-namespace): Handle nil list elements. diff --git a/lisp/net/tramp-container.el b/lisp/net/tramp-container.el index 57c34a1b8e4..fd82e4516b8 100644 --- a/lisp/net/tramp-container.el +++ b/lisp/net/tramp-container.el @@ -419,10 +419,11 @@ Obey `tramp-kubernetes-context'" "The kubectl options for context and namespace as string." (mapconcat #'identity - `(,(when-let ((context (tramp-kubernetes--current-context vec))) - (format "--context=%s" context)) - ,(when-let ((namespace (tramp-kubernetes--namespace vec))) - (format "--namespace=%s" namespace))) + (delq nil + `(,(when-let ((context (tramp-kubernetes--current-context vec))) + (format "--context=%s" context)) + ,(when-let ((namespace (tramp-kubernetes--namespace vec))) + (format "--namespace=%s" namespace)))) " ")) ;;;###tramp-autoload commit a1b8c2610a4d0cc99088c024e884495b26a17fa8 Author: Paul W. Rankin Date: Thu Aug 8 12:16:07 2024 +1000 * lisp/help-macro.el: Add 'help-for-help-use-variable-pitch' option. This makes 'variable-pitch-mode' optional, by default ON (to preserve previous behavior), in Help buffers. (Bug#72521) diff --git a/lisp/help-macro.el b/lisp/help-macro.el index 8a16e85a329..2e4d9fbb2e9 100644 --- a/lisp/help-macro.el +++ b/lisp/help-macro.el @@ -78,6 +78,12 @@ gives the window that lists the options." :type 'boolean :group 'help) +(defcustom help-for-help-use-variable-pitch t + "If non-nil, `help-for-help' should use `variable-pitch-mode'." + :type 'boolean + :version "30.1" + :group 'help) + (defmacro make-help-screen (fname help-line help-text helped-map &optional buffer-name) "Construct help-menu function name FNAME. @@ -146,7 +152,8 @@ and then returns." (insert (substitute-command-keys help-screen))) (let ((minor-mode-map-alist new-minor-mode-map-alist)) (help-mode) - (variable-pitch-mode) + (when help-for-help-use-variable-pitch + (variable-pitch-mode)) (setq new-minor-mode-map-alist minor-mode-map-alist)) (goto-char (point-min)) (while (or (memq char (append help-event-list commit a577eccdbbcf52ebb2096083cee80846d7ac832d Author: Eli Zaretskii Date: Thu Aug 8 11:41:52 2024 +0300 ; * doc/lispref/strings.texi (String Conversion): Fix last change. diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index e68c666c310..7f1214cabb5 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -888,6 +888,7 @@ interpreted as a number, this function returns 0. (string-to-number "1e5") @result{} 100000.0 @end example +@end defun @defun char-to-string character @cindex character to string commit d22e52375a6a87e654a7b3d80e27f30d229f0edf Author: Ulrich Müller Date: Thu Aug 8 07:47:50 2024 +0200 Remove manual entry for string-to-int * doc/lispref/strings.texi (String Conversion): Remove mention of 'string-to-int' which was dropped in Emacs 26. (Bug#72520) diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 09ab93ded27..e68c666c310 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -889,10 +889,6 @@ interpreted as a number, this function returns 0. @result{} 100000.0 @end example -@findex string-to-int -@code{string-to-int} is an obsolete alias for this function. -@end defun - @defun char-to-string character @cindex character to string This function returns a new string containing one character, commit 9464a1d3860f700dced23ae8d8d2b37e277a2382 Author: Paul Eggert Date: Wed Aug 7 23:05:52 2024 -0700 Port zoneinfo-world-style-list to Debian testing Problem reported by Gijs Hillenius in: https://lists.gnu.org/r/emacs-devel/2024-08/msg00279.html * lisp/time.el (zoneinfo-style-world-list): Use Asia/Kolkata instead of Asia/Calcutta. The main name was changed in tzdata 2008b every practical system has it now. Some systems do not include backward-compatibility names, so it is better to use the standard time now. diff --git a/lisp/time.el b/lisp/time.el index 02007d890cb..47d6b4a705d 100644 --- a/lisp/time.el +++ b/lisp/time.el @@ -452,7 +452,7 @@ runs the normal hook `display-time-hook' after each update." ("America/New_York" "New York") ("Europe/London" "London") ("Europe/Paris" "Paris") - ("Asia/Calcutta" "Bangalore") + ("Asia/Kolkata" "Bangalore") ("Asia/Tokyo" "Tokyo")) "Alist of zoneinfo-style time zones and places for `world-clock'. Each element has the form (TIMEZONE LABEL). commit 341e5795d5dbd49db330dda68c8d6040cc07ed63 Author: Spencer Baugh Date: Wed Aug 7 11:18:02 2024 -0400 Support minibuffer-visible-completions in completing-read-multiple All that's required is to add minibuffer-visible-completions-map on top of the completing-read-multiple map; this is the same thing that minibuffer-visible-completions does in completing-read-default. * lisp/emacs-lisp/crm.el (completing-read-multiple): Add minibuffer-visible-completions-map (bug#69189) diff --git a/lisp/emacs-lisp/crm.el b/lisp/emacs-lisp/crm.el index 253dfc6237a..422a8d52dcf 100644 --- a/lisp/emacs-lisp/crm.el +++ b/lisp/emacs-lisp/crm.el @@ -238,6 +238,11 @@ with empty strings removed." (let* ((map (if require-match crm-local-must-match-map crm-local-completion-map)) + (map (if minibuffer-visible-completions + (make-composed-keymap + (list minibuffer-visible-completions-map + map)) + map)) input) (minibuffer-with-setup-hook (lambda () commit 3e30c779a7035fc99d6a787706bc04ff01868a66 Author: Juri Linkov Date: Wed Aug 7 19:44:43 2024 +0300 * lisp/imenu.el (imenu-flatten): Fix doc about annotation/group limitations. diff --git a/lisp/imenu.el b/lisp/imenu.el index 708a39a0f71..8f1b1f22a67 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -158,6 +158,9 @@ If the value is `annotation', annotate each completion candidate with a suffix that is the section name to which it belongs. If the value is `group', split completion candidates into groups according to the sections. +Since the values `annotation' and `group' rely on text properties, +you can use them only by selecting candidates from the completions +buffer, not by typing in the minibuffer. Any other value is treated as `prefix'. The value of `imenu-level-separator', a string, is used to separate commit 09d2125a7fd9ac03bc8d381ac275db8f1589f464 Author: Randy Taylor Date: Tue Aug 6 20:10:52 2024 -0400 Fix cmake-ts-mode number fontification (Bug#72228) * lisp/progmodes/cmake-ts-mode.el (cmake-ts-mode--constants): Remove "1" and "0". (cmake-ts-mode--font-lock-settings): Match negative numbers. diff --git a/lisp/progmodes/cmake-ts-mode.el b/lisp/progmodes/cmake-ts-mode.el index b70806f4c30..854adf4ade7 100644 --- a/lisp/progmodes/cmake-ts-mode.el +++ b/lisp/progmodes/cmake-ts-mode.el @@ -73,8 +73,7 @@ "Tree-sitter indent rules for `cmake-ts-mode'.") (defvar cmake-ts-mode--constants - '("1" "ON" "TRUE" "YES" "Y" "0" "OFF" "FALSE" "NO" "N" "IGNORE" - "NOTFOUND") + '("ON" "TRUE" "YES" "Y" "OFF" "FALSE" "NO" "N" "IGNORE" "NOTFOUND") "CMake constants for tree-sitter font-locking.") (defvar cmake-ts-mode--keywords @@ -164,7 +163,7 @@ Check if a node type is available, then return the right font lock rules." :language 'cmake :feature 'number '(((unquoted_argument) @font-lock-number-face - (:match "\\`[[:digit:]]*\\.?[[:digit:]]*\\.?[[:digit:]]+\\'" + (:match "\\`-?[[:digit:]]*\\.?[[:digit:]]*\\.?[[:digit:]]+\\'" @font-lock-number-face))) :language 'cmake commit 423c86cbde7b1ed1d42c7e21fef6e8be872857b0 Author: Augusto Stoffel Date: Wed Aug 7 13:44:57 2024 +0100 Eglot: send more accurate languageId strings to TeX servers bug#72343 * lisp/progmodes/eglot.el (eglot-server-programs): Rework TeX-mode entry diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 44117fe7a01..353877f60c2 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -292,7 +292,7 @@ automatically)." (scala-mode . ,(eglot-alternatives '("metals" "metals-emacs"))) (racket-mode . ("racket" "-l" "racket-langserver")) - ((tex-mode context-mode texinfo-mode bibtex-mode) + ((latex-mode plain-tex-mode context-mode texinfo-mode bibtex-mode tex-mode) . ,(eglot-alternatives '("digestif" "texlab"))) (erlang-mode . ("erlang_ls" "--transport" "stdio")) ((yaml-ts-mode yaml-mode) . ("yaml-language-server" "--stdio")) commit 628f2bf579d958bcaddb66c0a58c1a21650d76af Author: João Távora Date: Wed Aug 7 12:51:16 2024 +0100 Eglot: simplify eglot--lookup-mode No longer reorder the LANGUAGES return value to have the originating mode upfront, since it doesn't seem to serve any practical purpose anymore. bug#72343 * lisp/progmodes/eglot.el (eglot--lookup-mode): Simplify. * test/lisp/progmodes/eglot-tests.el (eglot-test-server-programs-guess-lang): Adjust. diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 31948a12d69..44117fe7a01 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1238,38 +1238,31 @@ PRESERVE-BUFFERS as in `eglot-shutdown', which see." "Lookup `eglot-server-programs' for MODE. Return (LANGUAGES . CONTACT-PROXY). -MANAGED-MODES is a list with MODE as its first element. -Subsequent elements are other major modes also potentially -managed by the server that is to manage MODE. - -LANGUAGE-IDS is a list of the same length as MANAGED-MODES. Each -elem is derived from the corresponding mode name, if not -specified in `eglot-server-programs' (which see). +LANGUAGES is a list ((MANAGED-MODE . LANGUAGE-ID) ...). MANAGED-MODE is +a major mode also potentially managed by the server that is to manage +MODE. LANGUAGE-ID is string identifying the language to the LSP server. +It's derived from the corresponding mode name, or explicitly specified +in `eglot-server-programs' (which see). CONTACT-PROXY is the value of the corresponding `eglot-server-programs' entry." - (cl-flet ((languages (main-mode-sym specs) - (let* ((res - (mapcar (jsonrpc-lambda (sym &key language-id &allow-other-keys) - (cons sym - (or language-id - (or (get sym 'eglot-language-id) - (replace-regexp-in-string - "\\(?:-ts\\)?-mode$" "" - (symbol-name sym)))))) - specs)) - (head (cl-find main-mode-sym res :key #'car))) - (cons head (delq head res))))) - (cl-loop - for (modes . contact) in eglot-server-programs - for specs = (mapcar #'eglot--ensure-list - (if (or (symbolp modes) (keywordp (cadr modes))) - (list modes) modes)) - thereis (cl-some (lambda (spec) - (cl-destructuring-bind (sym &key &allow-other-keys) spec - (and (provided-mode-derived-p mode sym) - (cons (languages sym specs) contact)))) - specs)))) + (cl-loop + for (modes . contact) in eglot-server-programs + for llists = (mapcar #'eglot--ensure-list + (if (or (symbolp modes) (keywordp (cadr modes))) + (list modes) modes)) + for normalized = (mapcar (jsonrpc-lambda (sym &key language-id &allow-other-keys) + (cons sym + (or language-id + (or (get sym 'eglot-language-id) + (replace-regexp-in-string + "\\(?:-ts\\)?-mode$" "" + (symbol-name sym)))))) + llists) + when (cl-some (lambda (cell) + (provided-mode-derived-p mode (car cell))) + normalized) + return (cons normalized contact))) (defun eglot--guess-contact (&optional interactive) "Helper for `eglot'. diff --git a/test/lisp/progmodes/eglot-tests.el b/test/lisp/progmodes/eglot-tests.el index 1e653716a2c..534c47b2646 100644 --- a/test/lisp/progmodes/eglot-tests.el +++ b/test/lisp/progmodes/eglot-tests.el @@ -1235,8 +1235,8 @@ GUESSED-MAJOR-MODES-SYM are bound to the useful return values of (let ((eglot-server-programs '(((baz-mode (foo-mode :language-id "bar")) . ("prog-executable"))))) (eglot--guessing-contact (_ nil _ _ modes guessed-langs) - (should (equal guessed-langs '("bar" "baz"))) - (should (equal modes '(foo-mode baz-mode))))))) + (should (equal guessed-langs '("baz" "bar"))) + (should (equal modes '(baz-mode foo-mode))))))) (defun eglot--glob-match (glob str) (funcall (eglot--glob-compile glob t t) str)) commit 2b087abdbb99fee2a670896fb34c666199e9ba84 Author: Gerd Möllmann Date: Wed Aug 7 11:38:48 2024 +0200 Bind TAB not in M-x lldb * lisp/progmodes/gud.el (lldb): Bind TAB not so that it also works on terminals. diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 7486804da1b..53a7d78328c 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -4134,7 +4134,8 @@ This command runs functions from `lldb-mode-hook'." (add-hook 'completion-at-point-functions #'gud-lldb-completion-at-point nil 'local) - (keymap-local-set "" #'completion-at-point) + ;; Bind TAB not so that it also works on ttys. + (keymap-local-set "TAB" #'completion-at-point) (gud-set-repeat-map-property 'gud-gdb-repeat-map) (setq comint-prompt-regexp (rx line-start "(lldb)" (0+ blank))) commit 153dc4bd1ddf3b70f19f6cceec0a98d710534c18 Author: Randy Taylor Date: Tue Aug 6 20:10:52 2024 -0400 Fix cmake-ts-mode number fontification (Bug#72228) * lisp/progmodes/cmake-ts-mode.el (cmake-ts-mode--constants): Remove "1" and "0". (cmake-ts-mode--font-lock-settings): Match negative numbers. diff --git a/lisp/progmodes/cmake-ts-mode.el b/lisp/progmodes/cmake-ts-mode.el index b70806f4c30..854adf4ade7 100644 --- a/lisp/progmodes/cmake-ts-mode.el +++ b/lisp/progmodes/cmake-ts-mode.el @@ -73,8 +73,7 @@ "Tree-sitter indent rules for `cmake-ts-mode'.") (defvar cmake-ts-mode--constants - '("1" "ON" "TRUE" "YES" "Y" "0" "OFF" "FALSE" "NO" "N" "IGNORE" - "NOTFOUND") + '("ON" "TRUE" "YES" "Y" "OFF" "FALSE" "NO" "N" "IGNORE" "NOTFOUND") "CMake constants for tree-sitter font-locking.") (defvar cmake-ts-mode--keywords @@ -164,7 +163,7 @@ Check if a node type is available, then return the right font lock rules." :language 'cmake :feature 'number '(((unquoted_argument) @font-lock-number-face - (:match "\\`[[:digit:]]*\\.?[[:digit:]]*\\.?[[:digit:]]+\\'" + (:match "\\`-?[[:digit:]]*\\.?[[:digit:]]*\\.?[[:digit:]]+\\'" @font-lock-number-face))) :language 'cmake commit c86fc3446540cbdfc626b5d6098e7932d4a6be20 Author: Andrea Corallo Date: Wed Aug 7 09:27:37 2024 +0200 Clean-up warning due to unused lexical variable * lisp/progmodes/c-ts-common.el (c-ts-common--fill-block-comment): Remove 'start-mask-done'. diff --git a/lisp/progmodes/c-ts-common.el b/lisp/progmodes/c-ts-common.el index 7609d8fdc61..f68a6dc108d 100644 --- a/lisp/progmodes/c-ts-common.el +++ b/lisp/progmodes/c-ts-common.el @@ -152,7 +152,6 @@ comment." (start-marker (point-marker)) (end-marker nil) (end-len 0) - (start-mask-done nil) (end-mask-done nil)) (move-marker start-marker start) ;; If the first line is /* followed by non-text, exclude this line