From 1800350b186864130e16c8618cbcb072c564637e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BChlbacher?= Date: Tue, 19 May 2026 11:18:36 +0000 Subject: [PATCH 001/125] Avoid compilation-mode matching rust as gnu * lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): Put 'rust' before 'gnu' to avoid a mismatch since the " |" has become optional (bug#81075). Copyright-paperwork-exempt: yes --- lisp/progmodes/compile.el | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index aaad8622c95..fbcdc6b5124 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -421,6 +421,20 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) nil (1 compilation-error-face)) + ;; This must precede the `gnu' rule or the latter would match instead. + (rust + ,(rx bol (or (group-n 1 "error") (group-n 2 "warning") (group-n 3 "note")) + (? "[" (+ (in "A-Z" "0-9")) "]") ":" (* nonl) + "\n" (+ " ") "-->" + " " (group-n 4 (+ nonl)) ; file + ":" (group-n 5 (+ (in "0-9"))) ; line + ":" (group-n 6 (+ (in "0-9")))) ; column + 4 5 6 (2 . 3) + nil + (1 compilation-error-face) + (2 compilation-warning-face) + (3 compilation-info-face)) + ;; Tested with Lua 5.1, 5.2, 5.3, 5.4, and LuaJIT 2.1. (lua ,(rx bol @@ -582,19 +596,6 @@ during global destruction\\.$\\)" 1 2) "\\(?:Parse\\|Fatal\\) error: \\(.*\\) in \\(.*\\) on line \\([0-9]+\\)" 2 3 nil nil) - (rust - ,(rx bol (or (group-n 1 "error") (group-n 2 "warning") (group-n 3 "note")) - (? "[" (+ (in "A-Z" "0-9")) "]") ":" (* nonl) - "\n" (+ " ") "-->" - " " (group-n 4 (+ nonl)) ; file - ":" (group-n 5 (+ (in "0-9"))) ; line - ":" (group-n 6 (+ (in "0-9")))) ; column - 4 5 6 (2 . 3) - nil - (1 compilation-error-face) - (2 compilation-warning-face) - (3 compilation-info-face)) - (rxp "^\\(?:Error\\|Warnin\\(g\\)\\):.*\n.* line \\([0-9]+\\) char\ \\([0-9]+\\) of file://\\(.+\\)" From 12eec781ed69c4fc7611e8c9a1953ad33da98a0c Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Fri, 22 May 2026 10:26:37 -0400 Subject: [PATCH 002/125] No longer raise error on HTTP 402 (Payment Required) (bug#81101) * lisp/url/url-http.el (url-http-parse-headers): Return t instead of raising an error, to give the user a chance to interact with the page. --- lisp/url/url-http.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index ce512c6db33..0be1b326d6c 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -826,9 +826,12 @@ should be shown to the user." ;; Authorization header field. (url-http-handle-authentication nil)) ('payment-required ; 402 - ;; This code is reserved for future use - (url-mark-buffer-as-dead buffer) - (error "Somebody wants you to give them money")) + ;; This code is "reserved for future use", but in the + ;; mean time websites have been seen to use it, for + ;; instance anti-bot challenges requiring the "payment" + ;; of a click of a button to prove the visitor is human, + ;; so we no longer raise an `error' here. + t) ('forbidden ; 403 ;; The server understood the request, but is refusing to ;; fulfill it. Authorization will not help and the request From 7892ae5eaf4c22a3209a8c44c6267004653c5691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Sun, 24 May 2026 03:26:19 +0100 Subject: [PATCH 003/125] Fix pathological slowness in flex completion The 'completion-regexp-list' optimization in completion--flex-all-completions-1, a cheap pre-filter via a trivial regexp, performs very poorly for longer patterns and strings, so drop it. That alone recovers fairly decent performance for the flex completion when compared to the 'hotfuzz' point of reference. We then recover the cheap rejection with an O(N+M) pre-check in the Fcompletion__flex_cost_gotoh C scorer. This kicks in the common case (completion-ignore-case is nil) and pays off especially when the table is already a list and 'all-completions' needn't cons. See: https://lists.gnu.org/archive/html/emacs-devel/2026-04/msg01081.html https://lists.gnu.org/archive/html/emacs-devel/2026-05/msg00519.html * lisp/minibuffer.el (completion--flex-all-completions-1): Remove regexp pre-filter. * src/minibuf.c (Fcompletion__flex_cost_gotoh): Add subsequence pre-check. --- lisp/minibuffer.el | 5 ----- src/minibuf.c | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index e8fb479bc85..a24b92cdae8 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -4982,11 +4982,6 @@ usual. Returns (ALL PAT PREFIX SUFFIX)." (prefix (substring beforepoint 0 (car bounds))) (suffix (substring afterpoint (cdr bounds))) (pat2 (substring pat (car bounds) (+ point (cdr bounds)))) - (completion-regexp-list - (cons (mapconcat (lambda (c) (regexp-quote (char-to-string c))) - pat2 - ".*") - completion-regexp-list)) (all (all-completions prefix table pred)) (all (if (zerop (length pat2)) all diff --git a/src/minibuf.c b/src/minibuf.c index c716ac0d811..745a71a63fc 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -2364,6 +2364,22 @@ STR the i-th character of PAT matched. */) if (patlen == 0 || strlen == 0 || size > FLEX_MAX_MATRIX_SIZE) return Qnil; + /* Also bail if PAT is not a subsequence of STR so bail "cheaply" + before the O(N*M) DP algorithm. Walking both strings + byte-by-byte for this purpose (and only for case-sensitive common + case) should be valid even for multibyte strings. */ + if (!completion_ignore_case) + { + const unsigned char *p = SDATA (pat); + const unsigned char *s = SDATA (str); + int pi = 0; + for (int si = 0; si < strlen && pi < patlen; si++) + if (s[si] == p[pi]) + pi++; + if (pi < patlen) + return Qnil; + } + /* Initialize M and D with positive infinity... */ for (int j = 0; j < size; j++) M[j] = D[j] = pos_inf; From 4c55d04ebe31f2a84273dfa2f765ca02e18ffb9d Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Mon, 18 May 2026 20:56:10 -0700 Subject: [PATCH 004/125] Add treesit-ready-p check back to tree-sitter major modes (bug#80909) * lisp/progmodes/c-ts-mode.el (c-ts-mode): (c++-ts-mode): * lisp/progmodes/cmake-ts-mode.el (cmake-ts-mode): * lisp/progmodes/dockerfile-ts-mode.el (dockerfile-ts-mode): * lisp/progmodes/elixir-ts-mode.el (elixir-ts-mode): * lisp/progmodes/go-ts-mode.el (go-ts-mode): (go-mod-ts-mode): (go-work-ts-mode): * lisp/progmodes/heex-ts-mode.el (heex-ts-mode): * lisp/progmodes/js.el (js-ts-mode): * lisp/progmodes/lua-ts-mode.el (lua-ts-mode): * lisp/progmodes/python.el (python-ts-mode): * lisp/progmodes/rust-ts-mode.el (rust-ts-mode): * lisp/progmodes/sh-script.el (bash-ts-mode): * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode): (tsx-ts-mode): * lisp/textmodes/css-mode.el (css-ts-mode): * lisp/textmodes/mhtml-ts-mode.el (mhtml-ts-mode): * lisp/textmodes/toml-ts-mode.el (toml-ts-mode): * lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode): * lisp/treesit-x.el (treesit-generic-mode-setup): Add the check. --- lisp/progmodes/c-ts-mode.el | 8 ++++++-- lisp/progmodes/cmake-ts-mode.el | 4 +++- lisp/progmodes/dockerfile-ts-mode.el | 4 +++- lisp/progmodes/elixir-ts-mode.el | 8 ++++++-- lisp/progmodes/go-ts-mode.el | 12 +++++++++--- lisp/progmodes/heex-ts-mode.el | 8 ++++++-- lisp/progmodes/js.el | 8 ++++++-- lisp/progmodes/lua-ts-mode.el | 4 +++- lisp/progmodes/python.el | 8 +++++--- lisp/progmodes/rust-ts-mode.el | 4 +++- lisp/progmodes/sh-script.el | 4 +++- lisp/progmodes/typescript-ts-mode.el | 8 ++++++-- lisp/textmodes/css-mode.el | 4 +++- lisp/textmodes/mhtml-ts-mode.el | 4 +++- lisp/textmodes/toml-ts-mode.el | 4 +++- lisp/textmodes/yaml-ts-mode.el | 4 +++- lisp/treesit-x.el | 4 +++- 17 files changed, 74 insertions(+), 26 deletions(-) diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index c8120d5752c..d08615446a1 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -1475,7 +1475,9 @@ in your init files, or customize `treesit-enabled-modes'." :group 'c :after-hook (c-ts-mode-set-modeline) - (when (treesit-ensure-installed 'c) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'c) + (treesit-ready-p 'c)) ;; Create an "for-each" parser, see `c-ts-mode--emacs-set-ranges' ;; for more. (when c-ts-mode-emacs-sources-support @@ -1554,7 +1556,9 @@ recommended to enable `electric-pair-mode' with this mode." :group 'c++ :after-hook (c-ts-mode-set-modeline) - (when (treesit-ensure-installed 'cpp) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'cpp) + (treesit-ready-p 'cpp)) (let ((primary-parser (treesit-parser-create 'cpp))) ;; Syntax. diff --git a/lisp/progmodes/cmake-ts-mode.el b/lisp/progmodes/cmake-ts-mode.el index d8873191d61..6abd92b5e1a 100644 --- a/lisp/progmodes/cmake-ts-mode.el +++ b/lisp/progmodes/cmake-ts-mode.el @@ -220,7 +220,9 @@ Return nil if there is no name or if NODE is not a defun node." :group 'cmake :syntax-table cmake-ts-mode--syntax-table - (when (treesit-ensure-installed 'cmake) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'cmake) + (treesit-ready-p 'cmake)) (setq treesit-primary-parser (treesit-parser-create 'cmake)) ;; Comments. diff --git a/lisp/progmodes/dockerfile-ts-mode.el b/lisp/progmodes/dockerfile-ts-mode.el index 1d42c239b84..b97ec89b99a 100644 --- a/lisp/progmodes/dockerfile-ts-mode.el +++ b/lisp/progmodes/dockerfile-ts-mode.el @@ -167,7 +167,9 @@ Return nil if there is no name or if NODE is not a stage node." :group 'dockerfile :syntax-table dockerfile-ts-mode--syntax-table - (when (treesit-ensure-installed 'dockerfile) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'dockerfile) + (treesit-ready-p 'dockerfile)) (setq treesit-primary-parser (treesit-parser-create 'dockerfile)) ;; Comments. diff --git a/lisp/progmodes/elixir-ts-mode.el b/lisp/progmodes/elixir-ts-mode.el index 9514d6bdc91..9bda7f0046f 100644 --- a/lisp/progmodes/elixir-ts-mode.el +++ b/lisp/progmodes/elixir-ts-mode.el @@ -737,7 +737,9 @@ Return nil if NODE is not a defun node or doesn't have a name." (add-hook 'post-self-insert-hook #'elixir-ts--electric-pair-string-delimiter 'append t) - (when (treesit-ensure-installed 'elixir) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'elixir) + (treesit-ready-p 'elixir)) (setq-local treesit-primary-parser (treesit-parser-create 'elixir)) @@ -762,7 +764,9 @@ Return nil if NODE is not a defun node or doesn't have a name." (setq-local treesit-defun-name-function #'elixir-ts--defun-name) ;; Embedded Heex. - (when (treesit-ensure-installed 'heex) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'heex) + (treesit-ready-p 'heex)) (require 'heex-ts-mode) (treesit-parser-create 'heex) diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el index 76de7c9b41b..8de6d0e0700 100644 --- a/lisp/progmodes/go-ts-mode.el +++ b/lisp/progmodes/go-ts-mode.el @@ -287,7 +287,9 @@ :group 'go :syntax-table go-ts-mode--syntax-table - (when (treesit-ensure-installed 'go) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'go) + (treesit-ready-p 'go)) (setq treesit-primary-parser (treesit-parser-create 'go)) ;; Comments. @@ -608,7 +610,9 @@ what the parent of the node would be if it were a node." :group 'go :syntax-table go-mod-ts-mode--syntax-table - (when (treesit-ensure-installed 'gomod) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'gomod) + (treesit-ready-p 'gomod)) (setq treesit-primary-parser (treesit-parser-create 'gomod)) ;; Comments. @@ -712,7 +716,9 @@ what the parent of the node would be if it were a node." "Major mode for editing go.work files, powered by tree-sitter." :group 'go - (when (treesit-ensure-installed 'gowork) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'gowork) + (treesit-ready-p 'gowork)) (setq treesit-primary-parser (treesit-parser-create 'gowork)) ;; Comments. diff --git a/lisp/progmodes/heex-ts-mode.el b/lisp/progmodes/heex-ts-mode.el index d756224f371..e8fec8b0469 100644 --- a/lisp/progmodes/heex-ts-mode.el +++ b/lisp/progmodes/heex-ts-mode.el @@ -201,7 +201,9 @@ Return nil if NODE is not a defun node or doesn't have a name." "Major mode for editing HEEx, powered by tree-sitter." :group 'heex-ts - (when (treesit-ensure-installed 'heex) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'heex) + (treesit-ready-p 'heex)) (setq treesit-primary-parser (treesit-parser-create 'heex)) ;; Comments @@ -236,7 +238,9 @@ Return nil if NODE is not a defun node or doesn't have a name." (setq-local treesit-font-lock-feature-list heex-ts--font-lock-feature-list) - (when (treesit-ensure-installed 'elixir) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'elixir) + (treesit-ready-p 'elixir)) (require 'elixir-ts-mode) (treesit-parser-create 'elixir) diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index e7e5bd901e1..3f2deca317c 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -4041,7 +4041,9 @@ See `treesit-thing-settings' for more information.") \\" :group 'js :syntax-table js-mode-syntax-table - (when (treesit-ensure-installed 'javascript) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'javascript) + (treesit-ready-p 'javascript)) ;; Borrowed from `js-mode'. (setq-local prettify-symbols-alist js--prettify-symbols-alist) (setq-local parse-sexp-ignore-comments t) @@ -4073,7 +4075,9 @@ See `treesit-thing-settings' for more information.") (setq-local treesit-font-lock-settings (js--treesit-font-lock-settings)) (setq-local treesit-font-lock-feature-list js--treesit-font-lock-feature-list) - (when (treesit-ensure-installed 'jsdoc) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'jsdoc) + (treesit-ready-p 'jsdoc)) (setq-local treesit-range-settings (treesit-range-rules :embed 'jsdoc diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el index 8d726b9b15b..2963d5a96af 100644 --- a/lisp/progmodes/lua-ts-mode.el +++ b/lisp/progmodes/lua-ts-mode.el @@ -675,7 +675,9 @@ Calls REPORT-FN directly." :syntax-table lua-ts--syntax-table (use-local-map lua-ts-mode-map) - (when (treesit-ensure-installed 'lua) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'lua) + (treesit-ready-p 'lua)) (setq treesit-primary-parser (treesit-parser-create 'lua)) ;; Comments. diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index ad0e84bf74f..86336979067 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -7477,9 +7477,11 @@ implementations: `python-mode' and `python-ts-mode'." \\{python-ts-mode-map}" :syntax-table python-mode-syntax-table - (when (if (fboundp 'treesit-ensure-installed) ; Emacs 31 - (treesit-ensure-installed 'python) - (treesit-ready-p 'python)) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (if (fboundp 'treesit-ensure-installed) ; Emacs 31 + (treesit-ensure-installed 'python) + t) + (treesit-ready-p 'python)) (setq treesit-primary-parser (treesit-parser-create 'python)) (setq-local treesit-font-lock-feature-list '(( comment definition) diff --git a/lisp/progmodes/rust-ts-mode.el b/lisp/progmodes/rust-ts-mode.el index 9bc4324ff66..dee82f934ce 100644 --- a/lisp/progmodes/rust-ts-mode.el +++ b/lisp/progmodes/rust-ts-mode.el @@ -557,7 +557,9 @@ See `prettify-symbols-compose-predicate'." :group 'rust :syntax-table rust-ts-mode--syntax-table - (when (treesit-ensure-installed 'rust) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'rust) + (treesit-ready-p 'rust)) (setq treesit-primary-parser (treesit-parser-create 'rust)) ;; Syntax. diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 8479c3cfd9a..4d025eeb18d 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1583,7 +1583,9 @@ with your script for an edit-interpret-debug cycle." This mode automatically falls back to `sh-mode' if the buffer is not written in Bash or sh." :syntax-table sh-mode-syntax-table - (when (treesit-ensure-installed 'bash) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'bash) + (treesit-ready-p 'bash)) (sh-set-shell "bash" nil nil) (add-hook 'flymake-diagnostic-functions #'sh-shellcheck-flymake nil t) (add-hook 'hack-local-variables-hook diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index c9d1d1eff4d..61e281310aa 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -701,7 +701,9 @@ This mode is intended to be inherited by concrete major modes." :group 'typescript :syntax-table typescript-ts-mode--syntax-table - (when (treesit-ensure-installed 'typescript) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'typescript) + (treesit-ready-p 'typescript)) (setq treesit-primary-parser (treesit-parser-create 'typescript)) ;; Indent. @@ -757,7 +759,9 @@ at least 3 (which is the default value)." :group 'typescript :syntax-table typescript-ts-mode--syntax-table - (when (treesit-ensure-installed 'tsx) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'tsx) + (treesit-ready-p 'tsx)) (setq treesit-primary-parser (treesit-parser-create 'tsx)) ;; Comments. diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index 355555df090..12632e24e0e 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el @@ -1888,7 +1888,9 @@ can also be used to fill comments. \\{css-mode-map}" :syntax-table css-mode-syntax-table - (when (treesit-ensure-installed 'css) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'css) + (treesit-ready-p 'css)) ;; Borrowed from `css-mode'. (setq-local syntax-propertize-function css-syntax-propertize-function) diff --git a/lisp/textmodes/mhtml-ts-mode.el b/lisp/textmodes/mhtml-ts-mode.el index 2a1c62b87e4..d53d74e220a 100644 --- a/lisp/textmodes/mhtml-ts-mode.el +++ b/lisp/textmodes/mhtml-ts-mode.el @@ -511,7 +511,9 @@ Powered by tree-sitter." ;; jsdoc is not mandatory for js-ts-mode, so we respect this by ;; adding jsdoc range rules only when jsdoc is available. - (when (treesit-ensure-installed 'jsdoc) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'jsdoc) + (treesit-ready-p 'jsdoc)) (setq-local c-ts-common--comment-regexp js--treesit-jsdoc-comment-regexp)) diff --git a/lisp/textmodes/toml-ts-mode.el b/lisp/textmodes/toml-ts-mode.el index d3f09526b90..63e3f60edd9 100644 --- a/lisp/textmodes/toml-ts-mode.el +++ b/lisp/textmodes/toml-ts-mode.el @@ -138,7 +138,9 @@ Return nil if there is no name or if NODE is not a defun node." :group 'toml-mode :syntax-table toml-ts-mode--syntax-table - (when (treesit-ensure-installed 'toml) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'toml) + (treesit-ready-p 'toml)) (setq treesit-primary-parser (treesit-parser-create 'toml)) ;; Comments diff --git a/lisp/textmodes/yaml-ts-mode.el b/lisp/textmodes/yaml-ts-mode.el index c1521c82c22..5afd4d2d111 100644 --- a/lisp/textmodes/yaml-ts-mode.el +++ b/lisp/textmodes/yaml-ts-mode.el @@ -262,7 +262,9 @@ Calls REPORT-FN directly." :group 'yaml :syntax-table yaml-ts-mode--syntax-table - (when (treesit-ensure-installed 'yaml) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'yaml) + (treesit-ready-p 'yaml)) (setq treesit-primary-parser (treesit-parser-create 'yaml)) ;; Comments. diff --git a/lisp/treesit-x.el b/lisp/treesit-x.el index 9d0541b458c..86eb417c7b5 100644 --- a/lisp/treesit-x.el +++ b/lisp/treesit-x.el @@ -142,7 +142,9 @@ of `define-treesit-generic-mode'. ;;;###autoload (defun treesit-generic-mode-setup (lang) "Go into the treesit generic mode MODE." - (when (treesit-ensure-installed lang) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed lang) + (treesit-ready-p lang)) (setq treesit-primary-parser (treesit-parser-create lang)) (when-let* ((query (treesit-generic-mode-font-lock-query lang))) From 4d87d203cfb9c407930332d53b8198328236fe9b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 24 May 2026 09:41:26 +0300 Subject: [PATCH 005/125] Fix display of inline SVG images in Rmail * lisp/mail/rmailmm.el (rmail-mime-set-bulk-data): Support Content-type of "svg+xml" if SVG images are supported, --- lisp/mail/rmailmm.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index 9226976c114..e70f96cb2f8 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el @@ -842,8 +842,11 @@ directly." ((string-match "text/" content-type) (setq type 'text)) ((string-match "image/\\(.*\\)" content-type) - (setq type (image-supported-file-p - (concat "." (match-string 1 content-type)))) + (let ((fnext (match-string 1 content-type))) + ;; Ask about SVG support when Content-type is image/svg+xml. + (if (equal fnext "svg+xml") + (setq fnext "svg")) + (setq type (image-supported-file-p (concat "." fnext)))) (when (and type rmail-mime-show-images (not (eq rmail-mime-show-images 'button)) From 7cee526a8cc44dd7166108ec2718a4ca0d1ad1f1 Mon Sep 17 00:00:00 2001 From: Zhengyi Fu Date: Thu, 21 May 2026 22:08:39 +0800 Subject: [PATCH 006/125] Save and restore original local keymap in grep-edit-mode * lisp/progmodes/grep.el (grep-edit-original-mode-map): New variable. (grep-change-to-grep-edit-mode): Save the current local map before switching to grep-edit-mode-map. (grep-edit-save-changes): Restore the saved local map instead of assuming grep-mode-map (bug#81090). Copyright-paperwork-exempt: yes --- lisp/progmodes/grep.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 72a05a082bb..a5ba32d26e8 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -1120,6 +1120,8 @@ list is empty)." (defvar grep-edit-mode-hook nil "Hooks run when changing to Grep-Edit mode.") +(defvar grep-edit-original-mode-map nil) + (defun grep-edit-mode () "Major mode for editing *grep* buffers. In this mode, changes to the *grep* buffer are applied to the @@ -1140,6 +1142,7 @@ The only editable texts in a Grep-Edit buffer are the match results." (error "Not a Grep buffer")) (when (get-buffer-process (current-buffer)) (error "Cannot switch when grep is running")) + (setq-local grep-edit-original-mode-map (current-local-map)) (use-local-map grep-edit-mode-map) (grep-edit--prepare-buffer) (setq buffer-read-only nil) @@ -1159,7 +1162,7 @@ The only editable texts in a Grep-Edit buffer are the match results." (unless (derived-mode-p 'grep-edit-mode) (error "Not a Grep-Edit buffer")) (remove-hook 'after-change-functions #'occur-after-change-function t) - (use-local-map grep-mode-map) + (use-local-map grep-edit-original-mode-map) (setq buffer-read-only t) (setq major-mode 'grep-mode) (setq mode-name "Grep") From a7414f18598bab861f3fef307efd0b8e15cb6ebe Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 24 May 2026 11:46:47 +0100 Subject: [PATCH 007/125] native--compile-skip-on-battery-p: Try to fix ?b, ?B conditions * lisp/emacs-lisp/comp-run.el (native--compile-skip-on-battery-p): Don't skip charging because the battery is charging, and don't look for "discharging", at least for now (bug#80922). Thanks to David Koppelman for the report. --- lisp/emacs-lisp/comp-run.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/comp-run.el b/lisp/emacs-lisp/comp-run.el index f329d627392..64e20327906 100644 --- a/lisp/emacs-lisp/comp-run.el +++ b/lisp/emacs-lisp/comp-run.el @@ -203,9 +203,10 @@ LOAD and SELECTOR work as described in `native--compile-async'." ;; because power users often configure their batteries ;; to stop charging at less than 100% as a way to ;; extend the lifetime of their battery hardware. - (string= (cdr (assq ?b res)) "+") - (member (cdr (assq ?B res)) '("charging" "pending-charge")) - (not (string= (cdr (assq ?B res)) "discharging"))))))) + ;; Further discussion in bug#80922. + (and (not (equal (cdr (assq ?b res)) "+")) + (not (member (cdr (assq ?B res)) + '("charging" "pending-charge"))))))))) (defvar comp-files-queue () "List of Emacs Lisp files to be compiled.") From 768c8bf004556c6594133b8f625757f052e7f067 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 24 May 2026 11:49:50 +0100 Subject: [PATCH 008/125] Revert "* admin/notes/documentation: Recommend not using "it's"." --- admin/notes/documentation | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/admin/notes/documentation b/admin/notes/documentation index d355ad06412..f6fa321b217 100644 --- a/admin/notes/documentation +++ b/admin/notes/documentation @@ -106,7 +106,7 @@ For instance, this anywhere in sight is too confusing. may not need mentioning, because --daemon will give an error message -saying it is not implemented, and other cases aren't affected. +saying it's not implemented, and other cases aren't affected. The kind of change for which the user really needs help from Antinews is where a feature works _differently_ in the previous version. @@ -164,5 +164,3 @@ like subr.el, which are not quoted. Call 'emacs-news-view-mode'. Lisp symbols and Info manual links shall be decorated, and clicking on them shall lead to the respective Help buffer or Info node. - -*** Do not use "it's", "you're" and alike. From 2c1b45f5c56254a7699a92b619eb6ebf3b3571c8 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 24 May 2026 14:44:07 +0300 Subject: [PATCH 009/125] ; Improve documentation of 'vc-dir-auto-hide-up-to-date' * lisp/vc/vc-dir.el (vc-dir-auto-hide-up-to-date): Doc fix. * doc/emacs/maintaining.texi (VC Directory Buffer): Document 'vc-dir-auto-hide-up-to-date'. (Bug#81033) --- doc/emacs/maintaining.texi | 28 +++++++++++++++++++++------- lisp/vc/vc-dir.el | 24 +++++++++++++++--------- 2 files changed, 36 insertions(+), 16 deletions(-) diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index a1825c5e515..b5f7c362a91 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1523,10 +1523,11 @@ on the current line if no files are marked. and their version control statuses. It lists files in the current directory (the one specified when you called @kbd{C-x v d}) and its subdirectories, but only those with a noteworthy status. Files -that are up-to-date (i.e., the same as in the repository) are -omitted. If all the files in a subdirectory are up-to-date, the +that are up-to-date (i.e., the same as in the repository) or ignored +are omitted. If all the files in a subdirectory are up-to-date, the subdirectory is not listed either. As an exception, if a file has -become up-to-date as a direct result of a VC command, it is listed. +become up-to-date as a direct result of a VC command, it is listed by +default. Here is an example of a VC Directory buffer listing: @@ -1565,6 +1566,16 @@ systems can show other statuses. For instance, CVS shows the been applied to the work file. RCS and SCCS show the name of the user locking a file as its status. +@vindex vc-dir-auto-hide-up-to-date + As mentioned above, by default files and directories which become +up-to-date or ignored after the VC Directory buffer is first displayed +stay displayed. To automatically remove such files from display, +customize the variable @code{vc-dir-auto-hide-up-to-date} to the value +@code{t}. You can also customize it to the value @code{revert}, in +which case such files will be removed only when you refresh the VC +Directory display, e.g., by typing @kbd{g} (@pxref{VC Directory +Commands}). + @ifnottex On CVS, the @code{vc-dir} command normally contacts the repository, which may be on a remote machine, to check for updates. If you change @@ -1595,7 +1606,7 @@ cases Emacs must occasionally fetch from the remote repository in order to determine the count. If your connection to the remote repository is slow then this may cause unacceptable slowdowns in refreshing the VC Directory buffer. If this affects you, you can customize -@code{vc-dir-show-outgoing-count} to nil to disable the unpushed +@code{vc-dir-show-outgoing-count} to @code{nil} to disable the unpushed revisions count altogether. You can also set this on a per-repository basis using directory local variables (@pxref{Directory Variables}). @@ -1674,9 +1685,6 @@ the VC Directory buffer (@code{vc-dir-root-next-action}). This is like @w{@kbd{C-x v v}} (@pxref{Basic VC Editing}) except that it ignores any marks and the position of point. -@item q -Quit the VC Directory buffer, and bury it (@code{quit-window}). - @item u Unmark the file or directory on the current line. If the region is active, unmark all the files in the region (@code{vc-dir-unmark}). @@ -1691,6 +1699,12 @@ files and directories. Hide files with @samp{up-to-date} or @samp{ignored} status (@code{vc-dir-hide-up-to-date}). With a prefix argument, hide items whose state is that of the item at point. + +@item g +Refresh the VC Directory buffer display (@code{revert-buffer}). + +@item q +Quit the VC Directory buffer, and bury it (@code{quit-window}). @end table @findex vc-dir-mark diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index 2d6f8ee97d0..c79ac50cfc3 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -161,17 +161,23 @@ proceed to mark and unmark other entries, without asking." :version "31.1") (defcustom vc-dir-auto-hide-up-to-date nil - "If non-nil, VC-Dir automatically hides \\+`up-to-date' and \\+`ignored' items. + "Whether VC-Dir automatically removes \\+`up-to-date'/\\+`ignored' files from display. -If the value of this variable is the symbol `revert', \ -\\\\[revert-buffer] in VC-Dir -buffers also does \\[vc-dir-hide-up-to-date]. \ -That is, refreshing the VC-Dir buffer also hides -\\+`up-to-date' and \\+`ignored' items. +If the value is nil, files shown in the VC-Dir buffer will remain on +display if they become \\+`up-to-date' or \\+`ignored'. +If the value is t, files are automatically removed from display when +they become \\+`up-to-date' or \\+`ignored'. +If the value is the symbol `revert', any displayed files that +are \\+`up-to-date' or \\+`ignored' are removed from display +by \\\\[revert-buffer], but they are not automatically removed +when they become \\+`up-to-date' or \\+`ignored'. That is, +refreshing the VC-Dir buffer hides \\+`up-to-date' and \\+`ignored' +files when the value is the symbol `revert'. +Any other value is treated as t. + +VC-Dir never shows \\+`up-to-date' and \\+`ignored' files when the +directory is first displayed. -If the value of this variable is any other non-nil value, then in -addition, hide items whenever their state would change to -\\+`up-to-date' or \\+`ignored'. You can still use `vc-dir-show-fileentry' to manually add an entry for an \\+`up-to-date' or \\+`ignored' file." :type 'boolean From c6181780663a32729e150c8d57222a6579691af6 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 25 May 2026 08:44:42 +0200 Subject: [PATCH 010/125] ; Mark process-test-stderr-buffer as :unstable when running on emba * test/src/process-tests.el (process-test-stderr-buffer): Mark as :unstable when running on emba. (Bug#80166) --- test/src/process-tests.el | 1 + 1 file changed, 1 insertion(+) diff --git a/test/src/process-tests.el b/test/src/process-tests.el index 55657a23fa9..ad6cb924943 100644 --- a/test/src/process-tests.el +++ b/test/src/process-tests.el @@ -89,6 +89,7 @@ process to complete." (should (string= (buffer-string) "arg1=\"x &y\", arg2=\n")))))) (ert-deftest process-test-stderr-buffer () + :tags (if (getenv "EMACS_EMBA_CI") '(:unstable)) (skip-unless (executable-find "bash")) (with-timeout (60 (ert-fail "Test timed out")) (let* ((stdout-buffer (generate-new-buffer "*stdout*")) From 02897e208d005956f84aa228f4f298f260133896 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 26 May 2026 18:25:13 -0700 Subject: [PATCH 011/125] emacsclient quote_argument is void MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lib-src/emacsclient.c (quote_argument): Don’t use ‘return E;’ in a function returning void. Problem found by Oracle Developer Studio 12.6. --- lib-src/emacsclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 0769c94a89d..9df20d8524b 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -902,7 +902,7 @@ quote_argument_len (HSOCKET s, const char *str, ptrdiff_t len) static void quote_argument (HSOCKET s, const char *str) { - return quote_argument_len (s, str, strlen (str)); + quote_argument_len (s, str, strlen (str)); } /* The inverse of quote_argument. Remove quoting in string STR by From ea54c33950f5a360b08040a1412da36ffb14e704 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 27 May 2026 13:16:12 +0100 Subject: [PATCH 012/125] ; * etc/PROBLEMS: Link to bug#81124. --- etc/PROBLEMS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index b619c6e7f37..655bfd6c173 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -136,6 +136,9 @@ result in an endless loop. If you need Emacs to be able to recover from closing displays, compile it with the Lucid toolkit instead of GTK. +One possible mitigation for the problem is described in +https://debbugs.gnu.org/81124 + ** Emacs compiled with GTK+ 3 crashes when run under some X servers. This happens when the X server does not provide certain display features that the underlying GTK+ 3 toolkit assumes. For example, this From 2e70b88623ed4506c4334f8b9e73651f7d21ade7 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 27 May 2026 18:32:40 +0300 Subject: [PATCH 013/125] Fix fill-paragraph combining text with preceding comment * lisp/textmodes/fill.el (fill-paragraph): Handle the case when a non-comment line follows a comment line with non-nil 'fill-paragraph-handle-comment' (bug#80449). Skip such a comment line before filling a non-comment line. * test/lisp/textmodes/fill-tests.el (fill-test-fill-paragraph-handle-comment): Add new test. * test/lisp/textmodes/fill-resources/fill-paragraph-handle-comment.erts: New file. --- lisp/textmodes/fill.el | 13 +++++++ .../fill-paragraph-handle-comment.erts | 37 +++++++++++++++++++ test/lisp/textmodes/fill-tests.el | 4 ++ 3 files changed, 54 insertions(+) create mode 100644 test/lisp/textmodes/fill-resources/fill-paragraph-handle-comment.erts diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index c1ccdf2ec5f..270cb388971 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -911,6 +911,7 @@ region, instead of just filling the current paragraph." (fill-comment-paragraph justify))) ;; 4. If it all fails, default to the good ol' text paragraph filling. (let ((before (point)) + (paragraph-start-orig paragraph-start) (paragraph-start paragraph-start) ;; Fill prefix used for filling the paragraph. fill-pfx) @@ -933,6 +934,18 @@ region, instead of just filling the current paragraph." (setq fill-pfx "") (let ((end (point)) (beg (progn (fill-forward-paragraph -1) (point)))) + ;; If the paragraph starts with a comment line preceding point + ;; on a non-comment line, skip such comment lines, so they + ;; are not filled together (bug#80449). + (when (and fill-paragraph-handle-comment comment-start-skip + (< beg before)) + (save-excursion + (goto-char beg) + (when (looking-at paragraph-start-orig) + (goto-char (1+ (match-end 0)))) + (when (looking-at comment-start-skip) + (forward-line 1) + (setq beg (point))))) (goto-char before) (setq fill-pfx (if use-hard-newlines diff --git a/test/lisp/textmodes/fill-resources/fill-paragraph-handle-comment.erts b/test/lisp/textmodes/fill-resources/fill-paragraph-handle-comment.erts new file mode 100644 index 00000000000..c7c9e96ea50 --- /dev/null +++ b/test/lisp/textmodes/fill-resources/fill-paragraph-handle-comment.erts @@ -0,0 +1,37 @@ +Point-Char: | + +Name: fill-paragraph-handle-comment - non-comment line before comment line +Code: + (lambda () + (setq-local comment-start "# ") + (setq-local fill-paragraph-handle-comment t) + (setq-local fill-column 42) + (fill-paragraph)) + +=-= + +this is not part of the comment this is not part of the comment| +# this is a comment this is a comment this is a comment + +=-= + +this is not part of the comment this is +not part of the comment +# this is a comment this is a comment this is a comment + +=-=-= + +Name: fill-paragraph-handle-comment - non-comment line after comment line + +=-= + +# this is a comment this is a comment this is a comment +this is not part of the comment this is not part of the comment| + +=-= + +# this is a comment this is a comment this is a comment +this is not part of the comment this is +not part of the comment + +=-=-= diff --git a/test/lisp/textmodes/fill-tests.el b/test/lisp/textmodes/fill-tests.el index 2bb9d3ea163..c37a879b4b2 100644 --- a/test/lisp/textmodes/fill-tests.el +++ b/test/lisp/textmodes/fill-tests.el @@ -163,6 +163,10 @@ eius. Foo"))) (skip-unless (functionp 'markdown-mode)) (ert-test-erts-file (ert-resource-file "fill-paragraph-semlf-markdown-mode.erts"))) +(ert-deftest fill-test-fill-paragraph-handle-comment () + "Test the `fill-paragraph-handle-comment' variable." + (ert-test-erts-file (ert-resource-file "fill-paragraph-handle-comment.erts"))) + (provide 'fill-tests) ;;; fill-tests.el ends here From c3babe4b8966c3ada6305b2af85e24398190a14f Mon Sep 17 00:00:00 2001 From: Zhengyi Fu Date: Wed, 27 May 2026 10:03:36 +0800 Subject: [PATCH 014/125] Fix lax whitespace highlight during query-replace * lisp/replace.el (query-replace-read-args): Add :lax-whitespace to minibuffer-lazy-highlight-setup, so lazy highlight during query-replace respects replace-lax-whitespace and replace-regexp-lax-whitespace (bug#81131). Copyright-paperwork-exempt: yes --- lisp/replace.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/replace.el b/lisp/replace.el index 48e158de531..4bb91fbd6a0 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -369,6 +369,8 @@ should a regexp." (replace--region-filter (funcall region-extract-function 'bounds))) :highlight (and query-replace-lazy-highlight (not no-highlight)) + :lax-whitespace (if regexp-flag replace-regexp-lax-whitespace + replace-lax-whitespace) :regexp regexp-flag :regexp-function (or replace-regexp-function delimited-flag From d8933b9f074776fb3a48d3a30f549448a31e0fca Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 28 May 2026 13:07:32 +0800 Subject: [PATCH 015/125] Fix the MSDOS build * msdos/sedlibmk.inp (GL_GNULIB_MEMEQ, GL_GNULIB_STREQ) (GL_GNULIB_STRNUL): New substitutions, replacing that of GL_GNULIB_STRINGEQ. * src/term.c (init_tty) [MSDOS]: Assign appropriate value to tty->TN_max_colors. Do not merge to master. --- msdos/sedlibmk.inp | 4 +++- src/term.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/msdos/sedlibmk.inp b/msdos/sedlibmk.inp index d29fc6ebca7..439f9dfbb95 100644 --- a/msdos/sedlibmk.inp +++ b/msdos/sedlibmk.inp @@ -183,13 +183,15 @@ s/@PACKAGE@/emacs/ /^GL_GNULIB_GETRANDOM *=/s/@GL_GNULIB_GETRANDOM@/1/ /^GL_GNULIB_UNISTD_H_GETOPT *=/s/@GL_GNULIB_UNISTD_H_GETOPT@/1/ /^GL_GNULIB_LCHMOD *=/s/@GL_GNULIB_LCHMOD@/1/ +/^GL_GNULIB_MEMEQ *=/s/@GL_GNULIB_MEMEQ@/1/ /^GL_GNULIB_MEMMEM *=/s/@GL_GNULIB_MEMMEM@/1/ /^GL_GNULIB_MEMRCHR *=/s/@GL_GNULIB_MEMRCHR@/1/ /^GL_GNULIB_MEMPCPY *=/s/@GL_GNULIB_MEMPCPY@/1/ /^GL_GNULIB_MKOSTEMP *=/s/@GL_GNULIB_MKOSTEMP@/1/ /^GL_GNULIB_MKTIME *=/s/@GL_GNULIB_MKTIME@/1/ /^GL_GNULIB_SIGDESCR_NP *=/s/@GL_GNULIB_SIGDESCR_NP@/1/ -/^GL_GNULIB_STRINGEQ *=/s/@GL_GNULIB_STRINGEQ@/1/ +/^GL_GNULIB_STREQ *=/s/@GL_GNULIB_STREQ@/1/ +/^GL_GNULIB_STRNUL *=/s/@GL_GNULIB_STRNUL@/1/ /^GL_GNULIB_TIME_R *=/s/@GL_GNULIB_TIME_R@/1/ /^GL_GNULIB_TIMEGM *=/s/@GL_GNULIB_TIMEGM@/1/ /^GL_GNULIB_TIME_RZ *=/s/@GL_GNULIB_TIME_RZ@/1/ diff --git a/src/term.c b/src/term.c index 354375085e2..52ae4f61814 100644 --- a/src/term.c +++ b/src/term.c @@ -4751,6 +4751,7 @@ use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\ FrameCols (tty) = width; FrameRows (tty) = height; tty->char_ins_del_ok = 0; + tty->TN_max_colors = 16; /* Must be non-zero for tty-display-color-p. */ init_baud_rate (fileno (tty->input)); } #endif /* MSDOS */ From 833553dd9aec0072961a7f1a7797f9481855a07f Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Thu, 28 May 2026 10:03:05 +0200 Subject: [PATCH 016/125] dbus-call-method-asynchronously supports also an ERROR-HANDLER * doc/misc/dbus.texi (Asynchronous Methods): HANDLER can also be (HANDLER . ERROR-HANDLER). * etc/NEWS: Mention ERROR-HANDLER of dbus-call-method-asynchronously. * lisp/net/dbus.el (dbus-call-method-asynchronously): Adapt docstring. (dbus-check-event, dbus-handle-event): HANDLER can also be (HANDLER . ERROR-HANDLER). * src/dbusbind.c (Fdbus_message_internal): HANDLER can also be (HANDLER . ERROR-HANDLER). (Bug#80952) * test/lisp/net/dbus-tests.el (dbus--test-method-another-handler) (dbus--test-method-error-handler): New defvars. (dbus--test-method-another-handler) (dbus--test-method-error-handler): New functions. (dbus-test04-call-method-error-handler): New test. (dbus-test10-keep-fd): Extend test. --- doc/misc/dbus.texi | 54 ++++++++++++++++++++------ etc/NEWS | 8 ++++ lisp/net/dbus.el | 75 ++++++++++++++++++++++++++++-------- src/dbusbind.c | 24 +++++++++--- test/lisp/net/dbus-tests.el | 77 ++++++++++++++++++++++++++++++++++++- 5 files changed, 203 insertions(+), 35 deletions(-) diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi index 8764fcade90..d63e26755d9 100644 --- a/doc/misc/dbus.texi +++ b/doc/misc/dbus.texi @@ -1340,9 +1340,20 @@ keyword @code{:session}. D-Bus object path, @var{service} is registered at. @var{interface} is an interface offered by @var{service}. It must provide @var{method}. -@var{handler} is a Lisp function, which is called when the -corresponding return message arrives. If @var{handler} is @code{nil}, -no return message will be expected. +@var{handler} is a Lisp function, which is called when the corresponding +return message has arrived. It uses the returned values from the +@var{method} call as arguments. These are the same arguments which are +returned when @code{dbus-call-method} is invoked instead, +@pxref{Synchronous Methods}. If @var{handler} is @code{nil}, no return +message will be expected. + +@var{handler} can also be the cons cell @code{(@var{handler} +. @var{error-handler})}. In this case, @var{error-handler} will be +called in case an error is returned from D-Bus. It uses the returned +D-Bus error as argument. + +Neither the return value of @var{handler} nor the return value of +@var{error-handler} is used. If the parameter @code{:timeout} is given, the following integer @var{timeout} specifies the maximum number of milliseconds before a @@ -1366,19 +1377,40 @@ arguments. They are converted into D-Bus types as described in If @var{handler} is a Lisp function, the function returns a key into the hash table @code{dbus-registered-objects-table}. The corresponding entry in the hash table is removed, when the return -message arrives, and @var{handler} is called. Example: +message arrives, and @var{handler} is called. Examples: + +The return value of @samp{org.freedesktop.portal.Settings.ReadOne} is a variant. @lisp (dbus-call-method-asynchronously - :system "org.freedesktop.Hal" - "/org/freedesktop/Hal/devices/computer" - "org.freedesktop.Hal.Device" "GetPropertyString" - (lambda (msg) (message "%s" msg)) - "system.kernel.machine") + :session "org.freedesktop.portal.Desktop" + "/org/freedesktop/portal/desktop" + "org.freedesktop.portal.Settings" "ReadOne" + '((lambda (msg) (message "Method handler %s" msg)) . + (lambda (err) (message "Error handler %s" err))) + "org.freedesktop.appearance" "color-scheme") -@print{} i686 +@print{} Method handler (0) -@result{} (:serial :system 2) +@result{} (:serial :session 4) +@end lisp + +There does not exist a method @samp{org.freedesktop.portal.Settings.ReadTwo}. + +@lisp +(dbus-call-method-asynchronously + :session "org.freedesktop.portal.Desktop" + "/org/freedesktop/portal/desktop" + "org.freedesktop.portal.Settings" "ReadTwo" + '((lambda (msg) (message "Method handler %s" msg)) . + (lambda (err) (message "Error handler %s" err))) + "org.freedesktop.appearance" "color-scheme") + +@print{} Error handler + (dbus-error "org.freedesktop.DBus.Error.UnknownMethod + No such method "ReadTwo") + +@result{} (:serial :session 5) @end lisp @end defun diff --git a/etc/NEWS b/etc/NEWS index e6fd8a7f747..a5806a99e31 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -69,6 +69,14 @@ Emacs 30. It allows Lisp programs that present completion candidates ("completion frontends") to provide additional information which can be used to adjust or optimize completion candidates computation. +** D-Bus + ++++ +*** Support error handler in asynchronous method calls. +The HANDLER argument of 'dbus-call-method-asynchronously' can be a cons +cell '(HANDLER . ERROR-HANDLER)'. ERROR-HANDLER is invoked if the +method call returns with a D-Bus error; the error is passed as argument. + * Changes in Emacs 32.1 on Non-Free Operating Systems diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index 0c748e76fcf..3a5cf48b92f 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -445,8 +445,17 @@ object path SERVICE is registered at. INTERFACE is an interface offered by SERVICE. It must provide METHOD. HANDLER is a Lisp function, which is called when the corresponding -return message has arrived. If HANDLER is nil, no return message -will be expected. +return message has arrived. It uses the returned values from the METHOD +call as arguments. These are the same arguments which are returned when +`dbus-call-method' is invoked instead. If HANDLER is nil, no return +message will be expected. + +HANDLER can also be the cons cell `(HANDLER . ERROR-HANDLER)'. In this +case, ERROR-HANDLER will be called in case an error is returned from +D-Bus. It uses the returned D-Bus error as argument. + +Neither the return value of HANDLER nor the return value of +ERROR-HANDLER is used. If the parameter `:timeout' is given, the following integer TIMEOUT specifies the maximum number of milliseconds before the @@ -477,18 +486,37 @@ about type keywords, see Info node `(dbus)Type Conversion'. If HANDLER is a Lisp function, the function returns a key into the hash table `dbus-registered-objects-table'. The corresponding entry in the hash table is removed, when the return message arrives, -and HANDLER is called. +and HANDLER is called. Examples: -Example: +The return value of \"org.freedesktop.portal.Settings.ReadOne\" is a variant. \(dbus-call-method-asynchronously - :system \"org.freedesktop.Hal\" \"/org/freedesktop/Hal/devices/computer\" - \"org.freedesktop.Hal.Device\" \"GetPropertyString\" #\\='message - \"system.kernel.machine\") + :session \"org.freedesktop.portal.Desktop\" + \"/org/freedesktop/portal/desktop\" + \"org.freedesktop.portal.Settings\" \"ReadOne\" + \\='((lambda (msg) (message \"Method handler %s\" msg)) . + (lambda (err) (message \"Error handler %s\" err))) + \"org.freedesktop.appearance\" \"color-scheme\") - -| i686 + -| Method handler (0) - => (:serial :system 2)" + => (:serial :session 4) + +There does not exist a method \"org.freedesktop.portal.Settings.ReadTwo\". + +\(dbus-call-method-asynchronously + :session \"org.freedesktop.portal.Desktop\" + \"/org/freedesktop/portal/desktop\" + \"org.freedesktop.portal.Settings\" \"ReadTwo\" + \\='((lambda (msg) (message \"Method handler %s\" msg)) . + (lambda (err) (message \"Error handler %s\" err))) + \"org.freedesktop.appearance\" \"color-scheme\") + + -| Error handler + (dbus-error org.freedesktop.DBus.Error.UnknownMethod + No such method \"ReadTwo\") + + => (:serial :session 5)" (or (featurep 'dbusbind) (signal 'dbus-error (list "Emacs not compiled with dbus support"))) @@ -504,6 +532,7 @@ Example: (or (stringp method) (signal 'wrong-type-argument (list 'stringp method))) (or (null handler) (functionp handler) + (and (listp handler) (functionp (car handler)) (functionp (cdr handler))) (signal 'wrong-type-argument (list 'functionp handler))) (apply #'dbus-message-internal dbus-message-type-method-call @@ -1111,9 +1140,11 @@ INTERFACE and MEMBER denote the message which has been sent. When TYPE is `dbus-message-type-error', MEMBER is the error name. HANDLER is the function which has been registered for this -message. ARGS are the typed arguments as returned from the -message. They are passed to HANDLER without type information, -when it is called during event handling in `dbus-handle-event'. +message. It can also be a cons cell (HANDLER . ERROR-HANDLER). + +ARGS are the typed arguments as returned from the message. They are +passed to HANDLER without type information, when it is called during +event handling in `dbus-handle-event'. This function signals a `dbus-error' if the event is not well formed." @@ -1150,7 +1181,10 @@ formed." (or (= dbus-message-type-method-return (nth 2 event)) (stringp (nth 8 event))) ;; Handler. - (functionp (nth 9 event)) + (or (functionp (nth 9 event)) + (and (consp (nth 9 event)) + (functionp (car (nth 9 event))) + (functionp (cdr (nth 9 event))))) ;; Arguments. (listp (nthcdr 10 event))) (signal 'dbus-error (list "Not a valid D-Bus event" event)))) @@ -1207,10 +1241,17 @@ If the HANDLER returns a `dbus-error', it is propagated as return message." (setq result (dbus-ignore-errors (apply (nth 9 event) args))) ;; Error messages must be propagated. The error name is in ;; the member slot. - (when (= dbus-message-type-error (nth 2 event)) - (signal 'dbus-error (cons (nth 8 event) args))) - ;; Apply the handler. - (setq result (apply (nth 9 event) args)) + (let* ((handler (nth 9 event)) + (error-handler (if (functionp handler) #'signal + (prog1 (cdr handler) + (setq handler (car handler)))))) + (setq result + (if (= dbus-message-type-error (nth 2 event)) + (funcall + error-handler + (cons 'dbus-error (cons (nth 8 event) args))) + ;; Apply the handler. + (apply handler args)))) ;; Return an (error) message when it is a message call. (when (= dbus-message-type-method-call (nth 2 event)) (dbus-ignore-errors diff --git a/src/dbusbind.c b/src/dbusbind.c index 95fedeb166b..7039eac3dbe 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -1411,7 +1411,11 @@ usage: (dbus-message-internal &rest REST) */) XD_DBUS_VALIDATE_PATH (path); XD_DBUS_VALIDATE_INTERFACE (interface); XD_DBUS_VALIDATE_MEMBER (member); - if (!NILP (handler) && !FUNCTIONP (handler)) + if (!NILP (handler) + && !(FUNCTIONP (handler) + || (CONSP (handler) + && FUNCTIONP (CAR_SAFE (handler)) + && FUNCTIONP (CDR_SAFE (handler))))) wrong_type_argument (Qinvalid_function, handler); } @@ -1562,6 +1566,12 @@ usage: (dbus-message-internal &rest REST) */) if (mtype != DBUS_MESSAGE_TYPE_METHOD_CALL) XD_SIGNAL1 (build_string (":keep-fd is only supported on method calls")); + /* This is because the error handler and the keepfd path use + the same slot in Vdbus_registered_objects_table. */ + if (CONSP (handler)) + XD_SIGNAL1 + (build_string + (":keep-fd cannot be used when there is an error handler")); /* Ignore this keyword if unsupported. */ #ifdef DBUS_TYPE_UNIX_FD @@ -1842,9 +1852,6 @@ xd_read_message_1 (DBusConnection *connection, Lisp_Object bus) /* Remove the entry. */ Fremhash (key, Vdbus_registered_objects_table); - /* Store the event. */ - xd_store_event (CONSP (value) ? CAR_SAFE (value) : value, args, event_args); - #ifdef DBUS_TYPE_UNIX_FD /* Check, whether there is a file descriptor to be kept. value is (handler . path) @@ -1857,8 +1864,12 @@ xd_read_message_1 (DBusConnection *connection, Lisp_Object bus) Fcons (Fcons (CAR_SAFE (CDR_SAFE (CAR_SAFE (args))), CDR_SAFE (value)), xd_registered_fds); + value = CAR_SAFE (value); } #endif + + /* Store the event. */ + xd_store_event (value, args, event_args); } else /* DBUS_MESSAGE_TYPE_METHOD_CALL, DBUS_MESSAGE_TYPE_SIGNAL. */ @@ -2141,8 +2152,9 @@ means a wildcard then. OBJECT is either the handler to be called when a D-Bus message, which matches the key criteria, arrives (TYPE `:method', `:signal' and -`:monitor'), or a list (ACCESS EMITS-SIGNAL VALUE) for TYPE -`:property'. +`:monitor'), or a list (ACCESS EMITS-SIGNAL VALUE) for TYPE `:property'. +For type `:message', the handler slot can also be a cons cell (HANDLER +. ERROR-HANDLER) or (HANDLER . KEEP-FD-PATH). For entries of type `:signal' or `:monitor', there is also a fifth element RULE, which keeps the match string the signal or monitor is diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el index 3d0ab522d3f..c8ff2941f3c 100644 --- a/test/lisp/net/dbus-tests.el +++ b/test/lisp/net/dbus-tests.el @@ -842,6 +842,73 @@ Returns the respective error." dbus--test-interface "Foo" :authorizable t "foo") :type 'dbus-error))) +(defvar dbus--test-method-another-handler nil) +(defun dbus--test-method-another-handler (&rest args) + "Method handler for `dbus-test04-call-method-error-handler'." + (should args) + (setq dbus--test-method-another-handler t)) + +(defvar dbus--test-method-error-handler nil) +(defun dbus--test-method-error-handler (&rest args) + "Error handler for `dbus-test04-call-method-error-handler'." + (should (eq 'dbus-error (caar args))) + (setq dbus--test-method-error-handler t)) + +(ert-deftest dbus-test04-call-method-error-handler () + "Verify `dbus-call-method-asynchronously' error handler." + :tags '(:expensive-test) + (skip-unless dbus--test-enabled-session-bus) + (dbus-ignore-errors (dbus-unregister-service :session dbus--test-service)) + (dbus-register-service :session dbus--test-service) + + (unwind-protect + (let ((method "Method") + (method-handler #'dbus--test-method-handler) + (handler #'dbus--test-method-another-handler) + (error-handler #'dbus--test-method-error-handler) + ;dbus-debug ; There would be errors otherwise. + registered) + + ;; Register. + (should + (equal + (setq + registered + (dbus-register-method + :session dbus--test-service dbus--test-path + dbus--test-interface method method-handler)) + `((:method :session ,dbus--test-interface ,method) + (,dbus--test-service ,dbus--test-path ,method-handler)))) + + ;; Call HANDLER. + (setq dbus--test-method-another-handler nil) + (dbus-call-method-asynchronously + :session dbus--test-service dbus--test-path + dbus--test-interface method `(,handler . ,error-handler) "foo") + (with-timeout (1 (dbus--test-timeout-handler)) + (while (not dbus--test-method-another-handler) + (read-event nil nil 0.1))) + (should dbus--test-method-another-handler) + + ;; Call ERROR-HANDLER. + (setq dbus--test-method-error-handler nil) + (dbus-call-method-asynchronously + :session dbus--test-service dbus--test-path + dbus--test-interface method `(,handler . ,error-handler) + "foo" "foo" "foo") + (with-timeout (1 (dbus--test-timeout-handler)) + (while (not dbus--test-method-error-handler) + (read-event nil nil 0.1))) + (should dbus--test-method-error-handler) + + ;; Unregister method. + (should (dbus-unregister-object registered)) + (should-not (dbus-unregister-object registered))) + + ;; Cleanup. + (ignore-errors (kill-buffer "*Warnings*")) + (dbus-unregister-service :session dbus--test-service))) + (defvar dbus--test-event-expected nil "The expected event in `dbus--test-signal-handler'.") @@ -2416,7 +2483,15 @@ The argument EXPECTED-ARGS is a list of expected arguments for the method." ;; Closing them again is a noop. (should-not (dbus--fd-close lock1)) - (should-not (dbus--fd-close lock2)))) + (should-not (dbus--fd-close lock2)) + + ;; `:keep-fd' cannot be used together with an error handler. + (should-error + (dbus-call-method-asynchronously + :system dbus--test-systemd-service dbus--test-systemd-path + dbus--test-systemd-manager-interface "Inhibit" + '(ignore . ignore) :keep-fd what who why mode) + :type 'dbus-error))) (ert-deftest dbus-test10-open-close-fd () "Check D-Bus open/close a file descriptor." From 69286be27db320a03e787edb5d2cc483f0f64f66 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 28 May 2026 10:19:02 +0100 Subject: [PATCH 017/125] ; Fix an overwide docstring line. --- lisp/vc/vc-dir.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index c79ac50cfc3..98c69b48691 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -161,7 +161,7 @@ proceed to mark and unmark other entries, without asking." :version "31.1") (defcustom vc-dir-auto-hide-up-to-date nil - "Whether VC-Dir automatically removes \\+`up-to-date'/\\+`ignored' files from display. + "Whether VC-Dir auto-removes \\+`up-to-date'/\\+`ignored' files from display. If the value is nil, files shown in the VC-Dir buffer will remain on display if they become \\+`up-to-date' or \\+`ignored'. From 545bbc6ebe819144c179bbef347016488c339fc8 Mon Sep 17 00:00:00 2001 From: David Ponce Date: Thu, 28 May 2026 11:55:12 +0200 Subject: [PATCH 018/125] widget-image-find: Use 'image-load-path' (bug#81140) * lisp/wid-edit.el (widget-image-find): Use 'image-load-path' (bug#81140). --- lisp/wid-edit.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 353d546fce4..3871d0f64c4 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -868,7 +868,8 @@ extension (xpm, xbm, gif, jpg, or png) located in image) ((stringp image) ;; A string. Look it up in relevant directories. - (let* ((load-path (cons widget-image-directory load-path)) + (let* ((image-load-path (cons widget-image-directory + image-load-path)) specs) (dolist (elt widget-image-conversion) (dolist (ext (cdr elt)) From 7ee33143981199184e8b12db12ed7d0a26b947f5 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 28 May 2026 18:36:11 +0300 Subject: [PATCH 019/125] Speed-up cursor motion under 'display-line-numbers-mode' * src/xfaces.c (Finternal_lisp_face_equal_p): Accept an additional optional argument INHERIT; if non-nil, consider two faces equal if one inherits from the other and doesn't specify any other attributes to be different from it. * src/xdisp.c (try_cursor_movement, try_window_id): Call 'Finternal_lisp_face_equal_p' with non-nil INHERIT argument, to speed up redisplay in the default case when line numbers are shown. (Bug#81133) * test/src/xfaces-tests.el (xfaces-test-face-equality): New test. --- src/xdisp.c | 4 ++-- src/xfaces.c | 49 +++++++++++++++++++++++++++++++++++++--- test/src/xfaces-tests.el | 10 ++++++++ 3 files changed, 58 insertions(+), 5 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 1691bd0d80e..dabe63b902a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -19856,7 +19856,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, && !(!NILP (Vdisplay_line_numbers) && NILP (Finternal_lisp_face_equal_p (Qline_number, Qline_number_current_line, - w->frame))) + w->frame, Qt))) /* This code is not used for mini-buffer for the sake of the case of redisplaying to replace an echo area message; since in that case the mini-buffer contents per se are usually @@ -22657,7 +22657,7 @@ try_window_id (struct window *w) || (!NILP (Vdisplay_line_numbers) && NILP (Finternal_lisp_face_equal_p (Qline_number, Qline_number_current_line, - w->frame)))) + w->frame, Qt)))) GIVE_UP (24); /* composition-break-at-point is incompatible with the optimizations diff --git a/src/xfaces.c b/src/xfaces.c index 73d475c757f..fcec00fbc1f 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -4527,12 +4527,16 @@ lface_equal_p (Lisp_Object *v1, Lisp_Object *v2) DEFUN ("internal-lisp-face-equal-p", Finternal_lisp_face_equal_p, - Sinternal_lisp_face_equal_p, 2, 3, 0, + Sinternal_lisp_face_equal_p, 2, 4, 0, doc: /* True if FACE1 and FACE2 are equal. If the optional argument FRAME is given, report on FACE1 and FACE2 in that frame. If FRAME is t, report on the defaults for FACE1 and FACE2 (for new frames). -If FRAME is omitted or nil, use the selected frame. */) - (Lisp_Object face1, Lisp_Object face2, Lisp_Object frame) +If FRAME is omitted or nil, use the selected frame. +Optional fourth argument INHERIT, if non-nil, means the faces +are considered equal if one inherits from the other in a way +that makes them have the same attributes when used on display. */) + (Lisp_Object face1, Lisp_Object face2, Lisp_Object frame, + Lisp_Object inherit) { bool equal_p; struct frame *f; @@ -4548,6 +4552,45 @@ If FRAME is omitted or nil, use the selected frame. */) lface2 = lface_from_face_name (f, face2, true); equal_p = lface_equal_p (XVECTOR (lface1)->contents, XVECTOR (lface2)->contents); + if (!(NILP (inherit) || equal_p)) + { + /* The below is a subset of merging the descendant face with its + parent(s). We only consider a direct inheritance (so no FACE1 + that inherits from some other face which inherits from FACE2), + and the values of :inherit that are lists are not considered. + This is enough in simple cases such as the line-number-current + face that inherits from line-number. */ + Lisp_Object attrs1[LFACE_VECTOR_SIZE], attrs2[LFACE_VECTOR_SIZE]; + int i; + equal_p = true; + memcpy (attrs1, xvector_contents (lface1), sizeof attrs1); + memcpy (attrs2, xvector_contents (lface2), sizeof attrs2); + /* If either face inherits from the other one, and all the other + face attributes of the inheriting face are either unspecified + or equal to those of the parent face, consider the faces equal. */ + if (EQ (attrs1[LFACE_INHERIT_INDEX], face2)) + { + for (i = 1; i < LFACE_VECTOR_SIZE && equal_p; ++i) + { + if (i == LFACE_INHERIT_INDEX) + continue; + equal_p = face_attr_equal_p (attrs1[i], attrs2[i]) + || UNSPECIFIEDP (attrs1[i]); + } + } + else if (EQ (attrs2[LFACE_INHERIT_INDEX], face1)) + { + for (i = 1; i < LFACE_VECTOR_SIZE && equal_p; ++i) + { + if (i == LFACE_INHERIT_INDEX) + continue; + equal_p = face_attr_equal_p (attrs1[i], attrs2[i]) + || UNSPECIFIEDP (attrs2[i]); + } + } + + } + return equal_p ? Qt : Qnil; } diff --git a/test/src/xfaces-tests.el b/test/src/xfaces-tests.el index ae57909a664..e79d2e88543 100644 --- a/test/src/xfaces-tests.el +++ b/test/src/xfaces-tests.el @@ -65,6 +65,16 @@ 'button)))) (kill-buffer buf))) +(ert-deftest xfaces-test-face-equality () + "Test `internal-lisp-face-equal-p'." + (should (internal-lisp-face-equal-p 'default 'default)) + (should-not (internal-lisp-face-equal-p 'default 'region)) + (should-not (internal-lisp-face-equal-p 'line-number 'default)) + (should-not (internal-lisp-face-equal-p 'line-number ' + line-number-current-line)) + (should (internal-lisp-face-equal-p 'line-number + 'line-number-current-line t))) + (provide 'xfaces-tests) ;;; xfaces-tests.el ends here From 0a5e69eaef780e66a88bb6eca4e369b5e337245b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 28 May 2026 17:36:19 -0400 Subject: [PATCH 020/125] lisp/visual-wrap.el (visual-wrap--content-prefix): Adjust doc Suggested by Andrea Alberti . --- lisp/visual-wrap.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lisp/visual-wrap.el b/lisp/visual-wrap.el index 733f059ca85..e7be0c960d6 100644 --- a/lisp/visual-wrap.el +++ b/lisp/visual-wrap.el @@ -56,7 +56,7 @@ extra indent = -1 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna - aliqua. Ut enim ad minim veniam, quis nostrud exercitation + aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. actual indent = 2 @@ -64,7 +64,7 @@ extra indent = 2 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna - aliqua. Ut enim ad minim veniam, quis nostrud exercitation + aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat." :type 'integer :safe #'integerp @@ -174,7 +174,6 @@ members of `visual-wrap--safe-display-specs' (which see)." (defun visual-wrap--content-prefix (prefix) "Get the next-line prefix for the specified first-line PREFIX. -POSITION is the position in the buffer where PREFIX is located. This returns a string prefix to use for subsequent lines; a number, indicating the pixel width to use for whitespace alignment; or nil if From 3621ef5c4205cdeb30c3a1a24088e68831bd7d09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Bela=C3=AFche?= Date: Thu, 16 Apr 2026 19:11:13 +0200 Subject: [PATCH 021/125] Add dependance of info file on source. Suppress also superfluous exta .info extension of info.info. --- doc/misc/Makefile.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index 5eee5023f54..83f5d9fe135 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in @@ -1,3 +1,4 @@ + ### @configure_input@ # Copyright (C) 1994, 1996-2026 Free Software Foundation, Inc. @@ -159,6 +160,8 @@ ${buildinfodir}/%.info: ${srcdir}/%.texi ${gfdl} ${style} | ${buildinfodir} ## The short aliases, eg efaq = $(buildinfodir)/efaq.info. define info_template $(1): $$(buildinfodir)/$(1).info + +$$(buildinfodir)/$(1).info: $$(srcdir)/$(1).texi $$(gfdl) $$(style) endef ## "info" is already taken. From 0275b41d1c6107de8eb6632c7912212f725b3db9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Bela=C3=AFche?= Date: Sun, 31 Dec 2023 17:37:09 +0100 Subject: [PATCH 022/125] Generate manual for other languages than default. * doc/translations/fr/info_common.mk: * doc/translations/default/info_common.mk: New file. * doc/misc/Makefile.in: Get INFO_COMMON from language respective info_common.mk helper script. (INFO_TARGETS): Make it depend from info_common.mk settings. (ORG_SETUP, ORG_SRC): Make it point at language specific sub-directory. (texi_sources, DVI_TARGETS, HTML_TARGETS, PDF_TARGETS) (PS_TARGETS, echo-info, info_template,efaq%$(lang_suffix).dvi) (efaq%$(lang_suffix).pdf, efaq%$(lang_suffix).texi) (efaq%$(lang_suffix).html): Make it use language specific suffix. (${buildinfodir}/%$(lang_suffix).info, %$(lang_suffix).dvi) (%$(lang_suffix).pdf, %$(lang_suffix).html, %$(lang_suffix).ps): Make it use language specific suffix/subdirectory. * Makefile.in (DOCLANGS): New variable, list of languages. (install-info, uninstall): List targets into 'info_misc' for all languages. (TAGS tags): Make tags for all languages. ($(DOCS)): Create target for all languages. (texi_misc_fr, texi_misc_default): Set macro for all languages. (srcdir_doc_info_dir_inputs): Macro concatenate texi_misc_lll for all language lll. --- Makefile.in | 26 +++++++--- doc/misc/Makefile.in | 66 ++++++++++++++----------- doc/translations/default/info_common.mk | 9 ++++ doc/translations/fr/info_common.mk | 8 +++ 4 files changed, 73 insertions(+), 36 deletions(-) create mode 100644 doc/translations/default/info_common.mk create mode 100644 doc/translations/fr/info_common.mk diff --git a/Makefile.in b/Makefile.in index 698895b79d1..d5a78c1d694 100644 --- a/Makefile.in +++ b/Makefile.in @@ -115,6 +115,9 @@ HAVE_GSETTINGS = @HAVE_GSETTINGS@ ANDROID = @ANDROID@ +# TODO : make a configure option to keep only desired languages +DOCLANGS?=default fr + # ==================== Where To Install Things ==================== # Location to install Emacs.app under GNUstep / macOS. @@ -794,7 +797,7 @@ install-info: info [ -f "$(DESTDIR)${infodir}/dir" ] || \ [ ! -f ${srcdir}/info/dir ] || \ ${INSTALL_DATA} ${srcdir}/info/dir "$(DESTDIR)${infodir}/dir"; \ - info_misc=`MAKEFLAGS= $(MAKE) --no-print-directory -s -C doc/misc echo-info`; \ + info_misc="$(foreach lang,$(DOCLANGS),`MAKEFLAGS= $(MAKE) --no-print-directory -s -C doc/misc LANG=$(lang) echo-info`)"; \ cd ${srcdir}/info ; \ for elt in ${INFO_NONMISC} $${info_misc}; do \ for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \ @@ -944,7 +947,7 @@ uninstall: uninstall-$(NTDIR) uninstall-doc uninstall-gsettings-schemas done -rm -rf "$(DESTDIR)${libexecdir}/emacs/${version}" thisdir=`pwd -P`; \ - (info_misc=`MAKEFLAGS= $(MAKE) --no-print-directory -s -C doc/misc echo-info`; \ + (info_misc="$(foreach lang,$(DOCLANGS),`MAKEFLAGS= $(MAKE) --no-print-directory -s -C doc/misc LANG=$(lang) echo-info`)"; \ if cd "$(DESTDIR)${infodir}"; then \ for elt in ${INFO_NONMISC} $${info_misc}; do \ (cd "$${thisdir}"; \ @@ -1122,7 +1125,7 @@ TAGS tags: lib lib-src # src $(MAKE) -C doc/emacs tags $(MAKE) -C doc/lispintro tags $(MAKE) -C doc/lispref tags - $(MAKE) -C doc/misc tags + $(foreach LANG,$(DOCLANGS),$(MAKE) -C doc/misc LANG=$(LANG) tags;) CHECK_TARGETS = check check-maybe check-expensive check-all check-byte-compile .PHONY: $(CHECK_TARGETS) @@ -1143,8 +1146,12 @@ PDFS = lispref-pdf lispintro-pdf emacs-pdf misc-pdf PSS = lispref-ps lispintro-ps emacs-ps misc-ps DOCS = $(DVIS) $(HTMLS) $(INFOS) $(PDFS) $(PSS) -$(DOCS): - $(MAKE) -C doc/$(subst -, ,$@) +define MAKE_DOC +$(1): + $(foreach lang,$(DOCLANGS),$$(MAKE) -C doc/$$(subst -, LANG=$(lang) ,$$@);) + +endef +$(foreach doc,$(DOCS),$(eval $(call MAKE_DOC,$(doc)))) .PHONY: $(DOCS) docs pdf ps .PHONY: info dvi dist html info-dir check-info @@ -1168,13 +1175,18 @@ misc-dvi misc-html misc-pdf misc-ps: src info-dir: ${srcdir}/info/dir -texi_misc = $(shell MAKEFLAGS= ${MAKE} --no-print-directory -s -C doc/misc echo-sources) +define set_texi_misc +texi_misc_$(1) = $$(shell MAKEFLAGS= $${MAKE} --no-print-directory -s -C doc/misc LANG=$(1) echo-sources) + +endef + +$(foreach lang,$(DOCLANGS),$(eval $(call set_texi_misc,$(lang)))) srcdir_doc_info_dir_inputs = \ ${srcdir}/doc/emacs/emacs.texi \ ${srcdir}/doc/lispintro/emacs-lisp-intro.texi \ ${srcdir}/doc/lispref/elisp.texi \ - $(addprefix ${srcdir}/doc/misc/,${texi_misc}) + $(foreach lang,$(DOCLANGS),$(addprefix ${srcdir}/doc/misc/$(filter-out ../translations/default/misc/,../translations/$(lang)/misc/),$(texi_misc_$(lang)) )) info_dir_inputs = \ ../build-aux/dir_top \ $(subst ${srcdir}/doc/,,${srcdir_doc_info_dir_inputs}) diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index 83f5d9fe135..ca11dd9fbc8 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in @@ -64,18 +64,20 @@ INSTALL_DATA = @INSTALL_DATA@ MAKEINFO = @MAKEINFO@ MAKEINFO_OPTS = --force -I$(emacsdir) +ifeq ($(LANG),) +LANG:=default +else ifeq ($(wildcard ../translations/$(LANG)/info_common.mk),) +LANG:=default +endif + +lang_suffix:=$(filter-out -default,-$(LANG)) +lang_subdir:=$(filter-out ../translations/default/misc/,../translations/$(LANG)/misc/) + ## On MS Windows, efaq-w32; otherwise blank. DOCMISC_W32 = @DOCMISC_W32@ ## Info files to build and install on all platforms. -INFO_COMMON = auth autotype bovine calc ccmode cl dbus dired-x \ - ebrowse ede ediff edt efaq eglot eieio emacs-gnutls \ - emacs-mime epa erc ert eshell eudc eww flymake forms gnus \ - htmlfontify idlwave ido info.info mairix-el message mh-e \ - modus-themes newsticker nxml-mode octave-mode org pcl-cvs pgg \ - rcirc reftex remember sasl sc semantic ses sieve smtpmail \ - speedbar srecode todo-mode tramp transient url use-package \ - vhdl-mode viper vtable widget wisent woman +include ../translations/$(LANG)/info_common.mk ## Info files to install on current platform. INFO_INSTALL = $(INFO_COMMON) $(DOCMISC_W32) @@ -83,13 +85,13 @@ INFO_INSTALL = $(INFO_COMMON) $(DOCMISC_W32) ## Info files to build on current platform. ## This is all of them, even though they might not all get installed, ## because the info files are pre-built in release tarfiles. -INFO_TARGETS = $(INFO_COMMON) efaq-w32 +INFO_TARGETS = $(INFO_COMMON) $(DOCMISC_W32_TARGET) ## Some manuals have their source in .org format. ## This is discouraged because the .texi files it generates ## are not as well formatted as handwritten ones. -ORG_SETUP = $(wildcard ${srcdir}/*-setup.org) -ORG_SRC = $(filter-out ${ORG_SETUP},$(wildcard ${srcdir}/*.org)) +ORG_SETUP = $(wildcard ${srcdir}/$(lang_subdir)*-setup.org) +ORG_SRC = $(filter-out ${ORG_SETUP},$(wildcard ${srcdir}/$(lang_subdir)*.org)) TEXI_FROM_ORG = ${ORG_SRC:.org=.texi} # There are some naming differences between the info targets and the other @@ -97,15 +99,18 @@ TEXI_FROM_ORG = ${ORG_SRC:.org=.texi} TARGETS_1 = $(INFO_INSTALL:ccmode=cc-mode) TARGETS = $(TARGETS_1:info.info=info) -texi_sources = $(addsuffix .texi,${TARGETS}) +# Sources are also suffixed, this is useless as they are in different +# directories, but some people argued that there should not be +# different files with same name in the repo. +texi_sources = $(addsuffix $(lang_suffix).texi,${TARGETS}) texi_notgen = $(filter-out $(notdir ${TEXI_FROM_ORG}),${texi_sources}) texi_and_org = $(notdir ${ORG_SRC}) ${texi_notgen} SOURCES = $(sort ${texi_and_org}) -DVI_TARGETS = $(TARGETS:=.dvi) -HTML_TARGETS = $(TARGETS:=.html) -PDF_TARGETS = $(TARGETS:=.pdf) -PS_TARGETS = $(TARGETS:=.ps) +DVI_TARGETS = $(TARGETS:=$(lang_suffix).dvi) +HTML_TARGETS = $(TARGETS:=$(lang_suffix).html) +PDF_TARGETS = $(TARGETS:=$(lang_suffix).pdf) +PS_TARGETS = $(TARGETS:=$(lang_suffix).ps) TEXI2DVI = texi2dvi TEXI2PDF = texi2pdf @@ -133,7 +138,7 @@ info: $(INFO_TARGETS) ## Base file names of output info files. INFO_BASES = $(patsubst %.info,%,$(notdir $(INFO_INSTALL))) echo-info: - @: $(info $(addsuffix .info,$(INFO_BASES))) + @: $(info $(addsuffix $(lang_suffix).info,$(INFO_BASES))) echo-sources: @: $(info $(SOURCES)) @@ -153,15 +158,15 @@ ${buildinfodir}: EXTRA_OPTS = -${buildinfodir}/%.info: ${srcdir}/%.texi ${gfdl} ${style} | ${buildinfodir} +${buildinfodir}/%$(lang_suffix).info: ${srcdir}/$(lang_subdir)%$(lang_suffix).texi ${gfdl} ${style} | ${buildinfodir} $(AM_V_GEN)$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) $(EXTRA_OPTS) \ -o $@ $< ## The short aliases, eg efaq = $(buildinfodir)/efaq.info. define info_template - $(1): $$(buildinfodir)/$(1).info + $(1): $$(buildinfodir)/$(1)$$(lang_suffix).info -$$(buildinfodir)/$(1).info: $$(srcdir)/$(1).texi $$(gfdl) $$(style) +$$(buildinfodir)/$(1)$$(lang_suffix).info: $$(srcdir)/$$(lang_subdir)$(1)$$(lang_suffix).texi $$(gfdl) $$(style) endef ## "info" is already taken. @@ -170,17 +175,17 @@ info.info: $(buildinfodir)/info.info $(foreach ifile,$(filter-out info.info,$(INFO_TARGETS)),$(eval $(call info_template,$(ifile)))) -%.dvi: ${srcdir}/%.texi ${gfdl} ${style} +%$(lang_suffix).dvi: ${srcdir}/$(lang_subdir)%$(lang_suffix).texi ${gfdl} ${style} $(ENVADD) $(TEXI2DVI) $< -%.pdf: ${srcdir}/%.texi ${gfdl} ${style} +%$(lang_suffix).pdf: ${srcdir}/$(lang_subdir)%$(lang_suffix).texi ${gfdl} ${style} $(ENVADD) $(TEXI2PDF) $< -%.html: ${srcdir}/%.texi ${gfdl} ${style} +%$(lang_suffix).html: ${srcdir}/$(lang_subdir)%$(lang_suffix).texi ${gfdl} ${style} $(AM_V_GEN)$(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) $(EXTRA_OPTS) \ -o $@ $< -%.ps: %.dvi +%$(lang_suffix).ps: %$(lang_suffix).dvi $(DVIPS) -o $@ $< @@ -207,16 +212,16 @@ ${buildinfodir}/ccmode.info: \ ## efaq, efaq_w32 do not depend on gfdl. ## Maybe we can use .SECONDEXPANSION for this. -${buildinfodir}/efaq%.info: ${srcdir}/efaq%.texi ${style} | ${buildinfodir} +${buildinfodir}/efaq%$(lang_suffix).info: ${srcdir}/efaq%$(lang_suffix).texi ${style} | ${buildinfodir} $(AM_V_GEN)$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $< -efaq%.dvi: ${srcdir}/efaq%.texi +efaq%$(lang_suffix).dvi: ${srcdir}/efaq%$(lang_suffix).texi $(ENVADD) $(TEXI2DVI) $< -efaq%.pdf: ${srcdir}/efaq%.texi +efaq%$(lang_suffix).pdf: ${srcdir}/efaq%$(lang_suffix).texi $(ENVADD) $(TEXI2PDF) $< -efaq%.html: ${srcdir}/efaq%.texi +efaq%$(lang_suffix).html: ${srcdir}/efaq%$(lang_suffix).texi $(AM_V_GEN)$(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ $< ${buildinfodir}/emacs-mime.info emacs-mime.html: EXTRA_OPTS = --enable-encoding @@ -251,7 +256,10 @@ emacs = "${EMACS}" -batch --no-site-file --no-site-lisp --eval '(setq load-prefe # things like org-setup's "version" macro work. Sigh. define org_template $(1:.org=.texi): $(1) ${top_srcdir}/lisp/org/ox-texinfo.el - $${AM_V_GEN}cd "$${srcdir}" && $${emacs} -l ox-texinfo \ + $${AM_V_GEN}cd "$${srcdir}" && $${emacs} \ + --eval '(add-to-list (quote load-path) "$(abspath ${top_srcdir}/lisp/org)")' \ + --eval '(setq org--inhibit-version-check t)' \ + -l ox-texinfo \ --eval '(setq gc-cons-threshold 50000000)' \ --eval '(setq org-confirm-babel-evaluate nil)' \ --eval '(setq org-id-track-globally nil)' \ diff --git a/doc/translations/default/info_common.mk b/doc/translations/default/info_common.mk new file mode 100644 index 00000000000..9c09f5a0cec --- /dev/null +++ b/doc/translations/default/info_common.mk @@ -0,0 +1,9 @@ +## Info files to build and install on all platforms. +INFO_COMMON = auth autotype bovine calc ccmode cl dbus dired-x \ + ebrowse ede ediff edt efaq eglot eieio emacs-gnutls \ + emacs-mime epa erc ert eshell eudc eww flymake forms gnus \ + htmlfontify idlwave ido info.info mairix-el message mh-e \ + modus-themes newsticker nxml-mode octave-mode org pcl-cvs pgg \ + rcirc reftex remember sasl sc semantic ses sieve smtpmail \ + speedbar srecode todo-mode tramp transient url use-package \ + vhdl-mode viper vtable widget wisent woman diff --git a/doc/translations/fr/info_common.mk b/doc/translations/fr/info_common.mk new file mode 100644 index 00000000000..e72440fe69a --- /dev/null +++ b/doc/translations/fr/info_common.mk @@ -0,0 +1,8 @@ +## Info files to build and install on all platforms (onl ses has been +## translated to Frenchj) +INFO_COMMON = ses + +## efac-w32 has not been translated to French +DOCMISC_W32:=# + +DOCMISC_W32_TARGET:=# From ca346be53c7063f0d0a13c9f04fdea541da0fae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Bela=C3=AFche?= Date: Thu, 16 Apr 2026 23:04:05 +0200 Subject: [PATCH 023/125] Handle the info duplicate target issue as close as possible to the conflict. The problems are: - filtering out the info from info making templates misses some dependencies. - naming PHONY target info.info is misleading, as there is also an info.info in the info build directory --- doc/misc/Makefile.in | 18 +++++++----------- doc/translations/default/info_common.mk | 2 +- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index ca11dd9fbc8..10b6326a7a0 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in @@ -1,4 +1,3 @@ - ### @configure_input@ # Copyright (C) 1994, 1996-2026 Free Software Foundation, Inc. @@ -96,8 +95,7 @@ TEXI_FROM_ORG = ${ORG_SRC:.org=.texi} # There are some naming differences between the info targets and the other # targets, so let's resolve them here. -TARGETS_1 = $(INFO_INSTALL:ccmode=cc-mode) -TARGETS = $(TARGETS_1:info.info=info) +TARGETS = $(INFO_INSTALL:ccmode=cc-mode) # Sources are also suffixed, this is useless as they are in different # directories, but some people argued that there should not be @@ -124,15 +122,15 @@ ENVADD = $(AM_V_GEN)TEXINPUTS="$(srcdir):$(emacsdir):$(TEXINPUTS)" \ gfdl = ${srcdir}/doclicense.texi style = ${emacsdir}/docstyle.texi -.PHONY: info dvi html pdf ps echo-info echo-sources $(INFO_TARGETS) +.PHONY: info dvi html pdf ps echo-info echo-sources $(patsubst info, info-doc, $(INFO_TARGETS)) ## Prevent implicit rule triggering for foo.info. .SUFFIXES: ## Disable implicit rules. %.texi: ; -# Default. -info: $(INFO_TARGETS) +# Default. patsubst as "info" is already taken. +info: $(patsubst info, info-doc,$(INFO_TARGETS)) ## Used by top-level Makefile. ## Base file names of output info files. @@ -164,15 +162,13 @@ ${buildinfodir}/%$(lang_suffix).info: ${srcdir}/$(lang_subdir)%$(lang_suffix).te ## The short aliases, eg efaq = $(buildinfodir)/efaq.info. define info_template - $(1): $$(buildinfodir)/$(1)$$(lang_suffix).info +## patsubst as "info" is already taken. +$$(patsubst info, info-doc, $(1)): $$(buildinfodir)/$(1)$$(lang_suffix).info $$(buildinfodir)/$(1)$$(lang_suffix).info: $$(srcdir)/$$(lang_subdir)$(1)$$(lang_suffix).texi $$(gfdl) $$(style) endef -## "info" is already taken. -info.info: $(buildinfodir)/info.info - -$(foreach ifile,$(filter-out info.info,$(INFO_TARGETS)),$(eval $(call info_template,$(ifile)))) +$(foreach ifile,$(INFO_TARGETS),$(eval $(call info_template,$(ifile)))) %$(lang_suffix).dvi: ${srcdir}/$(lang_subdir)%$(lang_suffix).texi ${gfdl} ${style} diff --git a/doc/translations/default/info_common.mk b/doc/translations/default/info_common.mk index 9c09f5a0cec..56c505c8b10 100644 --- a/doc/translations/default/info_common.mk +++ b/doc/translations/default/info_common.mk @@ -2,7 +2,7 @@ INFO_COMMON = auth autotype bovine calc ccmode cl dbus dired-x \ ebrowse ede ediff edt efaq eglot eieio emacs-gnutls \ emacs-mime epa erc ert eshell eudc eww flymake forms gnus \ - htmlfontify idlwave ido info.info mairix-el message mh-e \ + htmlfontify idlwave ido info mairix-el message mh-e \ modus-themes newsticker nxml-mode octave-mode org pcl-cvs pgg \ rcirc reftex remember sasl sc semantic ses sieve smtpmail \ speedbar srecode todo-mode tramp transient url use-package \ From 2455b32dd31689e75bd34101431c9410297e5aca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Bela=C3=AFche?= Date: Sat, 2 May 2026 14:50:17 +0200 Subject: [PATCH 024/125] Move Texinfo related autoconf code to a new separate texinfo.m4 file. --- configure.ac | 39 +--------------------------------- m4/texinfo.m4 | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 38 deletions(-) create mode 100644 m4/texinfo.m4 diff --git a/configure.ac b/configure.ac index ef64ef5918d..7e85646bd4c 100644 --- a/configure.ac +++ b/configure.ac @@ -2107,44 +2107,7 @@ if test $opsys = darwin; then AC_PATH_PROG([HAVE_MACPORTS], [port]) fi -## Require makeinfo >= 4.13 (last of the 4.x series) to build the manuals. -: ${MAKEINFO:=makeinfo} -case `($MAKEINFO --version) 2>/dev/null` in - *' (GNU texinfo) '4.1[[3-9]]* | \ - *' (GNU texinfo) '[[5-9]]* | \ - *' (GNU texinfo) '[[1-9][0-9]]* ) ;; - *) MAKEINFO=no;; -esac - -## Makeinfo is unusual. For a released Emacs, the manuals are -## pre-built, and not deleted by the normal clean rules. makeinfo is -## therefore in the category of "special tools" not normally required, which -## configure does not have to check for (eg autoconf itself). -## In a repository checkout on the other hand, the manuals are not included. -## So makeinfo is a requirement to build from the repository, and configure -## should test for it as it does for any other build requirement. -## We use the presence of $srcdir/info/emacs to distinguish a release, -## with pre-built manuals, from a repository checkout. -if test "$MAKEINFO" = "no"; then - MAKEINFO=makeinfo - if test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then - AC_MSG_ERROR( [You do not seem to have makeinfo >= 4.13, and your -source tree does not seem to have pre-built manuals in the 'info' directory. -Please install a suitable version of makeinfo.] ) - else - AC_MSG_WARN( [You do not seem to have makeinfo >= 4.13. -You will not be able to rebuild the manuals if you delete them or change -their sources.] ) - fi -fi -AC_SUBST([MAKEINFO]) - -if test $opsys = mingw32; then - DOCMISC_W32=efaq-w32 -else - DOCMISC_W32= -fi -AC_SUBST([DOCMISC_W32]) +gl_TEXINFO dnl Add our options to ac_link now, after it is set up. diff --git a/m4/texinfo.m4 b/m4/texinfo.m4 new file mode 100644 index 00000000000..66e8abd8602 --- /dev/null +++ b/m4/texinfo.m4 @@ -0,0 +1,58 @@ +# texinfo.m4 +dnl Copyright (C) 2026 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl This file is offered as-is, without any warranty. +dnl +dnl +AC_DEFUN([gl_TEXINFO],[dnl +AC_REQUIRE([gl_SET_MAKEINFO]) +AC_REQUIRE([gl_SET_DOCMISC_W32]) +]) +dnl +dnl gl_FIND_MAKEINFO +AC_DEFUN([gl_SET_MAKEINFO],[dnl +[## Require makeinfo >= 4.13 (last of the 4.x series) to build the manuals. +: ${MAKEINFO:=makeinfo} +case `($MAKEINFO --version) 2>/dev/null` in + *' (GNU texinfo) '4.1[[3-9]]* | \ + *' (GNU texinfo) '[[5-9]]* | \ + *' (GNU texinfo) '[[1-9][0-9]]* ) ;; + *) MAKEINFO=no;; +esac + +## Makeinfo is unusual. For a released Emacs, the manuals are +## pre-built, and not deleted by the normal clean rules. makeinfo is +## therefore in the category of "special tools" not normally required, which +## configure does not have to check for (eg autoconf itself). +## In a repository checkout on the other hand, the manuals are not included. +## So makeinfo is a requirement to build from the repository, and configure +## should test for it as it does for any other build requirement. +## We use the presence of $srcdir/info/emacs to distinguish a release, +## with pre-built manuals, from a repository checkout. +if test "$MAKEINFO" = "no"; then + MAKEINFO=makeinfo + if test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then + ]AC_MSG_ERROR( [You do not seem to have makeinfo >= 4.13, and your +source tree does not seem to have pre-built manuals in the 'info' directory. +Please install a suitable version of makeinfo.] )[ + else + ]AC_MSG_WARN( [You do not seem to have makeinfo >= 4.13. +You will not be able to rebuild the manuals if you delete them or change +their sources.] )[ + fi +fi +]AC_SUBST([MAKEINFO]) +]) +dnl +dnl gl_SET_DOCMISC_W32 +AC_DEFUN([gl_SET_DOCMISC_W32],[dnl +[if test $opsys = mingw32; then + DOCMISC_W32=efaq-w32 +else + DOCMISC_W32= +fi +]AC_SUBST([DOCMISC_W32]) +]) +dnl From e3b2d6f862913e30c33f9b3b5789e4cf0c844f27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Bela=C3=AFche?= Date: Sat, 2 May 2026 19:19:58 +0200 Subject: [PATCH 025/125] Set DOCLANGS with autoconf depending on texinfo.tex/texindex versions. --- Makefile.in | 3 +-- m4/texinfo.m4 | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index d5a78c1d694..b9164afa55d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -115,8 +115,7 @@ HAVE_GSETTINGS = @HAVE_GSETTINGS@ ANDROID = @ANDROID@ -# TODO : make a configure option to keep only desired languages -DOCLANGS?=default fr +DOCLANGS?=@DOCLANGS@ # ==================== Where To Install Things ==================== diff --git a/m4/texinfo.m4 b/m4/texinfo.m4 index 66e8abd8602..d7fecfec73b 100644 --- a/m4/texinfo.m4 +++ b/m4/texinfo.m4 @@ -9,6 +9,7 @@ dnl AC_DEFUN([gl_TEXINFO],[dnl AC_REQUIRE([gl_SET_MAKEINFO]) AC_REQUIRE([gl_SET_DOCMISC_W32]) +AC_REQUIRE([gl_SET_DOCLANGS]) ]) dnl dnl gl_FIND_MAKEINFO @@ -56,3 +57,51 @@ fi ]AC_SUBST([DOCMISC_W32]) ]) dnl +dnl gl_dollar is needed for $1, $2 etc. in AWK snippets not to be intepreted by +dnl M4 as macros arguments. +m4_define([gl_dollar],[m4_quote([$])])dnl +m4_define([gl_DOCLANGS_FULL],[[default fr]])dnl +dnl This is minimal texinfo.tex version with "-" removed from the ISO date +dnl part from which there is no issue with index key sorting when document +dnl language/encoding corresponding locale is not installer nor active. +dnl See texinfo version 836b8924560. +m4_define([gl_TEXINFO_TEX_MINVER],[[20260426.12]])dnl +m4_define([gl_TEXINDEX_MINVER],[[7.1]])dnl +m4_define([gl_TEXINFO_INDEXING_IS_LOCALE_DEPENDANT],[dnl +[DOCLANGS='default'] +AC_MSG_WARN([texinfo.tex/texindex versions suggest that indexing is locale dependant, manual compilation is restricted to lang 'default', override this by setting DOCLANGS in the environment]) +])dnl +m4_define([gl_GET_TEXINFO_TEX_VER],[dnl +[texinfo_tex_ver=`tex -jobname=conftest '\nonstopmode\input texinfo.tex @typeout{TEXINFO_TEX_VER=@texinfoversion}@bye' | awk 'BEGIN{R=1;FS="="};]gl_dollar[1=="TEXINFO_TEX_VER" { gsub("-","");print ]gl_dollar[2; R=0; exit}; END{ exit R}'` +if test $? -ne 0; then + texinfo_tex_ver_ver=0.0] + AC_MSG_WARN([Can't find texinfo.tex version, check tex and texinfo.tex are installed.]) +[fi +]])dnl +m4_define([gl_GET_TEXINDEX_VER],[dnl +[texindex_ver=`texindex --version | awk 'BEGIN { R=1};NR==1 && ]gl_dollar[1 == "texindex"{ print $NF; R=0; exit}; {exit}; END { exit R}'` +if test $? -ne 0; then + texindex_ver=0.0] + AC_MSG_WARN([Can't find texindex version, check texindex is installed.]) +[fi +] +])dnl +AC_DEFUN([gl_TEXINFO_VERSION_COMPARE],[dnl +AC_REQUIRE([AS_VERSION_COMPARE]) +AS_VERSION_COMPARE([$1],[$2],[gl_TEXINFO_INDEXING_IS_LOCALE_DEPENDANT()],[$3],[$3])dnl +])dnl +dnl gl_SET_DOCLANGS +AC_DEFUN([gl_SET_DOCLANGS],[dnl +AC_REQUIRE([gl_TEXINFO_VERSION_COMPARE]) +AC_ARG_VAR([DOCLANGS],[languages for which manuals are compiled, languages supported: ]gl_DOCLANGS_FULL()[, list is space separated]) +gl_GET_TEXINFO_TEX_VER() +gl_GET_TEXINDEX_VER() +gl_TEXINFO_VERSION_COMPARE([$texinfo_tex_ver],[gl_TEXINFO_TEX_MINVER()],[dnl + gl_TEXINFO_VERSION_COMPARE([$texindex_ver],[gl_TEXINDEX_MINVER()],[dnl + [DOCLANGS=']gl_DOCLANGS_FULL()['] + AC_MSG_NOTICE([texinfo.tex/texindex versions suggest that indexing is not locale dependant, setting DOCLANGS to ']gl_DOCLANGS_FULL()[']) + ]) +]) +AC_SUBST([DOCLANGS]) +]) +dnl From 5eaacff65b7c2dbce8c0493a3a8dbdf3243fe2d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Bela=C3=AFche?= Date: Sat, 2 May 2026 20:27:48 +0200 Subject: [PATCH 026/125] Add a checking/result message for DOCLANGS derivation. --- m4/texinfo.m4 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/m4/texinfo.m4 b/m4/texinfo.m4 index d7fecfec73b..53d9bb35103 100644 --- a/m4/texinfo.m4 +++ b/m4/texinfo.m4 @@ -94,6 +94,7 @@ dnl gl_SET_DOCLANGS AC_DEFUN([gl_SET_DOCLANGS],[dnl AC_REQUIRE([gl_TEXINFO_VERSION_COMPARE]) AC_ARG_VAR([DOCLANGS],[languages for which manuals are compiled, languages supported: ]gl_DOCLANGS_FULL()[, list is space separated]) +AC_MSG_CHECKING([for DOCLANGS derivation from texinfo.tex/texindex versions]) gl_GET_TEXINFO_TEX_VER() gl_GET_TEXINDEX_VER() gl_TEXINFO_VERSION_COMPARE([$texinfo_tex_ver],[gl_TEXINFO_TEX_MINVER()],[dnl @@ -102,6 +103,7 @@ gl_TEXINFO_VERSION_COMPARE([$texinfo_tex_ver],[gl_TEXINFO_TEX_MINVER()],[dnl AC_MSG_NOTICE([texinfo.tex/texindex versions suggest that indexing is not locale dependant, setting DOCLANGS to ']gl_DOCLANGS_FULL()[']) ]) ]) +AC_MSG_RESULT([[']$DOCLANGS[']]) AC_SUBST([DOCLANGS]) ]) dnl From 02c806cb4747692a27e85341ee8c1c6de12b5852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Bela=C3=AFche?= Date: Sat, 2 May 2026 23:54:39 +0200 Subject: [PATCH 027/125] Use a shell function to delay message. Do not insert a message between AC_MSG_CHECKING and AC_MSG_RESULT. --- m4/texinfo.m4 | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/m4/texinfo.m4 b/m4/texinfo.m4 index 53d9bb35103..e5316d5b590 100644 --- a/m4/texinfo.m4 +++ b/m4/texinfo.m4 @@ -68,15 +68,18 @@ dnl See texinfo version 836b8924560. m4_define([gl_TEXINFO_TEX_MINVER],[[20260426.12]])dnl m4_define([gl_TEXINDEX_MINVER],[[7.1]])dnl m4_define([gl_TEXINFO_INDEXING_IS_LOCALE_DEPENDANT],[dnl -[DOCLANGS='default'] -AC_MSG_WARN([texinfo.tex/texindex versions suggest that indexing is locale dependant, manual compilation is restricted to lang 'default', override this by setting DOCLANGS in the environment]) -])dnl +[DOCLANGS='default' +gl_fn_doclangs_info () {] + AC_MSG_WARN([texinfo.tex/texindex versions suggest that indexing is locale dependant, manual compilation is restricted to lang 'default', override this by setting DOCLANGS in the environment]) +[}]])dnl m4_define([gl_GET_TEXINFO_TEX_VER],[dnl [texinfo_tex_ver=`tex -jobname=conftest '\nonstopmode\input texinfo.tex @typeout{TEXINFO_TEX_VER=@texinfoversion}@bye' | awk 'BEGIN{R=1;FS="="};]gl_dollar[1=="TEXINFO_TEX_VER" { gsub("-","");print ]gl_dollar[2; R=0; exit}; END{ exit R}'` if test $? -ne 0; then - texinfo_tex_ver_ver=0.0] - AC_MSG_WARN([Can't find texinfo.tex version, check tex and texinfo.tex are installed.]) -[fi + texinfo_tex_ver_ver=0.0 + gl_fn_doclangs_info () {] + AC_MSG_WARN([Can't find texinfo.tex version, check tex and texinfo.tex are installed.]) +[ } +fi ]])dnl m4_define([gl_GET_TEXINDEX_VER],[dnl [texindex_ver=`texindex --version | awk 'BEGIN { R=1};NR==1 && ]gl_dollar[1 == "texindex"{ print $NF; R=0; exit}; {exit}; END { exit R}'` @@ -95,15 +98,19 @@ AC_DEFUN([gl_SET_DOCLANGS],[dnl AC_REQUIRE([gl_TEXINFO_VERSION_COMPARE]) AC_ARG_VAR([DOCLANGS],[languages for which manuals are compiled, languages supported: ]gl_DOCLANGS_FULL()[, list is space separated]) AC_MSG_CHECKING([for DOCLANGS derivation from texinfo.tex/texindex versions]) +dnl By default nothing to inform about +[gl_fn_doclangs_info () { :; }] gl_GET_TEXINFO_TEX_VER() gl_GET_TEXINDEX_VER() gl_TEXINFO_VERSION_COMPARE([$texinfo_tex_ver],[gl_TEXINFO_TEX_MINVER()],[dnl gl_TEXINFO_VERSION_COMPARE([$texindex_ver],[gl_TEXINDEX_MINVER()],[dnl - [DOCLANGS=']gl_DOCLANGS_FULL()['] - AC_MSG_NOTICE([texinfo.tex/texindex versions suggest that indexing is not locale dependant, setting DOCLANGS to ']gl_DOCLANGS_FULL()[']) - ]) + [DOCLANGS=']gl_DOCLANGS_FULL()[' + gl_fn_doclangs_info () {] + AC_MSG_NOTICE([texinfo.tex/texindex versions suggest that indexing is not locale dependant]) + [}]]) ]) AC_MSG_RESULT([[']$DOCLANGS[']]) +gl_fn_doclangs_info AC_SUBST([DOCLANGS]) ]) dnl From 4870bc06fa36125ff7cb323a17dc67689f6d4109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Bela=C3=AFche?= Date: Thu, 14 May 2026 13:12:37 +0200 Subject: [PATCH 028/125] ses doc, add comment how to compile individually the manuals. --- doc/misc/ses.texi | 7 +++++++ doc/translations/fr/misc/ses-fr.texi | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/doc/misc/ses.texi b/doc/misc/ses.texi index 3e6fbed95bb..3c11d8a17c0 100644 --- a/doc/misc/ses.texi +++ b/doc/misc/ses.texi @@ -9,6 +9,13 @@ @syncodeindex vr cp @syncodeindex ky cp @c %**end of header +@c compile info with +@c make -C doc/misc ../../info/ses.info +@c or just +@c make -C doc/misc ses +@c compile pdf with +@c make -C doc/misc ses.pdf + @copying This file documents @acronym{SES}: the Simple Emacs Spreadsheet. diff --git a/doc/translations/fr/misc/ses-fr.texi b/doc/translations/fr/misc/ses-fr.texi index 10bb20420a9..4e204ad94e5 100644 --- a/doc/translations/fr/misc/ses-fr.texi +++ b/doc/translations/fr/misc/ses-fr.texi @@ -10,6 +10,12 @@ @syncodeindex vr cp @syncodeindex ky cp @c %**end of header +@c compiler info avec +@c make -C doc/misc ../../info/ses-fr.info LANG=fr +@c ou juste +@c make -C doc/misc ses LANG=fr +@c compiler pdf avec +@c make -C doc/misc ses-fr.pdf LANG=fr @copying Ce fichier documente @acronym{SES} : le tableur simple d’Emacs (Simple From 24879846852a577a348eb45c935ac2b31b632d94 Mon Sep 17 00:00:00 2001 From: Augusto Stoffel Date: Fri, 29 May 2026 09:46:40 +0200 Subject: [PATCH 029/125] * lisp/shell.el (shell): Fix typo: use process-live-p (bug#81145). --- lisp/shell.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/shell.el b/lisp/shell.el index 2730c417b49..acaa8e1f860 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -996,7 +996,7 @@ Make the shell buffer the current buffer, and return it. (lambda (proc event) (when sentinel (funcall sentinel proc event)) - (unless (buffer-live-p proc) + (unless (process-live-p proc) (kill-buffer buffer)))))) buffer) From 5c36f6c2283590d30b36f04d0e66eb2a9aacf32b Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 29 May 2026 15:41:58 +0200 Subject: [PATCH 030/125] Fix overquoting in gl_SET_MAKEINFO --- m4/texinfo.m4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/m4/texinfo.m4 b/m4/texinfo.m4 index e5316d5b590..251d039df2c 100644 --- a/m4/texinfo.m4 +++ b/m4/texinfo.m4 @@ -17,9 +17,9 @@ AC_DEFUN([gl_SET_MAKEINFO],[dnl [## Require makeinfo >= 4.13 (last of the 4.x series) to build the manuals. : ${MAKEINFO:=makeinfo} case `($MAKEINFO --version) 2>/dev/null` in - *' (GNU texinfo) '4.1[[3-9]]* | \ - *' (GNU texinfo) '[[5-9]]* | \ - *' (GNU texinfo) '[[1-9][0-9]]* ) ;; + *' (GNU texinfo) '4.1[3-9]* | \ + *' (GNU texinfo) '[5-9]* | \ + *' (GNU texinfo) '[1-9][0-9]* ) ;; *) MAKEINFO=no;; esac From 31ee3253523dd0c068ee5cc12c30454d4fed3961 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 29 May 2026 15:51:58 +0200 Subject: [PATCH 031/125] Fix build outside source directory --- doc/misc/Makefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index 10b6326a7a0..41ec7aa4566 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in @@ -65,7 +65,7 @@ MAKEINFO_OPTS = --force -I$(emacsdir) ifeq ($(LANG),) LANG:=default -else ifeq ($(wildcard ../translations/$(LANG)/info_common.mk),) +else ifeq ($(wildcard $(srcdir)/../translations/$(LANG)/info_common.mk),) LANG:=default endif @@ -76,7 +76,7 @@ lang_subdir:=$(filter-out ../translations/default/misc/,../translations/$(LANG)/ DOCMISC_W32 = @DOCMISC_W32@ ## Info files to build and install on all platforms. -include ../translations/$(LANG)/info_common.mk +include $(srcdir)/../translations/$(LANG)/info_common.mk ## Info files to install on current platform. INFO_INSTALL = $(INFO_COMMON) $(DOCMISC_W32) From 36c6908616562201f87fbbe4f0f5556baa5eeac7 Mon Sep 17 00:00:00 2001 From: Luniya DW Date: Tue, 26 May 2026 22:39:05 +0200 Subject: [PATCH 032/125] Refactor reftex-isearch-minor-mode to use define-minor-mode See L88 in etc/TODO. * lisp/textmodes/reftex-global.el (reftex-isearch-minor-mode): Use `define-minor-mode`. * lisp/textmodes/reftex.el (reftex-isearch-minor-mode): Remove redundant variable definition. --- lisp/textmodes/reftex-global.el | 73 ++++++++++++++++----------------- lisp/textmodes/reftex.el | 2 - 2 files changed, 35 insertions(+), 40 deletions(-) diff --git a/lisp/textmodes/reftex-global.el b/lisp/textmodes/reftex-global.el index e9acf91c824..54c5c97be01 100644 --- a/lisp/textmodes/reftex-global.el +++ b/lisp/textmodes/reftex-global.el @@ -440,7 +440,7 @@ Also checks if buffers visiting the files are in read-only mode." (t (setq nxt-buff (funcall isearch-next-buffer-function - (current-buffer))) + (current-buffer))) (if (not nxt-buff) (progn (error "Wrap backward")) @@ -475,54 +475,51 @@ Also checks if buffers visiting the files are in read-only mode." ;; NB this is a global autoload - see reftex.el. ;;;###autoload -(defun reftex-isearch-minor-mode (&optional arg) +(define-minor-mode reftex-isearch-minor-mode "When on, isearch searches the whole document, not only the current file. This minor mode allows isearch to search through all the files of the current TeX document. With no argument, this command toggles `reftex-isearch-minor-mode'. With a prefix argument ARG, turn -`reftex-isearch-minor-mode' on if ARG is positive, otherwise turn it off." - (interactive "P") - (let ((old-reftex-isearch-minor-mode reftex-isearch-minor-mode)) - (setq reftex-isearch-minor-mode - (not (or (and (null arg) reftex-isearch-minor-mode) - (<= (prefix-numeric-value arg) 0)))) - (unless (eq reftex-isearch-minor-mode old-reftex-isearch-minor-mode) - (if reftex-isearch-minor-mode - (progn - (dolist (crt-buf (buffer-list)) - (with-current-buffer crt-buf - (when reftex-mode - (if (boundp 'multi-isearch-next-buffer-function) - (setq-local multi-isearch-next-buffer-function - #'reftex-isearch-switch-to-next-file) - (setq-local isearch-wrap-function - #'reftex-isearch-wrap-function) - (setq-local isearch-search-fun-function - (lambda () #'reftex-isearch-isearch-search)) - (setq-local isearch-push-state-function - #'reftex-isearch-push-state-function) - (setq-local isearch-next-buffer-function - #'reftex-isearch-switch-to-next-file)) - (setq reftex-isearch-minor-mode t)))) - (add-hook 'reftex-mode-hook #'reftex-isearch-minor-mode)) +`reftex-isearch-minor-mode' on if ARG is positive, otherwise turn it off. +This behaviour is derived from `define-minor-mode'." + :lighter "/I" + :global t + (if reftex-isearch-minor-mode + (progn (dolist (crt-buf (buffer-list)) (with-current-buffer crt-buf (when reftex-mode (if (boundp 'multi-isearch-next-buffer-function) - (kill-local-variable 'multi-isearch-next-buffer-function) - (kill-local-variable 'isearch-wrap-function) - (kill-local-variable 'isearch-search-fun-function) - (kill-local-variable 'isearch-push-state-function) - (kill-local-variable 'isearch-next-buffer-function)) - (setq reftex-isearch-minor-mode nil)))) - (remove-hook 'reftex-mode-hook #'reftex-isearch-minor-mode))) - ;; Force mode line redisplay. - (set-buffer-modified-p (buffer-modified-p)))) + (setq-local multi-isearch-next-buffer-function + #'reftex-isearch-switch-to-next-file) + (setq-local isearch-wrap-function + #'reftex-isearch-wrap-function) + (setq-local isearch-search-fun-function + (lambda () #'reftex-isearch-isearch-search)) + (setq-local isearch-push-state-function + #'reftex-isearch-push-state-function) + (setq-local isearch-next-buffer-function + #'reftex-isearch-switch-to-next-file)) + (setq reftex-isearch-minor-mode t)))) + (add-hook 'reftex-mode-hook #'reftex-isearch-minor-mode)) + (dolist (crt-buf (buffer-list)) + (with-current-buffer crt-buf + (when reftex-mode + (if (boundp 'multi-isearch-next-buffer-function) + (kill-local-variable 'multi-isearch-next-buffer-function) + (kill-local-variable 'isearch-wrap-function) + (kill-local-variable 'isearch-search-fun-function) + (kill-local-variable 'isearch-push-state-function) + (kill-local-variable 'isearch-next-buffer-function)) + (setq reftex-isearch-minor-mode nil)))) + (remove-hook 'reftex-mode-hook #'reftex-isearch-minor-mode)) + ;; Force mode line redisplay. + (set-buffer-modified-p (buffer-modified-p))) + + -(add-minor-mode 'reftex-isearch-minor-mode "/I" nil nil - 'reftex-isearch-minor-mode) ;;; reftex-global.el ends here diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index 4e2c89e87dc..c0533ada842 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -2180,8 +2180,6 @@ fonts. Currently it is only used for reftex-label-face." ;; Define a menu for the menu bar if Emacs is running under X -(defvar-local reftex-isearch-minor-mode nil) - (easy-menu-define reftex-mode-menu reftex-mode-map "Menu used in RefTeX mode." `("Ref" From a2379402fc9d4aed342d85c171cbddea8be37862 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 29 May 2026 17:36:06 -0400 Subject: [PATCH 033/125] (reftex-isearch-minor-mode): A few more simplifications * lisp/textmodes/reftex-global.el (reftex-isearch-minor-mode): Simplify docstring. Remove redundant `setq`s and mode line update. --- lisp/textmodes/reftex-global.el | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/lisp/textmodes/reftex-global.el b/lisp/textmodes/reftex-global.el index 54c5c97be01..8f6f0a1445a 100644 --- a/lisp/textmodes/reftex-global.el +++ b/lisp/textmodes/reftex-global.el @@ -478,14 +478,10 @@ Also checks if buffers visiting the files are in read-only mode." (define-minor-mode reftex-isearch-minor-mode "When on, isearch searches the whole document, not only the current file. This minor mode allows isearch to search through all the files of -the current TeX document. - -With no argument, this command toggles -`reftex-isearch-minor-mode'. With a prefix argument ARG, turn -`reftex-isearch-minor-mode' on if ARG is positive, otherwise turn it off. -This behaviour is derived from `define-minor-mode'." +the current TeX document." :lighter "/I" :global t + :group 'reftex (if reftex-isearch-minor-mode (progn (dolist (crt-buf (buffer-list)) @@ -501,8 +497,7 @@ This behaviour is derived from `define-minor-mode'." (setq-local isearch-push-state-function #'reftex-isearch-push-state-function) (setq-local isearch-next-buffer-function - #'reftex-isearch-switch-to-next-file)) - (setq reftex-isearch-minor-mode t)))) + #'reftex-isearch-switch-to-next-file))))) (add-hook 'reftex-mode-hook #'reftex-isearch-minor-mode)) (dolist (crt-buf (buffer-list)) (with-current-buffer crt-buf @@ -512,11 +507,8 @@ This behaviour is derived from `define-minor-mode'." (kill-local-variable 'isearch-wrap-function) (kill-local-variable 'isearch-search-fun-function) (kill-local-variable 'isearch-push-state-function) - (kill-local-variable 'isearch-next-buffer-function)) - (setq reftex-isearch-minor-mode nil)))) - (remove-hook 'reftex-mode-hook #'reftex-isearch-minor-mode)) - ;; Force mode line redisplay. - (set-buffer-modified-p (buffer-modified-p))) + (kill-local-variable 'isearch-next-buffer-function))))) + (remove-hook 'reftex-mode-hook #'reftex-isearch-minor-mode))) From 2955b51e80c189d9a9de47ff27fa16f08671dcb8 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 30 May 2026 11:13:08 +0300 Subject: [PATCH 034/125] ; * etc/NEWS: Document the change in mode-line faces. --- etc/NEWS | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 7fc998ff547..acc156ea80e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -572,6 +572,14 @@ ID. When called interactively, both functions prompt for an ID. ** Mode Line +--- +*** New definitions for mode-line faces under dark background mode. +The faces 'mode-line' and 'mode-line-highlight' now have separate +definitions for the dark background mode. Previously, these two faces +looked the same in both the light and dark background modes. To get the +previous visuals for these two faces, customize them to have the colors +"grey75" and "grey40", respectively, regardless of the background mode. + +++ *** New user option 'mode-line-collapse-minor-modes'. If non-nil, minor mode lighters on the mode line are collapsed into a From 69fd4b87f4db6acfb3f207db3f1673a5b6866d70 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 30 May 2026 13:17:00 +0300 Subject: [PATCH 035/125] Don't make buffer read-only when reverting if 'view-mode' was disabled * lisp/view.el (view--disable): Reset 'read-only-mode--state'. (Bug#81149) --- lisp/view.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/view.el b/lisp/view.el index ec69699108a..4e2e1f54c76 100644 --- a/lisp/view.el +++ b/lisp/view.el @@ -464,6 +464,10 @@ Entry to view-mode runs the normal hook `view-mode-hook'." ;; so that View mode stays off if read-only-mode is called. (if (local-variable-p 'view-read-only) (kill-local-variable 'view-read-only)) + ;; Reset the read-only state memory as well, so that 'revert-buffer' + ;; won't make the buffer read-only again. + (if (local-variable-p 'read-only-mode--state) + (setq-local read-only-mode--state nil)) (if buffer-read-only (setq buffer-read-only view-old-buffer-read-only))) From 72d890c43e70477d496a9a0ef36a61357dde1023 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 30 May 2026 13:41:22 +0300 Subject: [PATCH 036/125] ; Update the documentation of 'debug' --- doc/lispref/debugging.texi | 8 +++----- etc/NEWS | 5 +++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi index 8d498608da4..48f3c3f8257 100644 --- a/doc/lispref/debugging.texi +++ b/doc/lispref/debugging.texi @@ -638,11 +638,9 @@ debugger, etc.), and fills it with information about the stack of Lisp function calls. It then enters a recursive edit, showing the backtrace buffer in Debugger mode. In batch mode (more generally, when @code{noninteractive} is non-@code{nil}, @pxref{Batch Mode}), -this function shows the Lisp backtrace on the standard error stream, -and then kills Emacs, causing it to exit with a non-zero exit code -(@pxref{Killing Emacs}). Binding -@code{backtrace-on-error-noninteractive} to @code{nil} suppresses the -backtrace in batch mode, see below. +this function shows the Lisp backtrace on the standard error stream. +Binding @code{backtrace-on-error-noninteractive} to @code{nil} +suppresses the backtrace in batch mode, see below. The Debugger mode @kbd{c}, @kbd{d}, @kbd{j}, and @kbd{r} commands exit the recursive edit; then @code{debug} switches back to the previous diff --git a/etc/NEWS b/etc/NEWS index acc156ea80e..95bc966d47d 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -4222,6 +4222,11 @@ suggestions. So the 'M-?' command now works without a tags table. And the 'M-.' will show a message describing the several built-in options that will provide an Xref backend when used. ++++ +** Calling 'debug' in batch sessions no longer kills Emacs. +If you want Emacs to exit, your program will now have to call +'kill-emacs' explicitly. + * Lisp Changes in Emacs 31.1 From ec3d662de0bab08f8b68666d13c662c3193c2645 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Sun, 24 May 2026 10:46:54 -0400 Subject: [PATCH 037/125] Make HTML button elements tab-stoppable in eww (bug#81107) * lisp/net/eww.el (eww-form-submit): Call put-text-property to add help-echo and shr-tab-stop properties. (eww-tag-input): Exclude inputs with type="submit" when adding the help-echo and shr-tab-stop properties, since that's now done in eww-form-submit, called earlier for type="submit". --- lisp/net/eww.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 9acbaa52fa9..542afa41180 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1771,7 +1771,10 @@ just re-display the HTML already fetched." (put-text-property start (point) 'keymap eww-submit-map) ;; Pretend to touch-screen.el that this is a button. (put-text-property start (point) 'button t) - (insert " "))) + (insert " ") + (put-text-property start (1+ start) 'help-echo "Button") + ;; Mark this as an element we can TAB to. + (put-text-property start (1+ start) 'shr-tab-stop t))) (defun eww-form-checkbox (dom) (let ((start (point))) @@ -1991,7 +1994,8 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.") :value (or (dom-attr dom 'value) ""))))))) (t (eww-form-text dom))) - (unless (= start (point)) + (unless (or (= start (point)) + (equal type "submit")) (put-text-property start (1+ start) 'help-echo "Input field") ;; Mark this as an element we can TAB to. (put-text-property start (1+ start) 'shr-tab-stop t)))) From aac5e0457aeef68ddc64b25adf5039e69f3fdc17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Sat, 30 May 2026 14:28:32 +0100 Subject: [PATCH 038/125] Eglot: replace eglot-prefer-plaintext with eglot-documentation-renderer The old boolean 'eglot-prefer-plaintext' is replaced by the more expressive 'eglot-documentation-renderer', which can hold a major-mode symbol, t (plain text), or nil (auto-detect each time). By selecting a renderer once at startup the repeated per-request lookups are avoided, which helps with the slowness reported in bug#81150. * lisp/progmodes/eglot.el (eglot-prefer-plaintext): Declare obsolete alias to 'eglot-documentation-renderer'. (eglot-documentation-renderer): New defcustom, reworked from from eglot-prefer-plaintext. (eglot--accepted-formats): Use new variable. (eglot--format-markup): Use new variable. * etc/EGLOT-NEWS: Announce change. * doc/misc/eglot.texi (Customization Variables): Document eglot-documentation-renderer. --- doc/misc/eglot.texi | 12 ++++++++++++ etc/EGLOT-NEWS | 12 ++++++++---- lisp/progmodes/eglot.el | 35 +++++++++++++++++++++++++---------- 3 files changed, 45 insertions(+), 14 deletions(-) diff --git a/doc/misc/eglot.texi b/doc/misc/eglot.texi index d501fe32d5d..c7c296c24ff 100644 --- a/doc/misc/eglot.texi +++ b/doc/misc/eglot.texi @@ -996,6 +996,18 @@ same language server. That file is still outside your project will consider it to be part of the workspace. The default is @code{nil}. +@cindex markdown renderer +@item eglot-documentation-renderer +This variable controls how Eglot renders at-point documentation +imported from the server (@pxref{Eglot Features}). By default, the +variable's value is set during startup to a markdown renderer if +available, either @code{markdown-ts-view-mode} or +@code{gfm-view-mode}. These utilities visually enhance the +documentation content through fontification and other formatting. If +you set it to @code{t}, plain text will be requested from the server +and no rendering is attempted. If the variable's value is @code{nil}, +Eglot will attempt to find a suitable renderer every time. + @item eglot-mode-map This variable is the keymap for binding Eglot-related command. It is in effect only as long as the buffer is managed by Eglot. By default, it diff --git a/etc/EGLOT-NEWS b/etc/EGLOT-NEWS index eb4040d107e..f0f595fa500 100644 --- a/etc/EGLOT-NEWS +++ b/etc/EGLOT-NEWS @@ -32,11 +32,15 @@ New key bindings: 'k' shuts down, 'r' reconnects, 'e' visits the events buffer, 'w' shows workspace configuration, and 'RET' invokes 'eglot-describe-connection'. -** Eglot uses new built-in 'markdown-ts-mode' of Emacs 31 (bug#80127) +** New LSP documentation rendering backends (bug#80127) -This means that on newer versions of Emacs the external -'markdown-mode.el' package does not need to be installed to render -Markdown content. +Eglot uses new built-in 'markdown-ts-mode' of Emacs 31, which means that +on newer versions of Emacs the external 'markdown-mode.el' package does +not need to be installed to render Markdown content. + +The variable 'eglot-documentation-renderer' replaces the now-obsolete +'eglot-prefer-plaintext'. By default, the variable selects a markdown +renderer to use throughout the session. * Changes in Eglot 1.23 (2/4/2026) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index e945dfb9739..504a5e12112 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -149,6 +149,8 @@ 'eglot-managed-mode-hook "1.6") (define-obsolete-variable-alias 'eglot-confirm-server-initiated-edits 'eglot-confirm-server-edits "1.16") +(define-obsolete-variable-alias 'eglot-prefer-plaintext + 'eglot-documentation-renderer "1.24") (make-obsolete-variable 'eglot-events-buffer-size 'eglot-events-buffer-config "1.16") (define-obsolete-function-alias 'eglot--uri-to-path #'eglot-uri-to-path "1.16") @@ -535,10 +537,21 @@ or file operation kinds not in the alist." "If non-nil, activate Eglot in cross-referenced non-project files." :type 'boolean) -(defcustom eglot-prefer-plaintext nil - "If non-nil, always request plaintext responses to hover requests." - :type 'boolean - :package-version '(Eglot . "1.17.30")) +(defcustom eglot-documentation-renderer (cond ((eglot--builtin-mdown-p) + 'markdown-ts-view-mode) + ((fboundp 'gfm-view-mode) + 'gfm-view-mode) + (t + nil)) + "Control rendering of LSP documentation fragments. +If set to a major mode symbol `gfm-view-mode' or `markdown-ts-view-mode' +request markdown-snippets and use the corresponding Markdown renderer. +If t, always request and render plain text snippets. If set to nil, +decide dynamically." + :type '(choice (const :tag "Plain text" t) + (const :tag "Auto-detect" nil) + (function :tag "Renderer")) + :package-version '(Eglot . "1.24")) (defcustom eglot-report-progress t "If non-nil, show progress of long running LSP server work. @@ -733,7 +746,7 @@ This can be useful when using docker to run a language server.") (treesit-grammar-location 'markdown))) (defun eglot--accepted-formats () - (if (and (not eglot-prefer-plaintext) + (if (and (not (eq t eglot-documentation-renderer)) (or (fboundp 'gfm-view-mode) (eglot--builtin-mdown-p))) ["markdown" "plaintext"] ["plaintext"])) @@ -2263,12 +2276,14 @@ If MODE, force MODE to be used for fontifying MARKUP." finally return (buffer-string))) (calc2 (forced-mode) (cond - (forced-mode `(,forced-mode)) - ((eglot--builtin-mdown-p) `(,#'markdown-ts-view-mode)) - ((fboundp 'gfm-view-mode) `(,#'gfm-view-mode ,#'gfm-extract)) - (t `(#'text-mode)))) + (forced-mode forced-mode) + ((fboundp eglot-documentation-renderer) eglot-documentation-renderer) + ((eglot--builtin-mdown-p) #'markdown-ts-view-mode) + ((fboundp 'gfm-view-mode) #'gfm-view-mode) + (t #'text-mode))) (calc (s &optional (forced-mode mode) &aux (x (calc2 forced-mode))) - (setq string s render (car x) extract (or (cadr x) #'buffer-string)))) + (setq string s render x + extract (if (eq x 'gfm-view-mode) #'gfm-extract #'buffer-string)))) (cond ((stringp markup) (calc markup)) ; plain string ((setq lang (plist-get markup :language)) ; deprecated MarkedString (calc (format "```%s\n%s\n```" lang (plist-get markup :value)))) From 085eeb1bddea742d1454c07c4c9bba16ef4ba880 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 31 May 2026 08:28:25 +0300 Subject: [PATCH 039/125] Fix rules in doc/misc/Makefile.in * doc/misc/Makefile.in (INFO_TARGETS): Always build efaq-w32.info. (info_template): Remove unnecessary extra prerequisite for $$(buildinfodir)/$(1)$$(lang_suffix).info, which repeats an existing pattern rule and causes ccmode.info be constantly regenerated. --- doc/misc/Makefile.in | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index 41ec7aa4566..a9c4ac537a8 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in @@ -84,7 +84,7 @@ INFO_INSTALL = $(INFO_COMMON) $(DOCMISC_W32) ## Info files to build on current platform. ## This is all of them, even though they might not all get installed, ## because the info files are pre-built in release tarfiles. -INFO_TARGETS = $(INFO_COMMON) $(DOCMISC_W32_TARGET) +INFO_TARGETS = $(INFO_COMMON) efaq-w32 ## Some manuals have their source in .org format. ## This is discouraged because the .texi files it generates @@ -164,8 +164,6 @@ ${buildinfodir}/%$(lang_suffix).info: ${srcdir}/$(lang_subdir)%$(lang_suffix).te define info_template ## patsubst as "info" is already taken. $$(patsubst info, info-doc, $(1)): $$(buildinfodir)/$(1)$$(lang_suffix).info - -$$(buildinfodir)/$(1)$$(lang_suffix).info: $$(srcdir)/$$(lang_subdir)$(1)$$(lang_suffix).texi $$(gfdl) $$(style) endef $(foreach ifile,$(INFO_TARGETS),$(eval $(call info_template,$(ifile)))) From c4803e57c8c00ea7dac35f8ed3232d08737e3a24 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 31 May 2026 08:41:59 +0300 Subject: [PATCH 040/125] ; * doc/translations/fr/info_common.mk: Fix typos. --- doc/translations/fr/info_common.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/translations/fr/info_common.mk b/doc/translations/fr/info_common.mk index e72440fe69a..9db4f4f540f 100644 --- a/doc/translations/fr/info_common.mk +++ b/doc/translations/fr/info_common.mk @@ -1,8 +1,8 @@ -## Info files to build and install on all platforms (onl ses has been -## translated to Frenchj) +## Info files to build and install on all platforms (only ses has been +## translated to French) INFO_COMMON = ses -## efac-w32 has not been translated to French +## efaq-w32 has not been translated to French DOCMISC_W32:=# DOCMISC_W32_TARGET:=# From 0bfbe06090c468c1edef835fdf4af226b88461c9 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 31 May 2026 01:42:27 -0400 Subject: [PATCH 041/125] Update to Org 9.8.5 --- etc/refcards/orgcard.tex | 2 +- lisp/org/org-agenda.el | 2 +- lisp/org/org-clock.el | 16 +++++++++------- lisp/org/org-colview.el | 1 + lisp/org/org-table.el | 8 +++++--- lisp/org/org-timer.el | 2 +- lisp/org/org-version.el | 4 ++-- lisp/org/org.el | 2 +- lisp/org/ox-koma-letter.el | 1 - lisp/org/ox-latex.el | 2 +- lisp/org/ox-odt.el | 2 +- 11 files changed, 23 insertions(+), 19 deletions(-) diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex index dcd3208d132..8b38b98897e 100644 --- a/etc/refcards/orgcard.tex +++ b/etc/refcards/orgcard.tex @@ -1,5 +1,5 @@ % Reference Card for Org Mode -\def\orgversionnumber{9.8.3} +\def\orgversionnumber{9.8.5} \def\versionyear{2026} % latest update \input emacsver.tex diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index dd86a716ac7..481eba50313 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -7875,7 +7875,7 @@ in the agenda." "Rebuild possibly ALL agenda view(s) in the current buffer." (interactive "P") (defvar org-agenda-tag-filter-while-redo) ;FIXME: Where is this var used? - (let* ((p (or (and (looking-at "\\'") (1- (point))) (point))) + (let* ((p (or (and (/= 1 (point)) (looking-at "\\'") (1- (point))) (point))) (cpa (unless (eq all t) current-prefix-arg)) (org-agenda-doing-sticky-redo org-agenda-sticky) (org-agenda-sticky nil) diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index ce2d23a9b97..b803d0fe874 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el @@ -1991,13 +1991,15 @@ Optional argument N tells to change by that many units." (user-error "No active clock")) (save-excursion ; Do not replace this with `with-current-buffer'. (with-no-warnings (set-buffer (org-clocking-buffer))) - (goto-char org-clock-marker) - (if (looking-back (concat "^[ \t]*" org-clock-string ".*") - (line-beginning-position)) - (progn (delete-region (1- (line-beginning-position)) (line-end-position)) - (org-remove-empty-drawer-at (point))) - (message "Clock gone, cancel the timer anyway") - (sit-for 2))) + (save-restriction + (widen) + (goto-char org-clock-marker) + (if (looking-back (concat "^[ \t]*" org-clock-string ".*") + (line-beginning-position)) + (progn (delete-region (1- (line-beginning-position)) (line-end-position)) + (org-remove-empty-drawer-at (point))) + (message "Clock gone, cancel the timer anyway") + (sit-for 2)))) (move-marker org-clock-marker nil) (move-marker org-clock-hd-marker nil) (setq org-clock-current-task nil) diff --git a/lisp/org/org-colview.el b/lisp/org/org-colview.el index 8b97aa2ad01..6eed2351ceb 100644 --- a/lisp/org/org-colview.el +++ b/lisp/org/org-colview.el @@ -3,6 +3,7 @@ ;; Copyright (C) 2004-2026 Free Software Foundation, Inc. ;; Author: Carsten Dominik +;; Maintainer: Slawomir Grochowski ;; Keywords: outlines, hypermedia, calendar, text ;; URL: https://orgmode.org ;; diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index ba33f6724a0..32cea3e4b0b 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el @@ -2953,6 +2953,8 @@ known that the table will be realigned a little later anyway." (log-first-time (current-time)) (log-last-time log-first-time) (cnt 0) + (table-beg org-table-current-begin-pos) + (table-end (org-table-end)) beg end eqlcol eqlfield) ;; Insert constants in all formulas. (when eqlist @@ -2989,8 +2991,8 @@ existing formula for column %s" ;; Get the correct line range to process. (if all (progn - (setq end (copy-marker (org-table-end))) - (goto-char (setq beg org-table-current-begin-pos)) + (setq end (copy-marker table-end)) + (goto-char (setq beg table-beg)) (cond ((re-search-forward org-table-calculate-mark-regexp end t) ;; This is a table with marked lines, compute selected @@ -3005,7 +3007,7 @@ existing formula for column %s" (t nil))) (setq beg (line-beginning-position) end (copy-marker (line-beginning-position 2)))) - (org-combine-change-calls beg end + (org-combine-change-calls table-beg table-end (goto-char beg) ;; Mark named fields untouchable. Also check if several ;; field/range formulas try to set the same field. diff --git a/lisp/org/org-timer.el b/lisp/org/org-timer.el index 8c9df9d379f..d6d7cfaa43b 100644 --- a/lisp/org/org-timer.el +++ b/lisp/org/org-timer.el @@ -436,7 +436,7 @@ using three \\[universal-argument] prefix arguments." (and (not (equal opt '(64))) effort-minutes (number-to-string effort-minutes)) - (and (consp opt) default-timer) + (and (consp opt) (not (equal opt '(64))) default-timer) (and (stringp opt) opt) (read-from-minibuffer "How much time left? (minutes or h:mm:ss) " diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el index b6a6d1d4eec..f0a212f2ef0 100644 --- a/lisp/org/org-version.el +++ b/lisp/org/org-version.el @@ -5,13 +5,13 @@ (defun org-release () "The release version of Org. Inserted by installing Org mode or when a release is made." - (let ((org-release "9.8.3")) + (let ((org-release "9.8.5")) org-release)) ;;;###autoload (defun org-git-version () "The Git version of Org mode. Inserted by installing Org or when a release is made." - (let ((org-git-version "release_9.8.3")) + (let ((org-git-version "release_9.8.5")) org-git-version)) (provide 'org-version) diff --git a/lisp/org/org.el b/lisp/org/org.el index 84b4f245f8e..ba31ad67bd1 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -9,7 +9,7 @@ ;; URL: https://orgmode.org ;; Package-Requires: ((emacs "28.2")) -;; Version: 9.8.3 +;; Version: 9.8.5 ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org/ox-koma-letter.el b/lisp/org/ox-koma-letter.el index 61b624e870d..3a17dceb2fb 100644 --- a/lisp/org/ox-koma-letter.el +++ b/lisp/org/ox-koma-letter.el @@ -6,7 +6,6 @@ ;; Alan Schmitt ;; Viktor Rosenfeld ;; Rasmus Pank Roulund -;; Maintainer: Marco Wahl ;; Keywords: org, text, tex ;; This file is part of GNU Emacs. diff --git a/lisp/org/ox-latex.el b/lisp/org/ox-latex.el index b4d1ada8d5e..1feddac37cd 100644 --- a/lisp/org/ox-latex.el +++ b/lisp/org/ox-latex.el @@ -3,7 +3,7 @@ ;; Copyright (C) 2011-2026 Free Software Foundation, Inc. ;; Author: Nicolas Goaziou -;; Maintainer: Daniel Fleischer +;; Maintainer: Pedro A. Aranda ;; Keywords: outlines, hypermedia, calendar, text ;; This file is part of GNU Emacs. diff --git a/lisp/org/ox-odt.el b/lisp/org/ox-odt.el index 232a643738f..03a47c86995 100644 --- a/lisp/org/ox-odt.el +++ b/lisp/org/ox-odt.el @@ -2869,7 +2869,7 @@ Style is a symbol among `quoted', `centered' and nil." (org-element-lineage paragraph '(center-block quote-block section))) - (center-block 'center) + (center-block 'centered) (quote-block 'quoted))) (defun org-odt--format-paragraph (paragraph contents info default center quote) From 3a0bce8f0283a7f095cfd66a1c7b6b2c35e2eaaf Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 31 May 2026 08:47:02 +0300 Subject: [PATCH 042/125] ; Fix a recent change * doc/misc/Makefile.in (DOCMISC_W32_TARGET): Define. --- doc/misc/Makefile.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index a9c4ac537a8..bb09f15f65a 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in @@ -74,6 +74,7 @@ lang_subdir:=$(filter-out ../translations/default/misc/,../translations/$(LANG)/ ## On MS Windows, efaq-w32; otherwise blank. DOCMISC_W32 = @DOCMISC_W32@ +DOCMISC_W32_TARGET = efaq-w32 ## Info files to build and install on all platforms. include $(srcdir)/../translations/$(LANG)/info_common.mk @@ -84,7 +85,7 @@ INFO_INSTALL = $(INFO_COMMON) $(DOCMISC_W32) ## Info files to build on current platform. ## This is all of them, even though they might not all get installed, ## because the info files are pre-built in release tarfiles. -INFO_TARGETS = $(INFO_COMMON) efaq-w32 +INFO_TARGETS = $(INFO_COMMON) $(DOCMISC_W32_TARGET) ## Some manuals have their source in .org format. ## This is discouraged because the .texi files it generates From 64f4ce7b2d9d8bf8c291b8b6993f9b4ced51814c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 31 May 2026 11:36:15 +0300 Subject: [PATCH 043/125] Allow optionally disabling the use of TABs for TTY cursor movement * src/term.c (syms_of_term) : New var. : Doc fix. * src/cm.c (calccost): Use it to disable use of TABs for cursor motion on text terminals. * etc/NEWS: Announce the new variable. --- etc/NEWS | 12 ++++++++++++ src/cm.c | 3 ++- src/term.c | 13 ++++++++++++- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index a5806a99e31..e764545c508 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -37,6 +37,18 @@ exit status to 256 if sending input to that process returned EPIPE. Now when this happens, Emacs closes the file descriptor to write to the child process, but allows it to continue execution as normal. +--- +** New variable 'tty-cursor-movement-use-TAB'. +If this is set to the nil value, Emacs will not use TABs to optimize +cursor motion on text-mode terminals. This is for the rare cases where +the hardware tabs of the terminal were set to a non-default value by the +'tabs' command or similar, or if using TABs for cursor movement has any +other undesired effects. The default is t, which preserves past +behavior. + +If this variable is nil, 'tty-cursor-movement-use-TAB-BS' has no effect, +and Emacs will never use TABs for any cursor-movement sequences. + * Editing Changes in Emacs 32.1 diff --git a/src/cm.c b/src/cm.c index 4693b69c26e..f453fc2650a 100644 --- a/src/cm.c +++ b/src/cm.c @@ -225,7 +225,8 @@ calccost (struct tty_display_info *tty, goto dodelta; /* skip all the tab junk */ } /* Tabs (the toughie) */ - if (tty->Wcm->cc_tab >= BIG || !tty->Wcm->cm_usetabs) + if (!tty_cursor_movement_use_TAB + || tty->Wcm->cc_tab >= BIG || !tty->Wcm->cm_usetabs) goto olddelta; /* forget it! */ /* diff --git a/src/term.c b/src/term.c index 1a5ed74d698..8777a3b6a65 100644 --- a/src/term.c +++ b/src/term.c @@ -5263,9 +5263,20 @@ On TTY frames, as a display optimization, Emacs may move to a position by "overshooting" with TAB characters and one BACKSPACE character, when this is more efficient. This combination can interfere with the functioning of some software, such as screen readers. Set this to -non-nil to enable this optimization. */); +non-nil to enable this optimization. +If `tty-cursor-movement-use-TAB' is nil, this variable has no effect, +as Emacs will never use TABs for cursor movement. */); tty_cursor_movement_use_TAB_BS = 0; + DEFVAR_BOOL ("tty-cursor-movement-use-TAB", tty_cursor_movement_use_TAB, + doc: /* Whether TTY frames may use TAB for cursor motion. +On TTY frames, as a display optimization, Emacs may move cursor to a +position with TAB characters, when this is more efficient. This might +produce wrong results if the hardware tabs of the terminal were set to +be of different width than Emacs expects. Set this to nil to disable +using TABs for cursor motion. */); + tty_cursor_movement_use_TAB = 1; + defsubr (&Stty_display_color_p); defsubr (&Stty_display_color_cells); defsubr (&Stty_no_underline); From 75153f7b7693b8980e4b383fbcbcbb5600fdd076 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 31 May 2026 11:06:55 +0200 Subject: [PATCH 044/125] Fix clash with locale variable LANG is a locale variable, use INFO_LANG instead. * doc/misc/Makefile.in (INFO_LANG): Renamed from LANG, all uses changed. * doc/translations/fr/misc/ses-fr.texi: Use INFO_LANG instead of LANG. --- doc/misc/Makefile.in | 12 ++++++------ doc/translations/fr/misc/ses-fr.texi | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index bb09f15f65a..2cf4cf26eea 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in @@ -63,21 +63,21 @@ INSTALL_DATA = @INSTALL_DATA@ MAKEINFO = @MAKEINFO@ MAKEINFO_OPTS = --force -I$(emacsdir) -ifeq ($(LANG),) -LANG:=default +ifeq ($(INFO_LANG),) +INFO_LANG:=default else ifeq ($(wildcard $(srcdir)/../translations/$(LANG)/info_common.mk),) -LANG:=default +INFO_LANG:=default endif -lang_suffix:=$(filter-out -default,-$(LANG)) -lang_subdir:=$(filter-out ../translations/default/misc/,../translations/$(LANG)/misc/) +lang_suffix:=$(filter-out -default,-$(INFO_LANG)) +lang_subdir:=$(filter-out ../translations/default/misc/,../translations/$(INFO_LANG)/misc/) ## On MS Windows, efaq-w32; otherwise blank. DOCMISC_W32 = @DOCMISC_W32@ DOCMISC_W32_TARGET = efaq-w32 ## Info files to build and install on all platforms. -include $(srcdir)/../translations/$(LANG)/info_common.mk +include $(srcdir)/../translations/$(INFO_LANG)/info_common.mk ## Info files to install on current platform. INFO_INSTALL = $(INFO_COMMON) $(DOCMISC_W32) diff --git a/doc/translations/fr/misc/ses-fr.texi b/doc/translations/fr/misc/ses-fr.texi index 4e204ad94e5..9d17f174786 100644 --- a/doc/translations/fr/misc/ses-fr.texi +++ b/doc/translations/fr/misc/ses-fr.texi @@ -11,11 +11,11 @@ @syncodeindex ky cp @c %**end of header @c compiler info avec -@c make -C doc/misc ../../info/ses-fr.info LANG=fr +@c make -C doc/misc ../../info/ses-fr.info INFO_LANG=fr @c ou juste -@c make -C doc/misc ses LANG=fr +@c make -C doc/misc ses INFO_LANG=fr @c compiler pdf avec -@c make -C doc/misc ses-fr.pdf LANG=fr +@c make -C doc/misc ses-fr.pdf INFO_LANG=fr @copying Ce fichier documente @acronym{SES} : le tableur simple d’Emacs (Simple From f1dd84bec9947586d9bd12824a8084ef5edc2055 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 31 May 2026 12:29:50 +0300 Subject: [PATCH 045/125] ; * lisp/play/doctor.el (doctor-death): Fix Samaritans URL (bug#81155). --- lisp/play/doctor.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/play/doctor.el b/lisp/play/doctor.el index 54bdf799f95..7808278518d 100644 --- a/lisp/play/doctor.el +++ b/lisp/play/doctor.el @@ -1606,7 +1606,7 @@ Hack on previous word, setting global variable DOCTOR-OWNER to correct result." (setq doctor--suicide-flag t) (doctor-type '( If you are really suicidal\, you might want to contact the Samaritans via - e-mail: jo@samaritans.org \. + https://www.samaritans.org/how-we-can-help/contact-samaritan/ \. or find a Befrienders crisis center at https://www.befrienders.org/\ \. you can also find other suicide crisis lines at From 2727a6f4e8d07f3b6cd984fae90dc16f122e5796 Mon Sep 17 00:00:00 2001 From: Aaron Jensen Date: Sat, 30 May 2026 16:20:33 +0000 Subject: [PATCH 046/125] ; Document problems caused by validation of *.eln files on macOS * etc/PROBLEMS: Document slowdown on macOS caused by the OS validation of *.eln files. --- etc/PROBLEMS | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 655bfd6c173..c01b9e079ea 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -3646,6 +3646,38 @@ file; for example: "/usr/local/opt/libgccjit/lib/gcc/11" "/usr/local/opt/gcc/lib/gcc/11/gcc/x86_64-apple-darwin20/11.2.0") ":")) +** Stuttering and missed keypresses during Native Compilation on macOS + +Natively compiled modules are validated by macOS the first time that +they are loaded. On some machines, this can cause Emacs to be +temporarily less responsive while large batches of modules are being +compiled and loaded. + +One can force the first load of the module to happen in the async +compilation worker by adding this to their early-init.el: + +(setq native-comp-async-env-modifier-form + '(progn + (defun c/native-comp--preload-eln-after-compile + (compile function-or-file &optional with-late-load output) + "Preload async native-comp output in the compiler child." + (prog1 (funcall compile function-or-file with-late-load output) + (when (and (stringp function-or-file) with-late-load) + (with-demoted-errors "Async native .eln preload: %S" + (let ((eln-file (comp-el-to-eln-filename function-or-file))) + (when (file-exists-p eln-file) + (native-elisp-load eln-file t))))))) + + (advice-add 'comp--native-compile + :around #'c/native-comp--preload-eln-after-compile))) + +Alternatively, if one is willing to accept the associated security +risks, one could disable library validation on their Emacs binary: + +codesign --force --sign - \ + --entitlements macos-disable-library-validation.entitlements \ + src/emacs + ** Text dictation doesn't work on macOS The indication is that the macOS keyboard shortcut for dictation is ignored. From cc9f35c54bab5f2250c660ea475fc029bcc4bf94 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 31 May 2026 12:40:11 +0300 Subject: [PATCH 047/125] ; * etc/PROBLEMS: Minor fixes of last change. --- etc/PROBLEMS | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index c01b9e079ea..54302968e6d 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -3649,34 +3649,37 @@ file; for example: ** Stuttering and missed keypresses during Native Compilation on macOS Natively compiled modules are validated by macOS the first time that -they are loaded. On some machines, this can cause Emacs to be -temporarily less responsive while large batches of modules are being -compiled and loaded. +they are loaded. On some machines, this can cause Emacs to be +temporarily less responsive while a large number of '*.eln' files are +being compiled and loaded. One can force the first load of the module to happen in the async compilation worker by adding this to their early-init.el: -(setq native-comp-async-env-modifier-form - '(progn - (defun c/native-comp--preload-eln-after-compile - (compile function-or-file &optional with-late-load output) - "Preload async native-comp output in the compiler child." - (prog1 (funcall compile function-or-file with-late-load output) - (when (and (stringp function-or-file) with-late-load) - (with-demoted-errors "Async native .eln preload: %S" - (let ((eln-file (comp-el-to-eln-filename function-or-file))) - (when (file-exists-p eln-file) - (native-elisp-load eln-file t))))))) + (setq native-comp-async-env-modifier-form + '(progn + (defun c/native-comp--preload-eln-after-compile + (compile function-or-file &optional with-late-load output) + "Preload async native-comp output in the compiler child." + (prog1 (funcall compile function-or-file with-late-load output) + (when (and (stringp function-or-file) with-late-load) + (with-demoted-errors "Async native .eln preload: %S" + (let ((eln-file (comp-el-to-eln-filename function-or-file))) + (when (file-exists-p eln-file) + (native-elisp-load eln-file t))))))) - (advice-add 'comp--native-compile - :around #'c/native-comp--preload-eln-after-compile))) + (advice-add 'comp--native-compile + :around #'c/native-comp--preload-eln-after-compile))) Alternatively, if one is willing to accept the associated security risks, one could disable library validation on their Emacs binary: -codesign --force --sign - \ - --entitlements macos-disable-library-validation.entitlements \ - src/emacs + codesign --force --sign - \ + --entitlements macos-disable-library-validation.entitlements \ + src/emacs + +Disabling validation might expose you to security risks, so please +consider that before using this recipe. ** Text dictation doesn't work on macOS From c44f7ada0c01c3b0b774f6e6b7ed85d29e4887a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Bela=C3=AFche?= Date: Sat, 30 May 2026 16:26:55 +0200 Subject: [PATCH 048/125] Avoid using the LANG environment variable Amend commit 75153f7b769 " Fix clash with locale variable" by Andreas Schwab. Use DOCLANG instead of INFO_LANG for renaming, as documentation does not produce only info output, and DOCLANG is iterating over DOCLANGS. * Makefile.in: Rename 'LANG' to 'DOCLANG' to avoid clash with well-known environment variable. * doc/misc/Makefile.in: Adjusted accordingly, rename 'INFO_LANG' to 'DOCLANG' where Andreas had already renamed 'LANG'. * doc/translations/fr/misc/ses-fr.texi: rename 'INFO_LANG' to 'DOCLANG' in explanatory comment. --- Makefile.in | 8 ++++---- doc/misc/Makefile.in | 14 +++++++------- doc/translations/fr/misc/ses-fr.texi | 6 +++--- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Makefile.in b/Makefile.in index b9164afa55d..e0a8d1ae579 100644 --- a/Makefile.in +++ b/Makefile.in @@ -796,7 +796,7 @@ install-info: info [ -f "$(DESTDIR)${infodir}/dir" ] || \ [ ! -f ${srcdir}/info/dir ] || \ ${INSTALL_DATA} ${srcdir}/info/dir "$(DESTDIR)${infodir}/dir"; \ - info_misc="$(foreach lang,$(DOCLANGS),`MAKEFLAGS= $(MAKE) --no-print-directory -s -C doc/misc LANG=$(lang) echo-info`)"; \ + info_misc="$(foreach lang,$(DOCLANGS),`MAKEFLAGS= $(MAKE) --no-print-directory -s -C doc/misc DOCLANG=$(lang) echo-info`)"; \ cd ${srcdir}/info ; \ for elt in ${INFO_NONMISC} $${info_misc}; do \ for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \ @@ -946,7 +946,7 @@ uninstall: uninstall-$(NTDIR) uninstall-doc uninstall-gsettings-schemas done -rm -rf "$(DESTDIR)${libexecdir}/emacs/${version}" thisdir=`pwd -P`; \ - (info_misc="$(foreach lang,$(DOCLANGS),`MAKEFLAGS= $(MAKE) --no-print-directory -s -C doc/misc LANG=$(lang) echo-info`)"; \ + (info_misc="$(foreach lang,$(DOCLANGS),`MAKEFLAGS= $(MAKE) --no-print-directory -s -C doc/misc DOCLANG=$(lang) echo-info`)"; \ if cd "$(DESTDIR)${infodir}"; then \ for elt in ${INFO_NONMISC} $${info_misc}; do \ (cd "$${thisdir}"; \ @@ -1124,7 +1124,7 @@ TAGS tags: lib lib-src # src $(MAKE) -C doc/emacs tags $(MAKE) -C doc/lispintro tags $(MAKE) -C doc/lispref tags - $(foreach LANG,$(DOCLANGS),$(MAKE) -C doc/misc LANG=$(LANG) tags;) + $(foreach DOCLANG,$(DOCLANGS),$(MAKE) -C doc/misc DOCLANG=$(DOCLANG) tags;) CHECK_TARGETS = check check-maybe check-expensive check-all check-byte-compile .PHONY: $(CHECK_TARGETS) @@ -1147,7 +1147,7 @@ PSS = lispref-ps lispintro-ps emacs-ps misc-ps DOCS = $(DVIS) $(HTMLS) $(INFOS) $(PDFS) $(PSS) define MAKE_DOC $(1): - $(foreach lang,$(DOCLANGS),$$(MAKE) -C doc/$$(subst -, LANG=$(lang) ,$$@);) + $(foreach lang,$(DOCLANGS),$$(MAKE) -C doc/$$(subst -, DOCLANG=$(lang) ,$$@);) endef $(foreach doc,$(DOCS),$(eval $(call MAKE_DOC,$(doc)))) diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index 2cf4cf26eea..1d0a55e997e 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in @@ -63,21 +63,21 @@ INSTALL_DATA = @INSTALL_DATA@ MAKEINFO = @MAKEINFO@ MAKEINFO_OPTS = --force -I$(emacsdir) -ifeq ($(INFO_LANG),) -INFO_LANG:=default -else ifeq ($(wildcard $(srcdir)/../translations/$(LANG)/info_common.mk),) -INFO_LANG:=default +ifeq ($(DOCLANG),) +DOCLANG:=default +else ifeq ($(wildcard $(srcdir)/../translations/$(DOCLANG)/info_common.mk),) +DOCLANG:=default endif -lang_suffix:=$(filter-out -default,-$(INFO_LANG)) -lang_subdir:=$(filter-out ../translations/default/misc/,../translations/$(INFO_LANG)/misc/) +lang_suffix:=$(filter-out -default,-$(DOCLANG)) +lang_subdir:=$(filter-out ../translations/default/misc/,../translations/$(DOCLANG)/misc/) ## On MS Windows, efaq-w32; otherwise blank. DOCMISC_W32 = @DOCMISC_W32@ DOCMISC_W32_TARGET = efaq-w32 ## Info files to build and install on all platforms. -include $(srcdir)/../translations/$(INFO_LANG)/info_common.mk +include $(srcdir)/../translations/$(DOCLANG)/info_common.mk ## Info files to install on current platform. INFO_INSTALL = $(INFO_COMMON) $(DOCMISC_W32) diff --git a/doc/translations/fr/misc/ses-fr.texi b/doc/translations/fr/misc/ses-fr.texi index 9d17f174786..368858413f1 100644 --- a/doc/translations/fr/misc/ses-fr.texi +++ b/doc/translations/fr/misc/ses-fr.texi @@ -11,11 +11,11 @@ @syncodeindex ky cp @c %**end of header @c compiler info avec -@c make -C doc/misc ../../info/ses-fr.info INFO_LANG=fr +@c make -C doc/misc ../../info/ses-fr.info DOCLANG=fr @c ou juste -@c make -C doc/misc ses INFO_LANG=fr +@c make -C doc/misc ses DOCLANG=fr @c compiler pdf avec -@c make -C doc/misc ses-fr.pdf INFO_LANG=fr +@c make -C doc/misc ses-fr.pdf DOCLANG=fr @copying Ce fichier documente @acronym{SES} : le tableur simple d’Emacs (Simple From 1f662e2ab70486f7051ebc890620393e2a8879d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Bela=C3=AFche?= Date: Sat, 30 May 2026 16:28:55 +0200 Subject: [PATCH 049/125] ; * m4/texinfo.m4 (gl_SET_MAKEINFO): Fix introductory comment. --- m4/texinfo.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/m4/texinfo.m4 b/m4/texinfo.m4 index 251d039df2c..231d0b35736 100644 --- a/m4/texinfo.m4 +++ b/m4/texinfo.m4 @@ -12,7 +12,8 @@ AC_REQUIRE([gl_SET_DOCMISC_W32]) AC_REQUIRE([gl_SET_DOCLANGS]) ]) dnl -dnl gl_FIND_MAKEINFO +dnl gl_SET_MAKEINFO +dnl set the MAKEINFO precious variable to the suitable makeinfo compiler. AC_DEFUN([gl_SET_MAKEINFO],[dnl [## Require makeinfo >= 4.13 (last of the 4.x series) to build the manuals. : ${MAKEINFO:=makeinfo} From 3d01d53c1e345e144dc0089bc47647bfdc50b4bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Bela=C3=AFche?= Date: Sat, 30 May 2026 16:40:59 +0200 Subject: [PATCH 050/125] Make doc/ build fail on DOCLANG=dummy * doc/misc/Makefile.in (DOCLANG): Call 'error' when asked to produce manuals for a language we don't know about. --- doc/misc/Makefile.in | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index 1d0a55e997e..11a2dc3d517 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in @@ -66,6 +66,7 @@ MAKEINFO_OPTS = --force -I$(emacsdir) ifeq ($(DOCLANG),) DOCLANG:=default else ifeq ($(wildcard $(srcdir)/../translations/$(DOCLANG)/info_common.mk),) +$(error No manual language $(DOCLANG) found) DOCLANG:=default endif From 35af8d1099e2f3187c70c4c661a44231bdec1f4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Bela=C3=AFche?= Date: Sat, 30 May 2026 16:53:15 +0200 Subject: [PATCH 051/125] Make build in doc/ happen in parallel over DOCLANGS This also avoids using ";" in make rules, which doesn't propagate errors from the first command to the entire line. * Makefile.in (MAKE_DOC_FOR_DOCLANG): New. (MAKE_DOC): delegate to 'MAKE_DOC_FOR_DOCLANG' per language doc build. --- Makefile.in | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Makefile.in b/Makefile.in index e0a8d1ae579..ac15088418f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1145,10 +1145,17 @@ PDFS = lispref-pdf lispintro-pdf emacs-pdf misc-pdf PSS = lispref-ps lispintro-ps emacs-ps misc-ps DOCS = $(DVIS) $(HTMLS) $(INFOS) $(PDFS) $(PSS) -define MAKE_DOC -$(1): - $(foreach lang,$(DOCLANGS),$$(MAKE) -C doc/$$(subst -, DOCLANG=$(lang) ,$$@);) +define MAKE_DOC_FOR_DOCLANG +.PHONY: $(1)-DOCLANG-$(2) +$(1)-DOCLANG-$(2): + $$(MAKE) -C doc/$$(subst -, DOCLANG=$(2) ,$(1)) + +endef +define MAKE_DOC +$(1): $$(addprefix $(1)-DOCLANG-,$(DOCLANGS)) + +$$(foreach lang,$(DOCLANGS),$$(eval $$(call MAKE_DOC_FOR_DOCLANG,$(1),$$(lang)))) endef $(foreach doc,$(DOCS),$(eval $(call MAKE_DOC,$(doc)))) From 8902361cba867e7d4aa6cb844214636a6eabe7fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Bela=C3=AFche?= Date: Sun, 31 May 2026 14:57:41 +0200 Subject: [PATCH 052/125] README for manual translations available, and how to compile them --- doc/translations/README | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/doc/translations/README b/doc/translations/README index bac8bc5d188..f97f4fb105c 100644 --- a/doc/translations/README +++ b/doc/translations/README @@ -1,3 +1,19 @@ +* Translated Emacs manuals +** Translations available + +Translations for language _doclang_ can be found under directory +doc/translations/_doclang_. + +** Compiling a manual translation + +For the info output, and, say, SES manual in French: + + make -C doc/misc ses DOCLANG=fr + +For the pdf output: + + make -C doc/misc ses-fr.pdf DOCLANG=fr + * Translating the Emacs manuals ** Copyright assignment From 271cc5c76c06b30e84d84b42e71be6f7fb772562 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sun, 31 May 2026 21:36:12 +0300 Subject: [PATCH 053/125] More tests for fill-paragraph-handle-comment.erts * test/lisp/textmodes/fill-resources/fill-paragraph-handle-comment.erts: Add more tests for current comment lines (bug#80449). --- .../fill-paragraph-handle-comment.erts | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/test/lisp/textmodes/fill-resources/fill-paragraph-handle-comment.erts b/test/lisp/textmodes/fill-resources/fill-paragraph-handle-comment.erts index c7c9e96ea50..5e46ca35817 100644 --- a/test/lisp/textmodes/fill-resources/fill-paragraph-handle-comment.erts +++ b/test/lisp/textmodes/fill-resources/fill-paragraph-handle-comment.erts @@ -1,6 +1,6 @@ Point-Char: | -Name: fill-paragraph-handle-comment - non-comment line before comment line +Name: fill-paragraph-handle-comment - current non-comment line before comment line Code: (lambda () (setq-local comment-start "# ") @@ -21,7 +21,22 @@ not part of the comment =-=-= -Name: fill-paragraph-handle-comment - non-comment line after comment line +Name: fill-paragraph-handle-comment - non-comment line before current comment line + +=-= + +this is not part of the comment this is not part of the comment +# this is a comment this is a comment this is a comment| + +=-= + +this is not part of the comment this is not part of the comment +# this is a comment this is a comment this +# is a comment + +=-=-= + +Name: fill-paragraph-handle-comment - comment line before current non-comment line =-= @@ -35,3 +50,18 @@ this is not part of the comment this is not part of the comment =-=-= + +Name: fill-paragraph-handle-comment - current comment line before non-comment line + +=-= + +# this is a comment this is a comment this is a comment| +this is not part of the comment this is not part of the comment + +=-= + +# this is a comment this is a comment this +# is a comment +this is not part of the comment this is not part of the comment + +=-=-= From 6db4271ee8b5934c81e815747544519935f7650d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 31 May 2026 10:25:00 -0700 Subject: [PATCH 054/125] Ignore SO_RCVTIMEO errors in emacsclient MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lib-src/emacsclient.c: Include (timeout): Now signed, and initially -1. All uses changed. (decode_options): Do not worry about ERANGE or ranges, as other code now deal with this; the old code was wrong anyway as it mixed uintmax_t with INTMAX_MAX and INTMAX_MIN. But do check for syntax errors and negative values. (set_socket_timeout): Don’t time out if the timeout is 0 or enormous. Silently ignore errors (Bug#81160). (main): Allow --timeout=0, as per documentation. --- lib-src/emacsclient.c | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index cb8e045d6f3..381481c7fbd 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -74,6 +74,7 @@ char *w32_getenv (const char *); #include #include #include +#include #include #include #include @@ -146,8 +147,9 @@ static char const *socket_name; /* If non-NULL, the filename of the authentication file. */ static char const *server_file; -/* Seconds to wait before timing out (0 means wait forever). */ -static uintmax_t timeout; +/* Seconds to wait before timing out. Negative means no --timeout so + use DEFAULT_TIMEOUT, 0 means wait forever. */ +static intmax_t timeout = -1; /* If non-NULL, the tramp prefix emacs must use to find the files. */ static char const *tramp_prefix; @@ -539,10 +541,8 @@ decode_options (int argc, char **argv) break; case 'w': - timeout = strtoumax (optarg, &endptr, 10); - if (timeout <= 0 || - ((timeout == INTMAX_MAX || timeout == INTMAX_MIN) - && errno == ERANGE)) + timeout = strtoimax (optarg, &endptr, 10); + if (timeout < 0 || endptr == optarg || *endptr) { fprintf (stderr, "Invalid timeout: \"%s\"\n", optarg); exit (EXIT_FAILURE); @@ -1952,28 +1952,30 @@ start_daemon_and_retry_set_socket (void) return emacs_socket; } +/* Set SOCKET's timeout to SECONDS. + If SECONDS is zero or out of range, do not set the timeout. + Silently ignore errors, as POSIX says it is implementation-defined as + to whether SO_RCVTIMEO works. Although we could fall back on + non-blocking I/O if setsockopt fails, it's not worth the trouble. */ static void -set_socket_timeout (HSOCKET socket, int seconds) +set_socket_timeout (HSOCKET socket, intmax_t seconds) { - int ret; + if (seconds <= 0) + return; #ifndef WINDOWSNT struct timeval timeout; - timeout.tv_sec = seconds; + if (ckd_add (&timeout.tv_sec, seconds, 0)) + return; timeout.tv_usec = 0; - ret = setsockopt (socket, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof timeout); + setsockopt (socket, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof timeout); #else DWORD timeout; - if (seconds > INT_MAX / 1000) - timeout = INT_MAX; - else - timeout = seconds * 1000; - ret = setsockopt (socket, SOL_SOCKET, SO_RCVTIMEO, (char *) &timeout, sizeof timeout); + if (ckd_mul (&timeout, seconds, 1000)) + return; + setsockopt (socket, SOL_SOCKET, SO_RCVTIMEO, (char *) &timeout, sizeof timeout); #endif - - if (ret < 0) - sock_err_message ("setsockopt"); } static bool @@ -2210,7 +2212,7 @@ main (int argc, char **argv) } fflush (stdout); - set_socket_timeout (emacs_socket, timeout > 0 ? timeout : DEFAULT_TIMEOUT); + set_socket_timeout (emacs_socket, timeout < 0 ? DEFAULT_TIMEOUT : timeout); bool saw_response = false; ptrdiff_t nrecv = 0; @@ -2236,7 +2238,7 @@ main (int argc, char **argv) if (timeout > 0) { /* Don't retry if we were given a --timeout flag. */ - fprintf (stderr, "\nServer not responding; timed out after %ju seconds", + fprintf (stderr, "\nServer not responding; timed out after %jd seconds", timeout); retry = false; } From 75d8e5773dede1d6c429bd08a4b8d5a0d87fe87b Mon Sep 17 00:00:00 2001 From: Po Lu Date: Mon, 1 Jun 2026 12:15:04 +0800 Subject: [PATCH 055/125] Restore runtime dependencies to documentation files * Makefile.in (MAKE_DOC_FOR_DOCLANG): Remove unnecessary .PHONY definitions for targets which will be encompassed by $(DOC). (MAKE_DOC): Create a common target to to which to assign runtime dependencies. (misc-info-common, misc-dvi-common, misc-html-common) (misc-pdf-common, misc-ps-common): Assign runtime dependencies on Lisp etc. previously assigned to the bare targets now subject to indirection. --- Makefile.in | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile.in b/Makefile.in index ac15088418f..a107cbba2ca 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1147,12 +1147,14 @@ PSS = lispref-ps lispintro-ps emacs-ps misc-ps DOCS = $(DVIS) $(HTMLS) $(INFOS) $(PDFS) $(PSS) define MAKE_DOC_FOR_DOCLANG -.PHONY: $(1)-DOCLANG-$(2) -$(1)-DOCLANG-$(2): +$(1)-DOCLANG-$(2): $(1)-common $$(MAKE) -C doc/$$(subst -, DOCLANG=$(2) ,$(1)) endef define MAKE_DOC +# Define a target to which dependencies common to all of the doc files +# in this directory may be assigned. +$(1)-common: $(1): $$(addprefix $(1)-DOCLANG-,$(DOCLANGS)) $$(foreach lang,$(DOCLANGS),$$(eval $$(call MAKE_DOC_FOR_DOCLANG,$(1),$$(lang)))) @@ -1174,10 +1176,10 @@ ps: $(PSS) # Depending on src is sufficient, but ends up being slow, since the # uncompiled lisp/org/*.el files are used to build the .texi files # (which can be slow even with the elc files). -misc-info: lisp +misc-info-common: lisp # Using src rather than lisp because one is less likely to get unnecessary # rebuilds of stuff that is not strictly necessary for generating manuals. -misc-dvi misc-html misc-pdf misc-ps: src +misc-dvi-common misc-html-common misc-pdf-common misc-ps-common: src info-dir: ${srcdir}/info/dir From 51f823a3afa48b4515594470e245940989e4151d Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 1 Jun 2026 09:50:56 +0100 Subject: [PATCH 056/125] ; * etc/NEWS: Fix annotation. --- etc/NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index 95bc966d47d..dc45122a6db 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -3005,7 +3005,7 @@ In addition, the Git backend has been fixed to display missing files as There is still some further work to do to rationalize VC's handling of file removal. ---- ++++ *** New user option 'vc-dir-auto-hide-up-to-date'. If you customize this option to 'revert', the 'g' command to refresh the VC Directory buffer also has the effect of the 'x' command. From 2c2f1c00accb7672bea7fa98d5314bfb11edfd7f Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 1 Jun 2026 09:51:08 +0100 Subject: [PATCH 057/125] ; * lisp/vc/vc-dir.el (vc-dir-update): Add an assertion. --- lisp/vc/vc-dir.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index 98c69b48691..2cb56aac715 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -646,7 +646,8 @@ Also update some VC file properties from ENTRIES." (or (null next) (vc-dir-fileinfo->directory (ewoc-data next))))) (ewoc-delete vc-ewoc crt))) - (setq crt prev)))))) + (setq crt prev)))) + (cl-assert (null to-remove)))) ;; Update VC file properties. (pcase-dolist (`(,file ,state ,_extra) entries) (vc-file-setprop file 'vc-backend From 984932d4dc992af384b8201caa6f1ba8457cfb2a Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 1 Jun 2026 11:48:42 +0100 Subject: [PATCH 058/125] Disable markdown-ts-mode & markdown-ts-view-mode for Emacs 31 Do not merge to master. * lisp/progmodes/eglot.el (eglot-documentation-renderer) (eglot--format-markup): Don't call eglot--builtin-mdown-p. * lisp/textmodes/markdown-ts-mode.el (markdown-ts-mode) (markdown-ts-view-mode): Mark as experimental. (auto-mode-alist, treesit-major-mode-remap-alist): Don't add anything. * doc/misc/eglot.texi (Customization Variables): * etc/EGLOT-NEWS: * etc/NEWS: Don't mention markdown-ts-mode or markdown-ts-view-mode. --- doc/misc/eglot.texi | 17 ++++++++--------- etc/EGLOT-NEWS | 6 +----- etc/NEWS | 9 --------- lisp/progmodes/eglot.el | 9 +++------ lisp/textmodes/markdown-ts-mode-x.el | 9 ++------- lisp/textmodes/markdown-ts-mode.el | 28 +++++++++++----------------- 6 files changed, 25 insertions(+), 53 deletions(-) diff --git a/doc/misc/eglot.texi b/doc/misc/eglot.texi index c7c296c24ff..97a934fa953 100644 --- a/doc/misc/eglot.texi +++ b/doc/misc/eglot.texi @@ -998,15 +998,14 @@ will consider it to be part of the workspace. The default is @cindex markdown renderer @item eglot-documentation-renderer -This variable controls how Eglot renders at-point documentation -imported from the server (@pxref{Eglot Features}). By default, the -variable's value is set during startup to a markdown renderer if -available, either @code{markdown-ts-view-mode} or -@code{gfm-view-mode}. These utilities visually enhance the -documentation content through fontification and other formatting. If -you set it to @code{t}, plain text will be requested from the server -and no rendering is attempted. If the variable's value is @code{nil}, -Eglot will attempt to find a suitable renderer every time. +This variable controls how Eglot renders at-point documentation imported +from the server (@pxref{Eglot Features}). By default, the variable's +value is set during startup to the @code{gfm-view-mode} markdown +renderer if available. This utility visually enhances the documentation +content through fontification and other formatting. If you set it to +@code{t}, plain text will be requested from the server and no rendering +is attempted. If the variable's value is @code{nil}, Eglot will attempt +to find a suitable renderer every time. @item eglot-mode-map This variable is the keymap for binding Eglot-related command. It is in diff --git a/etc/EGLOT-NEWS b/etc/EGLOT-NEWS index f0f595fa500..7510f13521e 100644 --- a/etc/EGLOT-NEWS +++ b/etc/EGLOT-NEWS @@ -32,11 +32,7 @@ New key bindings: 'k' shuts down, 'r' reconnects, 'e' visits the events buffer, 'w' shows workspace configuration, and 'RET' invokes 'eglot-describe-connection'. -** New LSP documentation rendering backends (bug#80127) - -Eglot uses new built-in 'markdown-ts-mode' of Emacs 31, which means that -on newer versions of Emacs the external 'markdown-mode.el' package does -not need to be installed to render Markdown content. +** 'eglot-documentation-renderer' replaces 'eglot-prefer-plaintext'. The variable 'eglot-documentation-renderer' replaces the now-obsolete 'eglot-prefer-plaintext'. By default, the variable selects a markdown diff --git a/etc/NEWS b/etc/NEWS index dc45122a6db..4c552389a8a 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -3944,15 +3944,6 @@ A major mode based on 'conf-mode' for editing ".npmrc" files. ** New major modes based on the tree-sitter library -*** New major mode 'markdown-ts-mode'. -A major mode based on the tree-sitter library for editing Markdown -files. Markdown files are visited using this mode when the required -tree-sitter grammars ('markdown' and 'markdown-inline') are available, -or when the user has opted in via 'treesit-enabled-modes'. Otherwise, -Markdown files fall back to 'text-mode'. - -To install the grammars, use 'M-x markdown-ts-mode-install-parsers'. - *** New major mode 'mhtml-ts-mode'. An optional major mode based on the tree-sitter library for editing HTML files. This mode handles indentation, fontification, and commenting for diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 504a5e12112..a8b107b1a89 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -537,15 +537,13 @@ or file operation kinds not in the alist." "If non-nil, activate Eglot in cross-referenced non-project files." :type 'boolean) -(defcustom eglot-documentation-renderer (cond ((eglot--builtin-mdown-p) - 'markdown-ts-view-mode) - ((fboundp 'gfm-view-mode) +(defcustom eglot-documentation-renderer (cond ((fboundp 'gfm-view-mode) 'gfm-view-mode) (t nil)) "Control rendering of LSP documentation fragments. -If set to a major mode symbol `gfm-view-mode' or `markdown-ts-view-mode' -request markdown-snippets and use the corresponding Markdown renderer. +If set to the major mode symbol `gfm-view-mode', request +markdown-snippets and use `gfm-view-mode' to render it. If t, always request and render plain text snippets. If set to nil, decide dynamically." :type '(choice (const :tag "Plain text" t) @@ -2278,7 +2276,6 @@ If MODE, force MODE to be used for fontifying MARKUP." (cond (forced-mode forced-mode) ((fboundp eglot-documentation-renderer) eglot-documentation-renderer) - ((eglot--builtin-mdown-p) #'markdown-ts-view-mode) ((fboundp 'gfm-view-mode) #'gfm-view-mode) (t #'text-mode))) (calc (s &optional (forced-mode mode) &aux (x (calc2 forced-mode))) diff --git a/lisp/textmodes/markdown-ts-mode-x.el b/lisp/textmodes/markdown-ts-mode-x.el index 1296e3567a3..467a646e136 100644 --- a/lisp/textmodes/markdown-ts-mode-x.el +++ b/lisp/textmodes/markdown-ts-mode-x.el @@ -27,6 +27,8 @@ ;;; Commentary: +;; This is an experimental mode that has a number of unresolved issues. + ;;; Code: (require 'markdown-ts-mode) @@ -196,7 +198,6 @@ fully-qualified file name. If OUTPUT-FILE is nil, assume stdout, or it is a fully-qualified file name. It should return a list of arguments suitable for `call-process'.") -;;;###autoload (defun markdown-ts-convert-file (input-file &optional format @@ -226,7 +227,6 @@ found; see the variable `exec-path'." overwrite quiet)) -;;;###autoload (defun markdown-ts-convert (&optional input-file output-file format display overwrite quiet) @@ -661,7 +661,6 @@ transformed into \"Heading Text\"." (funcall fixer text) text)) -;;;###autoload (define-minor-mode markdown-ts-toc-update-before-save-mode "If enabled, update `markdown-ts-mode' tables of contents before saving." :init-value nil @@ -676,7 +675,6 @@ transformed into \"Heading Text\"." :warning "Minor mode valid only in `markdown-ts-mode' buffers."))) -;;;###autoload (defun markdown-ts-toc-clear-and-remove (&optional beg end) "Remove `markdown-ts-mode' table of contents bodies and templates. Operate on the active region BEG to END, otherwise operate on the @@ -685,7 +683,6 @@ buffer, which may be narrowed." (markdown-ts--barf-if-not-mode 'markdown-ts-toc-clear-and-remove) (markdown-ts-toc-clear beg end 'remove)) -;;;###autoload (defun markdown-ts-toc-clear (&optional beg end remove) "Clear `markdown-ts-mode' table of contents bodies. Operate on the active region BEG to END, otherwise operate on the @@ -726,7 +723,6 @@ If optional REMOVE is non-nil, remove tables including their templates." reg-size)) (setq end-pos (min (point-max) (- end-pos reg-size))))))))) -;;;###autoload (defun markdown-ts-toc-insert-template (&optional char) "Insert a `markdown-ts-mode` table of contents template at point. @@ -760,7 +756,6 @@ their defaults and is useful as a starting point to customize a table." "\n")) (_ (user-error "No such template type: %c" char)))) -;;;###autoload (defun markdown-ts-toc-generate (&optional interactive beg end) "Generate tables of contents in the current buffer. `markdown-ts-mode' uses Markdown HTML comment elements to identify table diff --git a/lisp/textmodes/markdown-ts-mode.el b/lisp/textmodes/markdown-ts-mode.el index fed6ded192c..e6b01c77b57 100644 --- a/lisp/textmodes/markdown-ts-mode.el +++ b/lisp/textmodes/markdown-ts-mode.el @@ -27,6 +27,8 @@ ;;; Commentary: +;; This is an experimental mode that has a number of unresolved issues. +;; ;;;; Tree-sitter Language Versions ;; ;; markdown-ts-mode has been tested with the following grammars and version: @@ -5410,23 +5412,26 @@ With a prefix argument, it can also install optional parsers" "Emacs was built without Tree-sitter support, or could not load Tree-sitter")) (text-mode))))) -;;;###autoload (define-derived-mode markdown-ts-mode text-mode "Markdown" "Major mode for editing Markdown using tree-sitter grammar. -NOTE: See `markdown-ts--set-up-inline'." +This is an experimental mode that has a number of unresolved issues, +therefore Emacs does not yet enable it by default. + +See also `markdown-ts--set-up-inline'." (markdown-ts-mode--initialize)) (derived-mode-add-parents 'markdown-ts-mode '(markdown-mode)) ;;; View mode: -;;;###autoload (define-derived-mode markdown-ts-view-mode nil ; Intentionally left blank. "Markdown View" - "Major mode for read-only viewing Markdown using tree-sitter grammar." - ;; NOTE: `markdown-ts-mode' is manually added as a parent to avoid - ;; invoking its initialization before we set override variables. + "Major mode for read-only viewing Markdown using tree-sitter grammar. +This is an experimental mode that has a number of unresolved issues, +therefore Emacs does not yet enable it by default." + ;; `markdown-ts-mode' is manually added as a parent to avoid invoking + ;; its initialization before we set override variables. (setq-local markdown-ts-menu-bar-show nil) (setq-local markdown-ts-hide-markup t) (setq-local markdown-ts-inline-images t) @@ -5443,7 +5448,6 @@ NOTE: See `markdown-ts--set-up-inline'." ;;; Mode utilities: -;;;###autoload (defun markdown-ts-buffer-string () "Like `buffer-string', and convert overlay properties to text properties." (let ((str (buffer-string))) @@ -5619,7 +5623,6 @@ If non-nil and `point' is in a table, enable (remove-hook 'post-command-hook #'markdown-ts--enable-in-table-mode 'local)))) -;;;###autoload (defun markdown-ts-mode-maybe () "Enable `markdown-ts-mode' when its grammars are available. Also propose to install the grammars when `treesit-enabled-modes' @@ -5632,14 +5635,5 @@ is t or contains the mode name." (markdown-ts-mode) (text-mode))) -;;;###autoload -(when (boundp 'treesit-major-mode-remap-alist) - (add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-ts-mode-maybe)) - (add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-ts-mode-maybe)) - (add-to-list 'auto-mode-alist '("\\.mdx\\'" . markdown-ts-mode-maybe)) - ;; To be able to toggle between an external package and core ts-mode: - (add-to-list 'treesit-major-mode-remap-alist - '(markdown-mode . markdown-ts-mode))) - (provide 'markdown-ts-mode) ;;; markdown-ts-mode.el ends here From eac3779a8fc6d952fdb52fe66184c6084b353597 Mon Sep 17 00:00:00 2001 From: "Dan R. K. Ports" Date: Mon, 1 Jun 2026 12:49:24 +0100 Subject: [PATCH 059/125] Check whether g_settings_schema_source_get_default returned NULL * src/pgtkfns.c (parse_resource_key): * src/xsettings.c (init_gsettings): Check whether g_settings_schema_source_look up returned NULL (bug#81166). Copyright-paperwork-exempt: yes --- src/pgtkfns.c | 2 ++ src/xsettings.c | 15 +++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/pgtkfns.c b/src/pgtkfns.c index e1766d2b1a6..ec708af374c 100644 --- a/src/pgtkfns.c +++ b/src/pgtkfns.c @@ -1902,6 +1902,8 @@ parse_resource_key (const char *res_key, char *setting_key) /* check existence of setting_key */ GSettingsSchemaSource *ssrc = g_settings_schema_source_get_default (); + if (ssrc == NULL) + return NULL; /* No GSettings schemas installed. */ GSettingsSchema *scm = g_settings_schema_source_lookup (ssrc, SCHEMA_ID, TRUE); if (!scm) return NULL; /* *.schema.xml is not installed. */ diff --git a/src/xsettings.c b/src/xsettings.c index 71cd6a9ad6c..3c4aff18fa2 100644 --- a/src/xsettings.c +++ b/src/xsettings.c @@ -1100,12 +1100,15 @@ init_gsettings (void) #if GLIB_CHECK_VERSION (2, 32, 0) { - GSettingsSchema *sc = g_settings_schema_source_lookup - (g_settings_schema_source_get_default (), - GSETTINGS_SCHEMA, - true); - schema_found = sc != NULL; - if (sc) g_settings_schema_unref (sc); + GSettingsSchemaSource *source = g_settings_schema_source_get_default + (); + if (source != NULL) + { + GSettingsSchema *sc = g_settings_schema_source_lookup + (source, GSETTINGS_SCHEMA, true); + schema_found = sc != NULL; + if (sc) g_settings_schema_unref (sc); + } } #else { From 32c329253f33850d29851b4b5f1757b3b2106bb9 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 1 Jun 2026 12:53:44 +0100 Subject: [PATCH 060/125] ; Move markdown-ts-mode to correct NEWS file. --- etc/NEWS | 11 +++++++++++ etc/NEWS.31 | 9 --------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index e764545c508..aab605f999b 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -68,6 +68,17 @@ check out the repository to prepare a patch for the package maintainer. * New Modes and Packages in Emacs 32.1 +** New major modes based on the tree-sitter library + +*** New major mode 'markdown-ts-mode'. +A major mode based on the tree-sitter library for editing Markdown +files. Markdown files are visited using this mode when the required +tree-sitter grammars ('markdown' and 'markdown-inline') are available, +or when the user has opted in via 'treesit-enabled-modes'. Otherwise, +Markdown files fall back to 'text-mode'. + +To install the grammars, use 'M-x markdown-ts-mode-install-parsers'. + * Incompatible Lisp Changes in Emacs 32.1 diff --git a/etc/NEWS.31 b/etc/NEWS.31 index dc45122a6db..4c552389a8a 100644 --- a/etc/NEWS.31 +++ b/etc/NEWS.31 @@ -3944,15 +3944,6 @@ A major mode based on 'conf-mode' for editing ".npmrc" files. ** New major modes based on the tree-sitter library -*** New major mode 'markdown-ts-mode'. -A major mode based on the tree-sitter library for editing Markdown -files. Markdown files are visited using this mode when the required -tree-sitter grammars ('markdown' and 'markdown-inline') are available, -or when the user has opted in via 'treesit-enabled-modes'. Otherwise, -Markdown files fall back to 'text-mode'. - -To install the grammars, use 'M-x markdown-ts-mode-install-parsers'. - *** New major mode 'mhtml-ts-mode'. An optional major mode based on the tree-sitter library for editing HTML files. This mode handles indentation, fontification, and commenting for From 94eb6389d403eb1b71a81ecdc3b8416cf5f850d6 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 1 Jun 2026 15:03:45 +0300 Subject: [PATCH 061/125] Prevent segfaults due to frame resizing at the wrong time * src/dispextern.h: * src/xdisp.c (dont_resize_frames): New variable. (unwind_format_mode_line): Decrement 'dont_resize_frames'. (gui_consider_frame_title, display_mode_line, Fformat_mode_line): Increment 'dont_resize_frames'. * src/dispnew.c (do_pending_window_change): Don't resize frames if 'dont_resize_frames' is non-zero. (Bug#81121) --- src/dispextern.h | 1 + src/dispnew.c | 2 +- src/xdisp.c | 21 +++++++++++++++++++-- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/dispextern.h b/src/dispextern.h index 129c94f0dd6..b40bcc8219b 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3603,6 +3603,7 @@ int frame_mode_line_height (struct frame *); extern bool redisplaying_p; extern unsigned int redisplay_counter; extern bool display_working_on_window_p; +extern int dont_resize_frames; extern void unwind_display_working_on_window (void); extern bool help_echo_showing_p; extern Lisp_Object help_echo_string, help_echo_window; diff --git a/src/dispnew.c b/src/dispnew.c index fb313bfd1af..dd799c62d02 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -6663,7 +6663,7 @@ deliver_window_change_signal (int sig) void do_pending_window_change (bool safe) { - if (redisplaying_p && !safe) + if ((redisplaying_p || dont_resize_frames) && !safe) return; while (delayed_size_change) diff --git a/src/xdisp.c b/src/xdisp.c index dabe63b902a..7a2f1187152 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1077,6 +1077,14 @@ bool redisplaying_p; the callers. */ bool display_working_on_window_p; +/* Non-zero when we do not allow resizing frames. For example, + display_mode_line and other functions produce glyphs for the mode + line, in particular when called from non-redisplay code (so + redisplaying_p is false). We inhibit resizing of the frames during + that time, because that could change glyph_row pointers in the glyph + matrix behind the back of teh code which manipulates these pointers. */ +int dont_resize_frames; + /* If a string, XTread_socket generates an event to display that string. (The display is done in read_char.) */ @@ -14015,6 +14023,9 @@ unwind_format_mode_line (Lisp_Object vector) } Vmode_line_unwind_vector = vector; + + if (dont_resize_frames > 0) + dont_resize_frames--; } @@ -14151,6 +14162,7 @@ gui_consider_frame_title (Lisp_Object frame) title_start = MODE_LINE_NOPROP_LEN (0); init_iterator (&it, XWINDOW (f->selected_window), -1, -1, NULL, DEFAULT_FACE_ID); + dont_resize_frames++; display_mode_element (&it, 0, -1, -1, fmt, Qnil, false); len = MODE_LINE_NOPROP_LEN (title_start); title = mode_line_noprop_buf + title_start; @@ -28143,6 +28155,10 @@ display_mode_line (struct window *w, enum face_id face_id, Lisp_Object format) format_mode_line_unwind_data (NULL, NULL, Qnil, false)); + /* We cannot allow frame-resizing as long as the code below runs, + because that could invalidate the it.glyph_row->glyphs pointers. */ + dont_resize_frames++; + /* Temporarily make frame's keyboard the current kboard so that kboard-local variables in the mode_line_format will get the right values. */ @@ -28258,8 +28274,6 @@ display_mode_line (struct window *w, enum face_id face_id, Lisp_Object format) } pop_kboard (); - unbind_to (count, Qnil); - /* Fill up with spaces. */ display_string (" ", Qnil, Qnil, 0, 0, &it, 10000, -1, -1, 0); @@ -28289,6 +28303,8 @@ display_mode_line (struct window *w, enum face_id face_id, Lisp_Object format) - (it.current_x - it.last_visible_x))); } + unbind_to (count, Qnil); + return it.glyph_row->height; } @@ -29031,6 +29047,7 @@ are the selected window and the WINDOW's buffer). */) set_buffer_internal_1 (XBUFFER (buffer)); init_iterator (&it, w, -1, -1, NULL, face_id); + dont_resize_frames++; /* Make sure `base_line_number` is fresh in case we encounter a `%l`. */ if (current_buffer == XBUFFER ((w)->contents) From f357a549ac7434ce5d1011c5d8fa09997fd8a13d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 1 Jun 2026 15:03:45 +0300 Subject: [PATCH 062/125] Prevent segfaults due to frame resizing at the wrong time * src/dispextern.h: * src/xdisp.c (dont_resize_frames): New variable. (unwind_format_mode_line): Decrement 'dont_resize_frames'. (gui_consider_frame_title, display_mode_line, Fformat_mode_line): Increment 'dont_resize_frames'. * src/dispnew.c (do_pending_window_change): Don't resize frames if 'dont_resize_frames' is non-zero. (Bug#81121) (cherry picked from commit 94eb6389d403eb1b71a81ecdc3b8416cf5f850d6) --- src/dispextern.h | 1 + src/dispnew.c | 2 +- src/xdisp.c | 21 +++++++++++++++++++-- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/dispextern.h b/src/dispextern.h index d08bd7ee7a9..b75bdff7bc6 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3591,6 +3591,7 @@ int frame_mode_line_height (struct frame *); extern bool redisplaying_p; extern unsigned int redisplay_counter; extern bool display_working_on_window_p; +extern int dont_resize_frames; extern void unwind_display_working_on_window (void); extern bool help_echo_showing_p; extern Lisp_Object help_echo_string, help_echo_window; diff --git a/src/dispnew.c b/src/dispnew.c index 284a0eb175f..155075570a7 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -6664,7 +6664,7 @@ deliver_window_change_signal (int sig) void do_pending_window_change (bool safe) { - if (redisplaying_p && !safe) + if ((redisplaying_p || dont_resize_frames) && !safe) return; while (delayed_size_change) diff --git a/src/xdisp.c b/src/xdisp.c index c1d6fedb553..b3c6fb8a486 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1077,6 +1077,14 @@ bool redisplaying_p; the callers. */ bool display_working_on_window_p; +/* Non-zero when we do not allow resizing frames. For example, + display_mode_line and other functions produce glyphs for the mode + line, in particular when called from non-redisplay code (so + redisplaying_p is false). We inhibit resizing of the frames during + that time, because that could change glyph_row pointers in the glyph + matrix behind the back of teh code which manipulates these pointers. */ +int dont_resize_frames; + /* If a string, XTread_socket generates an event to display that string. (The display is done in read_char.) */ @@ -14015,6 +14023,9 @@ unwind_format_mode_line (Lisp_Object vector) } Vmode_line_unwind_vector = vector; + + if (dont_resize_frames > 0) + dont_resize_frames--; } @@ -14151,6 +14162,7 @@ gui_consider_frame_title (Lisp_Object frame) title_start = MODE_LINE_NOPROP_LEN (0); init_iterator (&it, XWINDOW (f->selected_window), -1, -1, NULL, DEFAULT_FACE_ID); + dont_resize_frames++; display_mode_element (&it, 0, -1, -1, fmt, Qnil, false); len = MODE_LINE_NOPROP_LEN (title_start); title = mode_line_noprop_buf + title_start; @@ -28138,6 +28150,10 @@ display_mode_line (struct window *w, enum face_id face_id, Lisp_Object format) format_mode_line_unwind_data (NULL, NULL, Qnil, false)); + /* We cannot allow frame-resizing as long as the code below runs, + because that could invalidate the it.glyph_row->glyphs pointers. */ + dont_resize_frames++; + /* Temporarily make frame's keyboard the current kboard so that kboard-local variables in the mode_line_format will get the right values. */ @@ -28253,8 +28269,6 @@ display_mode_line (struct window *w, enum face_id face_id, Lisp_Object format) } pop_kboard (); - unbind_to (count, Qnil); - /* Fill up with spaces. */ display_string (" ", Qnil, Qnil, 0, 0, &it, 10000, -1, -1, 0); @@ -28284,6 +28298,8 @@ display_mode_line (struct window *w, enum face_id face_id, Lisp_Object format) - (it.current_x - it.last_visible_x))); } + unbind_to (count, Qnil); + return it.glyph_row->height; } @@ -29026,6 +29042,7 @@ are the selected window and the WINDOW's buffer). */) set_buffer_internal_1 (XBUFFER (buffer)); init_iterator (&it, w, -1, -1, NULL, face_id); + dont_resize_frames++; /* Make sure `base_line_number` is fresh in case we encounter a `%l`. */ if (current_buffer == XBUFFER ((w)->contents) From 933d35ef101557a8ac691b2f12d85f2b1f86dad7 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 1 Jun 2026 17:03:27 +0300 Subject: [PATCH 063/125] ; * lisp/net/browse-url.el (browse-url-firefox-program): Add :version. --- lisp/net/browse-url.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 63aad53abe4..e01c36f3243 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -317,7 +317,8 @@ Defaults to the value of `browse-url-mozilla-arguments' at the time "zen") "firefox") "The name by which to invoke Firefox or a variant of it." - :type 'string) + :type 'string + :version "31.1") (defcustom browse-url-firefox-arguments nil "A list of strings to pass to Firefox (or variant) as arguments." From 8855e88d74fb77fa00d2d406526902203f898b05 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 1 Jun 2026 17:57:45 +0300 Subject: [PATCH 064/125] ; Improve doc strings of brows-url commands * lisp/net/browse-url.el (browse-url-firefox, browse-url-chromium) (browse-url-chrome, browse-url-epiphany, browse-url-qutebrowser): Doc fixes. --- lisp/net/browse-url.el | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index e01c36f3243..b75c4f119a0 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -1215,8 +1215,9 @@ used instead of `browse-url-new-window-flag'." ;;;###autoload (defun browse-url-firefox (url &optional new-window) "Ask the Firefox WWW browser to load URL. -Defaults to the URL around or before point. Passes the strings -in the variable `browse-url-firefox-arguments' to Firefox. +Defaults to the URL around or before point. Invokes the program +specified by `browse-url-firefox-program'. Passes the strings +in the variable `browse-url-firefox-arguments' to that program. Interactively, if the variable `browse-url-new-window-flag' is non-nil, loads the document in a new Firefox window. A non-nil prefix argument @@ -1247,9 +1248,9 @@ instead of `browse-url-new-window-flag'." ;;;###autoload (defun browse-url-chromium (url &optional _new-window) "Ask the Chromium WWW browser to load URL. -Default to the URL around or before point. The strings in -variable `browse-url-chromium-arguments' are also passed to -Chromium. +Default to the URL around or before point. Invokes the program +specified by `browse-url-chromium-program'. Passes the strings in +variable `browse-url-chromium-arguments' to that program. The optional argument NEW-WINDOW is not used." (interactive (browse-url-interactive-arg "URL: ")) (setq url (browse-url-encode-url url)) @@ -1265,9 +1266,9 @@ The optional argument NEW-WINDOW is not used." (defun browse-url-chrome (url &optional _new-window) "Ask the Google Chrome WWW browser to load URL. -Default to the URL around or before point. The strings in -variable `browse-url-chrome-arguments' are also passed to -Google Chrome. +Default to the URL around or before point. Invokes the program +specified by `browse-url-chrome-program'. Passes to that program +the strings in variable `browse-url-chrome-arguments'. The optional argument NEW-WINDOW is not used." (interactive (browse-url-interactive-arg "URL: ")) (setq url (browse-url-encode-url url)) @@ -1283,8 +1284,9 @@ The optional argument NEW-WINDOW is not used." (defun browse-url-epiphany (url &optional new-window) "Ask the GNOME Web (Epiphany) WWW browser to load URL. -Default to the URL around or before point. The strings in variable -`browse-url-epiphany-arguments' are also passed to GNOME Web. +Default to the URL around or before point. Invokes the program +specified by `browse-url-epiphany-program'. Passes the strings +in variable `browse-url-epiphany-arguments' to that program. When called interactively, if variable `browse-url-new-window-flag' is non-nil, load the document in a new GNOME Web window, otherwise use a @@ -1354,7 +1356,9 @@ used instead of `browse-url-new-window-flag'." (defun browse-url-qutebrowser (url &optional new-window) "Ask the Qutebrowser WWW browser to load URL. -Default to the URL around or before point. +Default to the URL around or before point. Invokes the program +specified by `browse-url-qutebrowser-program'. Passes the strings +in the variable `browse-url-qutebrowser-arguments' to that program. When called interactively, if variable `browse-url-new-window-flag' is non-nil, load the document in a new Qutebrowser window, otherwise use a From 7502836378be1610fa6db4541865c06a425491e3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 1 Jun 2026 09:52:48 -0700 Subject: [PATCH 065/125] Pacify -Wuseless-cast if --enable-checking=all Problem reported by Helmut Eller (Bug#81132#25). * src/dispextern.h (IF_DEBUG): Omit cast that is useless if the argument is already void. * src/ftfont.c (adjust_anchor): Omit useless cast. --- src/dispextern.h | 2 +- src/ftfont.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dispextern.h b/src/dispextern.h index b40bcc8219b..357504dd989 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -259,7 +259,7 @@ enum window_part /* Macros to include code only if GLYPH_DEBUG is defined. */ #ifdef GLYPH_DEBUG -#define IF_DEBUG(X) ((void) (X)) +#define IF_DEBUG(X) do { (X); } while (false) #else #define IF_DEBUG(X) ((void) 0) #endif diff --git a/src/ftfont.c b/src/ftfont.c index 44c22d359b5..d16831fd69f 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -1989,7 +1989,7 @@ adjust_anchor (FT_Face ft_face, OTF_Anchor *anchor, FT_Outline *outline; int ap = anchor->f.f1.AnchorPoint; - FT_Load_Glyph (ft_face, (FT_UInt) code, FT_LOAD_MONOCHROME); + FT_Load_Glyph (ft_face, code, FT_LOAD_MONOCHROME); outline = &ft_face->glyph->outline; if (ap < outline->n_points) { From 43f163034682d0139a9986117bce7945ed60c1e9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 1 Jun 2026 09:55:18 -0700 Subject: [PATCH 066/125] Improve x_free_gc checking when debugging * src/xfaces.c (x_free_gc): When debugging, also diagnose unlikely case when ngcs == INT_MIN. --- src/xfaces.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xfaces.c b/src/xfaces.c index fcec00fbc1f..dafc50f559f 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -539,7 +539,7 @@ static void x_free_gc (struct frame *f, GC gc) { eassert (input_blocked_p ()); - IF_DEBUG ((--ngcs, eassert (ngcs >= 0))); + IF_DEBUG ((eassert (ngcs > 0), ngcs--)); XFreeGC (FRAME_X_DISPLAY (f), gc); } @@ -565,7 +565,7 @@ x_create_gc (struct frame *f, unsigned long mask, Emacs_GC *egc) static void x_free_gc (struct frame *f, Emacs_GC *gc) { - IF_DEBUG ((--ngcs, eassert (ngcs >= 0))); + IF_DEBUG ((eassert (ngcs > 0), ngcs--)); xfree (gc); } From bfa4d6dd400f18832aa19df3cdd41bfd763c85f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Mon, 1 Jun 2026 11:48:42 +0100 Subject: [PATCH 067/125] Disable markdown-ts-mode & markdown-ts-view-mode for Emacs 31 Ported from emacs-31 release branch: commit 984932d4dc992af384b8201caa6f1ba8457cfb2a Author: Sean Whitton Date: Mon Jun 1 11:48:42 2026 +0100 Disable markdown-ts-mode & markdown-ts-view-mode for Emacs 31 This synchronizes master's Eglot with emacs-31. The goal of that commit is to demote those markdown-ts-mode.el modes to "experimental" status in emacs-31, but Eglot was already relying on them and changes were needed. 984932d4dc992af384b8201caa6f1ba8457cfb2a is not the commit that best does those changes, but since that commit was marked "do not merge" on emacs-31, I thought it best to bring it here manually so any further work -- which doesn't contradict the overarching intention -- can continue in emacs-31 with clean merges to master (where the GNU-devel core Elpa package is pulled from). * lisp/progmodes/eglot.el (eglot-documentation-renderer) (eglot--format-markup): Don't call eglot--builtin-mdown-p. * doc/misc/eglot.texi (Customization Variables): * etc/EGLOT-NEWS: Don't mention markdown-ts-mode Co-authored-by: Sean Whitton --- doc/misc/eglot.texi | 17 ++++++++--------- etc/EGLOT-NEWS | 6 +----- lisp/progmodes/eglot.el | 9 +++------ 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/doc/misc/eglot.texi b/doc/misc/eglot.texi index c7c296c24ff..97a934fa953 100644 --- a/doc/misc/eglot.texi +++ b/doc/misc/eglot.texi @@ -998,15 +998,14 @@ will consider it to be part of the workspace. The default is @cindex markdown renderer @item eglot-documentation-renderer -This variable controls how Eglot renders at-point documentation -imported from the server (@pxref{Eglot Features}). By default, the -variable's value is set during startup to a markdown renderer if -available, either @code{markdown-ts-view-mode} or -@code{gfm-view-mode}. These utilities visually enhance the -documentation content through fontification and other formatting. If -you set it to @code{t}, plain text will be requested from the server -and no rendering is attempted. If the variable's value is @code{nil}, -Eglot will attempt to find a suitable renderer every time. +This variable controls how Eglot renders at-point documentation imported +from the server (@pxref{Eglot Features}). By default, the variable's +value is set during startup to the @code{gfm-view-mode} markdown +renderer if available. This utility visually enhances the documentation +content through fontification and other formatting. If you set it to +@code{t}, plain text will be requested from the server and no rendering +is attempted. If the variable's value is @code{nil}, Eglot will attempt +to find a suitable renderer every time. @item eglot-mode-map This variable is the keymap for binding Eglot-related command. It is in diff --git a/etc/EGLOT-NEWS b/etc/EGLOT-NEWS index f0f595fa500..7510f13521e 100644 --- a/etc/EGLOT-NEWS +++ b/etc/EGLOT-NEWS @@ -32,11 +32,7 @@ New key bindings: 'k' shuts down, 'r' reconnects, 'e' visits the events buffer, 'w' shows workspace configuration, and 'RET' invokes 'eglot-describe-connection'. -** New LSP documentation rendering backends (bug#80127) - -Eglot uses new built-in 'markdown-ts-mode' of Emacs 31, which means that -on newer versions of Emacs the external 'markdown-mode.el' package does -not need to be installed to render Markdown content. +** 'eglot-documentation-renderer' replaces 'eglot-prefer-plaintext'. The variable 'eglot-documentation-renderer' replaces the now-obsolete 'eglot-prefer-plaintext'. By default, the variable selects a markdown diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 504a5e12112..a8b107b1a89 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -537,15 +537,13 @@ or file operation kinds not in the alist." "If non-nil, activate Eglot in cross-referenced non-project files." :type 'boolean) -(defcustom eglot-documentation-renderer (cond ((eglot--builtin-mdown-p) - 'markdown-ts-view-mode) - ((fboundp 'gfm-view-mode) +(defcustom eglot-documentation-renderer (cond ((fboundp 'gfm-view-mode) 'gfm-view-mode) (t nil)) "Control rendering of LSP documentation fragments. -If set to a major mode symbol `gfm-view-mode' or `markdown-ts-view-mode' -request markdown-snippets and use the corresponding Markdown renderer. +If set to the major mode symbol `gfm-view-mode', request +markdown-snippets and use `gfm-view-mode' to render it. If t, always request and render plain text snippets. If set to nil, decide dynamically." :type '(choice (const :tag "Plain text" t) @@ -2278,7 +2276,6 @@ If MODE, force MODE to be used for fontifying MARKUP." (cond (forced-mode forced-mode) ((fboundp eglot-documentation-renderer) eglot-documentation-renderer) - ((eglot--builtin-mdown-p) #'markdown-ts-view-mode) ((fboundp 'gfm-view-mode) #'gfm-view-mode) (t #'text-mode))) (calc (s &optional (forced-mode mode) &aux (x (calc2 forced-mode))) From 3229d6f0e32b495c8587cea9ba645110dd4277fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Mon, 1 Jun 2026 19:40:23 +0100 Subject: [PATCH 068/125] Eglot: Simplify markdown rendering support (bug#81150) Now that markdown-ts-view-mode is demoted to "experimental" in emacs-31, simplify bits of eglot.el and rewrite docs to be more neutral. In practice 'gfm-view-mode' is still used if found, just like before, but intrepid users can still try the "experimental" modes. * lisp/progmodes/eglot.el (eglot-documentation-renderer): Rewrite doc string. (eglot--accepted-formats): Rewrite. (eglot--builtin-mdown-p): Remove. * doc/misc/eglot.texi (Customization Variables): Rewrite entry. * etc/EGLOT-NEWS: Tweak. --- doc/misc/eglot.texi | 15 ++++++++------- etc/EGLOT-NEWS | 9 ++++++--- lisp/progmodes/eglot.el | 28 ++++++++++------------------ 3 files changed, 24 insertions(+), 28 deletions(-) diff --git a/doc/misc/eglot.texi b/doc/misc/eglot.texi index 97a934fa953..1c9acdc6f9b 100644 --- a/doc/misc/eglot.texi +++ b/doc/misc/eglot.texi @@ -999,13 +999,14 @@ will consider it to be part of the workspace. The default is @cindex markdown renderer @item eglot-documentation-renderer This variable controls how Eglot renders at-point documentation imported -from the server (@pxref{Eglot Features}). By default, the variable's -value is set during startup to the @code{gfm-view-mode} markdown -renderer if available. This utility visually enhances the documentation -content through fontification and other formatting. If you set it to -@code{t}, plain text will be requested from the server and no rendering -is attempted. If the variable's value is @code{nil}, Eglot will attempt -to find a suitable renderer every time. +from the server (@pxref{Eglot Features}). The default value is +@code{nil}, meaning Eglot selects a suitable Markdown renderer on each +use---for example, @code{gfm-view-mode} from @code{markdown-mode} on +NonGNU ELPA, which enhances documentation through fontification and +other formatting. You can also set it to always use a specific major mode symbol, such +as the aforementioned @code{gfm-view-mode}, or the experimental +@code{markdown-ts-view-mode}. If you set it to @code{t}, plain text is +requested from the server and no rendering is attempted. @item eglot-mode-map This variable is the keymap for binding Eglot-related command. It is in diff --git a/etc/EGLOT-NEWS b/etc/EGLOT-NEWS index 7510f13521e..5b487fd1621 100644 --- a/etc/EGLOT-NEWS +++ b/etc/EGLOT-NEWS @@ -32,11 +32,14 @@ New key bindings: 'k' shuts down, 'r' reconnects, 'e' visits the events buffer, 'w' shows workspace configuration, and 'RET' invokes 'eglot-describe-connection'. -** 'eglot-documentation-renderer' replaces 'eglot-prefer-plaintext'. +** New variable 'eglot-documentation-renderer' (bug#80127) The variable 'eglot-documentation-renderer' replaces the now-obsolete -'eglot-prefer-plaintext'. By default, the variable selects a markdown -renderer to use throughout the session. +'eglot-prefer-plaintext' and offers more control over what major mode is +used to render markdown snippets. By default, the variable is nil and +'gfm-view-mode' from NonGNU ELPA's markdown-mode package is used if +found. You may also set it to the experimental 'markdown-ts-view-mode' +in Emacs versions with tree-sitter markdown support. * Changes in Eglot 1.23 (2/4/2026) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index a8b107b1a89..8d5d7cafc3c 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -537,15 +537,12 @@ or file operation kinds not in the alist." "If non-nil, activate Eglot in cross-referenced non-project files." :type 'boolean) -(defcustom eglot-documentation-renderer (cond ((fboundp 'gfm-view-mode) - 'gfm-view-mode) - (t - nil)) - "Control rendering of LSP documentation fragments. -If set to the major mode symbol `gfm-view-mode', request -markdown-snippets and use `gfm-view-mode' to render it. -If t, always request and render plain text snippets. If set to nil, -decide dynamically." +(defcustom eglot-documentation-renderer nil + "Controls rendering of LSP documentation fragments. +If set to a major mode symbol like `gfm-view-mode', or the experimental +`markdown-ts-view-mode', request markdown snippets and use that mode to +render them. If t, request and render plain text instead. If nil, +request markdown snippets and select a renderer dynamically." :type '(choice (const :tag "Plain text" t) (const :tag "Auto-detect" nil) (function :tag "Renderer")) @@ -738,16 +735,11 @@ This can be useful when using docker to run a language server.") (declare-function treesit-grammar-location "treesit.c") -(defun eglot--builtin-mdown-p () - (and (fboundp 'markdown-ts-view-mode) - (fboundp 'treesit-grammar-location) - (treesit-grammar-location 'markdown))) - (defun eglot--accepted-formats () - (if (and (not (eq t eglot-documentation-renderer)) - (or (fboundp 'gfm-view-mode) (eglot--builtin-mdown-p))) - ["markdown" "plaintext"] - ["plaintext"])) + (if (or (eq t eglot-documentation-renderer) + (not (or eglot-documentation-renderer (fboundp 'gfm-view-mode)))) + ["plaintext"] + ["markdown" "plaintext"])) (defconst eglot--uri-path-allowed-chars (let ((vec (copy-sequence url-path-allowed-chars))) From 05f89d711d5c0fa6cc7852e23c9aded885e4a832 Mon Sep 17 00:00:00 2001 From: "F. Jason Park" Date: Sun, 31 May 2026 19:44:26 -0700 Subject: [PATCH 069/125] Fix more missing faces on ERC margin strings * lisp/erc/erc-goodies.el (keep-place-indicator): Add `erc-keep-place-indicator-arrow' face to overlay arrow. * lisp/erc/erc-stamp.el (erc-stamp--display-prompt-in-left-margin) (erc--conceal-prompt): Add `erc-prompt-face' to entire `left-margin' string. See also 9ba65aa9 "Fix missing margin face on display prop in erc-stamp". * test/lisp/erc/erc-fill-tests.el (erc-fill--left-hand-stamps): Update expected text properties on prompt. (Bug#80693) --- lisp/erc/erc-goodies.el | 22 ++++++++++++---------- lisp/erc/erc-stamp.el | 21 +++++++++++++-------- test/lisp/erc/erc-fill-tests.el | 30 ++++++++++++++++-------------- 3 files changed, 41 insertions(+), 32 deletions(-) diff --git a/lisp/erc/erc-goodies.el b/lisp/erc/erc-goodies.el index f1f92923ea2..e99d5f68175 100644 --- a/lisp/erc/erc-goodies.el +++ b/lisp/erc/erc-goodies.el @@ -399,16 +399,18 @@ This module is local to individual buffers." (progn (erc--restore-initialize-priors erc-keep-place-indicator-mode erc--keep-place-indicator-overlay (make-overlay 0 0)) - (when-let* (((memq erc-keep-place-indicator-style '(t arrow))) - (ov-property (if (zerop (fringe-columns 'left)) - 'after-string - 'before-string)) - (display (if (zerop (fringe-columns 'left)) - `((margin left-margin) ,overlay-arrow-string) - '(left-fringe right-triangle - erc-keep-place-indicator-arrow))) - (bef (propertize " " 'display display))) - (overlay-put erc--keep-place-indicator-overlay ov-property bef)) + (when (memq erc-keep-place-indicator-style '(t arrow)) + (overlay-put + erc--keep-place-indicator-overlay + (if (zerop (fringe-columns 'left)) 'after-string 'before-string) + (propertize " " 'display + (if (zerop (fringe-columns 'left)) + `((margin left-margin) + ,(propertize overlay-arrow-string + 'font-lock-face + 'erc-keep-place-indicator-arrow)) + '(left-fringe right-triangle + erc-keep-place-indicator-arrow))))) (when (memq erc-keep-place-indicator-style '(t face)) (overlay-put erc--keep-place-indicator-overlay 'face 'erc-keep-place-indicator-line))) diff --git a/lisp/erc/erc-stamp.el b/lisp/erc/erc-stamp.el index bf1018f58b6..fa4b829b4cf 100644 --- a/lisp/erc/erc-stamp.el +++ b/lisp/erc/erc-stamp.el @@ -478,7 +478,7 @@ and `erc-stamp--margin-left-p', before activating the mode." (defun erc-stamp--display-prompt-in-left-margin () "Show prompt in the left margin with padding." - (when (or (not erc-stamp--last-prompt) (functionp erc-prompt) + (when (or (null erc-stamp--last-prompt) (functionp erc-prompt) (> (string-width erc-stamp--last-prompt) left-margin-width)) (let ((s (buffer-substring erc-insert-marker (1- erc-input-marker)))) ;; Prevent #("abc" n m (display ((...) #("abc" p q (display...)))) @@ -489,7 +489,9 @@ and `erc-stamp--margin-left-p', before activating the mode." ;; This papers over a subtle off-by-1 bug here. (unless (equal sm s) (setq s (concat sm (substring s -1)))))) - (setq erc-stamp--last-prompt (string-pad s left-margin-width nil t)))) + (setq erc-stamp--last-prompt + (propertize (string-pad s left-margin-width nil t) + 'font-lock-face 'erc-prompt-face)))) (put-text-property erc-insert-marker (1- erc-input-marker) 'display `((margin left-margin) ,erc-stamp--last-prompt)) erc-stamp--last-prompt) @@ -505,12 +507,15 @@ and `erc-stamp--margin-left-p', before activating the mode." (&context (erc-stamp--display-margin-mode (eql t)) (erc-stamp--margin-left-p (eql t)) (erc-stamp--skip-left-margin-prompt-p null)) - (when-let* (((null erc--hidden-prompt-overlay)) - (prompt (string-pad erc-prompt-hidden left-margin-width nil 'start)) - (ov (make-overlay erc-insert-marker (1- erc-input-marker) - nil 'front-advance))) - (overlay-put ov 'display `((margin left-margin) ,prompt)) - (setq erc--hidden-prompt-overlay ov))) + (unless erc--hidden-prompt-overlay + (let ((ov (make-overlay erc-insert-marker (1- erc-input-marker) + nil 'front-advance))) + (overlay-put ov 'display + `((margin left-margin) + ,(propertize (string-pad erc-prompt-hidden + left-margin-width nil 'start) + 'font-lock-face 'erc-prompt-face))) + (setq erc--hidden-prompt-overlay ov)))) (defun erc-insert-timestamp-left (string) "Insert timestamps at the beginning of the line." diff --git a/test/lisp/erc/erc-fill-tests.el b/test/lisp/erc/erc-fill-tests.el index b06d600db66..780bec550f8 100644 --- a/test/lisp/erc/erc-fill-tests.el +++ b/test/lisp/erc/erc-fill-tests.el @@ -421,13 +421,14 @@ (pcase-let ((`((margin left-margin) ,displayed) (get-text-property erc-insert-marker 'display))) (should (equal-including-properties - displayed #(" ERC>" 4 8 - ( read-only t - front-sticky t - field erc-prompt - erc-prompt t - rear-nonsticky t - font-lock-face erc-prompt-face))))) + displayed #(" ERC>" + 0 4 (font-lock-face erc-prompt-face) + 4 8 ( read-only t + front-sticky t + field erc-prompt + erc-prompt t + rear-nonsticky t + font-lock-face erc-prompt-face))))) (erc-fill-tests--compare "stamps-left-01") (ert-info ("Shrink left margin by 1 col") @@ -437,13 +438,14 @@ (pcase-let ((`((margin left-margin) ,displayed) (get-text-property erc-insert-marker 'display))) (should (equal-including-properties - displayed #(" ERC>" 3 7 - ( read-only t - front-sticky t - field erc-prompt - erc-prompt t - rear-nonsticky t - font-lock-face erc-prompt-face)))))))))) + displayed #(" ERC>" + 0 3 (font-lock-face erc-prompt-face) + 3 7 ( read-only t + front-sticky t + field erc-prompt + erc-prompt t + rear-nonsticky t + font-lock-face erc-prompt-face)))))))))) (ert-deftest erc-fill--wrap-massage-legacy-indicator-type () (let (calls From 2d915236dcb2147e95d068eba702f4d07efe9caf Mon Sep 17 00:00:00 2001 From: Alexander Adolf Date: Thu, 28 May 2026 15:04:46 +0200 Subject: [PATCH 070/125] vc--subject-to-file-name: Fix over-greedy regex (bug#81017) * lisp/vc/vc.el (vc--subject-to-file-name): Make the prefix regex less greedy, ensure the result has no text properties, improve the docstring (bug#81017). --- lisp/vc/vc.el | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 8f0e9e5bdc4..256a04812f6 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -5393,15 +5393,19 @@ of the current file." (vc-working-revision file))))) (defun vc--subject-to-file-name (subject) - "Generate a file name for a patch with subject line SUBJECT." + "Generate a file name for a patch with subject line SUBJECT. + +The resulting filename is similar to the names generated by \"git +format-patch\", but without the leading patch sequence number \"0001-\". +Any leading \"[PATCH 1/1]\" style strings, and any text properties are +removed from SUBJECT prior to conversion." (let* ((stripped - (replace-regexp-in-string "\\`\\[.*PATCH.*\\]\\s-*" "" + (replace-regexp-in-string "\\`\\[[^][]*PATCH[^][]*]\\s-*" "" subject)) - (truncated (if (length> stripped 50) - (substring stripped 0 50) - stripped))) + (truncated (substring-no-properties stripped + 0 (min (length stripped) 50)))) (concat - (string-trim (replace-regexp-in-string "\\W" "-" truncated) + (string-trim (replace-regexp-in-string "\\W+" "-" truncated) "-+" "-+") ".patch"))) From 2db5a145acbbe84042128806d8b2e333495cf70e Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 2 Jun 2026 12:43:08 +0200 Subject: [PATCH 071/125] Support Ansible messages in compilation-mode * etc/NEWS: Mention Ansible integration in compilation mode. * etc/compilation.txt: Add examples of Ansible error, warning and note messages. Fix typos. * lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): Add Ansible regexps for error, warning and note messages. * test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data): Add new test cases. (compile-test-error-regexps): Increase expected infos. --- etc/NEWS | 5 +++++ etc/compilation.txt | 30 +++++++++++++++++++++++----- lisp/progmodes/compile.el | 13 ++++++++++++ test/lisp/progmodes/compile-tests.el | 13 +++++++++++- 4 files changed, 55 insertions(+), 6 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index aab605f999b..2ee0df5650d 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -65,6 +65,11 @@ package with the same version. This is useful if you have started making local changes to your tarball installation, and then decided to check out the repository to prepare a patch for the package maintainer. +** Compilation mode + +--- +*** Messages from Ansible are now recognized. + * New Modes and Packages in Emacs 32.1 diff --git a/etc/compilation.txt b/etc/compilation.txt index b97ba12fb9a..323ef8cf3c0 100644 --- a/etc/compilation.txt +++ b/etc/compilation.txt @@ -41,6 +41,24 @@ symbol: aix ****** Error number 140 in line 8 of file errors.c ****** +* Ansible + +symbols: ansible-error ansible-fatal ansible-warning + ansible-included ansible-origin + +[ERROR]: couldn't resolve module/action 'shelll'. This often indicates a misspelling, missing collection, or incorrect module path. +Origin: /home/albinus/src/tramp-tests/roles/test/tasks/adb.yml:19:3 +[WARNING]: Deprecation warnings can be disabled by setting `deprecation_warnings=False` in ansible.cfg. +[DEPRECATION WARNING]: Importing 'to_bytes' from 'ansible.module_utils._text' is deprecated. This feature will be removed from ansible-core version 2.24. Use ansible.module_utils.common.text.converters instead. +included: /home/albinus/src/tramp-tests/roles/test/tasks/adb.yml for localhost => (item={'name': 'adb', 'start': '04157df41d46b840'}) +fatal: [localhost]: FAILED! => { + "assertion": "message == []", + "changed": false, + "evaluated_to": false, + "msg": "Assertion failed" +} + + * Ant Java: works at least for jikes and javac symbol: ant @@ -161,7 +179,7 @@ cucumber foo/cucumber.feature:15 # Scenario: deep backtrace in step definition * EDG C/C++ -symbol: edg-1 edg-2 +symbols: edg-1 edg-2 build/intel/debug/../../../struct.cpp(42): error: identifier "foo" is undefined build/intel/debug/../../../struct.cpp(44): warning #1011: missing return statement at end of ... @@ -178,7 +196,7 @@ Error 24 at (2:progran.f90) : syntax error * Fortran checker -symbols: ftnchek +symbol: ftnchek Dummy arg W in module SUBA line 8 file arrayclash.f is array L4 used at line 55 file test/assign.f; never set @@ -336,7 +354,7 @@ boost/container/detail/flat_tree.hpp:589:25: [ skipping 5 instantiation contex * Guile backtrace, 2.0.11 -symbols: guile-file, guile-line +symbols: guile-file guile-line Backtrace: In ice-9/boot-9.scm: @@ -356,6 +374,8 @@ In /home/janneke/vc/guile/examples/gud-break.scm: * Lua 5.1, 5.2, 5.3, 5.4, and LuaJIT 2.1 +symbols: lua lua-stack + /usr/bin/lua: database.lua:31: assertion failed! stack traceback: [C]: in function 'assert' @@ -490,7 +510,7 @@ Fatal error: Call to undefined function: mysql_pconnect() in db.inc on line 66 * Rust -symbol: rust rust-panic +symbols: rust rust-panic error[E0277]: `Foo` is not an iterator --> src/main.rs:4:16 @@ -612,7 +632,7 @@ bloofle defined( /users/wolfgang/foo.c(4) ), but never used * GCOV (test coverage program) -symbol: gcov-file gcov-bb-file gcov-never-called-line gcov-called-line +symbols: gcov-file gcov-bb-file gcov-never-called-line gcov-called-line -: 0:Source:foo.c -: 0:Object:foo.bb diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index fbcdc6b5124..593f9867533 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -229,6 +229,19 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) (aix " in line \\([0-9]+\\) of file \\([^ \n]+[^. \n]\\)\\.? " 2 1) + (ansible-fatal + "^fatal: .*: FAILED!" nil nil nil 2 0 (0 compilation-error-face)) + (ansible-error + "^\\[ERROR\\]:" + nil nil nil 2 0 (0 compilation-error-face)) + (ansible-warning + "^\\[\\(?:DEPRECATION \\)?WARNING\\]:" + nil nil nil 1 0 (0 compilation-warning-face)) + (ansible-included "^included: \\([^[:space:]]+\\)" 1 nil nil 0 1) + (ansible-origin + "^Origin: \\([^[:space:]]+\\):\\([[:digit:]]+\\):\\([[:digit:]]+\\)" + 1 2 3 0 1) + ;; Checkstyle task may report its own severity level: "[checkstyle] [ERROR] ..." ;; (see AuditEventDefaultFormatter.java in checkstyle sources). (ant diff --git a/test/lisp/progmodes/compile-tests.el b/test/lisp/progmodes/compile-tests.el index caf386b4950..cd8e41c3dfb 100644 --- a/test/lisp/progmodes/compile-tests.el +++ b/test/lisp/progmodes/compile-tests.el @@ -52,6 +52,17 @@ ;; aix (aix "****** Error number 140 in line 8 of file errors.c ******" 25 nil 8 "errors.c" error) + ;; Ansible + (ansible-error "[ERROR]: couldn't resolve module/action 'shelll'. This often indicates a misspelling, missing collection, or incorrect module path." + 1 nil nil nil error) + (ansible-fatal "fatal: [localhost]: FAILED! => {" + 1 nil nil nil error) + (ansible-warning "[WARNING]: Deprecation warnings can be disabled by setting `deprecation_warnings=False` in ansible.cfg." + 1 nil nil nil warning) + (ansible-included "included: /home/albinus/src/tramp-tests/roles/test/tasks/adb.yml for localhost => (item={'name': 'adb', 'start': '04157df41d46b840'})" + 11 nil nil "/home/albinus/src/tramp-tests/roles/test/tasks/adb.yml" info) + (ansible-origin "Origin: /home/albinus/src/tramp-tests/roles/test/tasks/adb.yml:19:3" + 9 3 19 "/home/albinus/src/tramp-tests/roles/test/tasks/adb.yml" info) ;; ant (ant "[javac] /src/DataBaseTestCase.java:27: unreported exception ..." 13 nil 27 "/src/DataBaseTestCase.java" error) @@ -561,7 +572,7 @@ The test data is in `compile-tests--test-regexps-data'." (should (eq compilation-num-errors-found 111)) (should (eq compilation-num-warnings-found 37)) - (should (eq compilation-num-infos-found 36))))) + (should (eq compilation-num-infos-found 38))))) (ert-deftest compile-test-grep-regexps () "Test the `grep-regexp-alist' regexps. From 776ee085ff41f8be6b0b0cba4d98428749c02768 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Tue, 2 Jun 2026 23:40:56 +0100 Subject: [PATCH 072/125] Eglot: mentions markdown-ts-view-mode less (bug#81150) * doc/misc/eglot.texi (Customization Variables): Don't mention markdown-ts-view-mode. * etc/EGLOT-NEWS: Don't mention markdown-ts-view-mode. --- doc/misc/eglot.texi | 7 +++---- etc/EGLOT-NEWS | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/doc/misc/eglot.texi b/doc/misc/eglot.texi index 1c9acdc6f9b..caa009f1ec5 100644 --- a/doc/misc/eglot.texi +++ b/doc/misc/eglot.texi @@ -1003,10 +1003,9 @@ from the server (@pxref{Eglot Features}). The default value is @code{nil}, meaning Eglot selects a suitable Markdown renderer on each use---for example, @code{gfm-view-mode} from @code{markdown-mode} on NonGNU ELPA, which enhances documentation through fontification and -other formatting. You can also set it to always use a specific major mode symbol, such -as the aforementioned @code{gfm-view-mode}, or the experimental -@code{markdown-ts-view-mode}. If you set it to @code{t}, plain text is -requested from the server and no rendering is attempted. +other formatting. If you set it to @code{t}, plain text is requested +from the server and no rendering is attempted. See docstring for more +options. @item eglot-mode-map This variable is the keymap for binding Eglot-related command. It is in diff --git a/etc/EGLOT-NEWS b/etc/EGLOT-NEWS index 5b487fd1621..cdbd3048f27 100644 --- a/etc/EGLOT-NEWS +++ b/etc/EGLOT-NEWS @@ -38,8 +38,7 @@ The variable 'eglot-documentation-renderer' replaces the now-obsolete 'eglot-prefer-plaintext' and offers more control over what major mode is used to render markdown snippets. By default, the variable is nil and 'gfm-view-mode' from NonGNU ELPA's markdown-mode package is used if -found. You may also set it to the experimental 'markdown-ts-view-mode' -in Emacs versions with tree-sitter markdown support. +found. See docstring for more details. * Changes in Eglot 1.23 (2/4/2026) From 07e02917eec4abb84ee8868636e30232c9b44466 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Wed, 3 Jun 2026 15:55:03 +0300 Subject: [PATCH 073/125] [GTK3] Re-fix the stored values for width and height * src/gtkutil.c (xg_frame_set_char_size) (xg_frame_set_size_and_position): Round WIDTH and HEIGHT to multiples of SCALE without adding toolbar/menubar (bug#80662). --- src/gtkutil.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gtkutil.c b/src/gtkutil.c index 4fc6b3e0108..8ec3d9ce9bf 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -1203,8 +1203,8 @@ xg_frame_set_char_size (struct frame *f, int width, int height) outer_height /= scale; outer_width /= scale; - height = outer_height * scale; - width = outer_width * scale; + height = height / scale * scale; + width = width / scale * scale; xg_wm_set_size_hint (f, 0, 0); @@ -1331,8 +1331,8 @@ xg_frame_set_size_and_position (struct frame *f, int width, int height) outer_height /= scale; outer_width /= scale; - height = outer_height * scale; - width = outer_width * scale; + height = height / scale * scale; + width = width / scale * scale; x /= scale; y /= scale; From 44fa1595ce8eb6a124982da57057ef6ebd9310e0 Mon Sep 17 00:00:00 2001 From: Pip Cet Date: Sat, 30 May 2026 12:10:30 +0000 Subject: [PATCH 074/125] * lisp/send-to.el (send-to--resolve-handler): Add autoload. --- lisp/send-to.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/send-to.el b/lisp/send-to.el index f1795cfa7a0..2e9ea334c85 100644 --- a/lisp/send-to.el +++ b/lisp/send-to.el @@ -152,6 +152,7 @@ explicitly overridden." (forward-line 1)))) filenames))) +;;;###autoload (defun send-to--resolve-handler () "Return first supported handler from `send-to-handlers'." (seq-find (lambda (handler) From 08336b9a55fcbd89623427724b764ce0c87e3838 Mon Sep 17 00:00:00 2001 From: Pip Cet Date: Sat, 30 May 2026 12:11:14 +0000 Subject: [PATCH 075/125] Always return a list from send-to--collect-items * lisp/send-to.el (send-to--collect-items): Return singleton list, not a string directly. --- lisp/send-to.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/send-to.el b/lisp/send-to.el index 2e9ea334c85..95e95fd5433 100644 --- a/lisp/send-to.el +++ b/lisp/send-to.el @@ -222,7 +222,7 @@ From any other buffer, either of these two, in order of preference: (region-beginning) (region-end)))) ((thing-at-point 'existing-filename) - (thing-at-point 'existing-filename)) + (list (thing-at-point 'existing-filename))) ((buffer-file-name) (list (buffer-file-name))))) From c9dfe2abe6339c7b48a9f62c7843d8c75ce7e644 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Mon, 11 May 2026 05:51:49 +0300 Subject: [PATCH 076/125] Avoid background fills on parent during child frame resize/move/hide * src/xterm.c (x_suspend_background_fills) (x_restore_background_fills): New functions. (x_set_window_size, x_set_window_size_and_position) (x_make_frame_invisible): Use them (bug#80961). --- src/xterm.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/src/xterm.c b/src/xterm.c index ddbf8e06664..fe17f3d5bba 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -28542,6 +28542,27 @@ x_set_window_size_1 (struct frame *f, bool change_gravity, } } +/* Resizing an occluding window (such as a child frame) immediately + triggers a fill with background color on the exposed area on the + parent when the X server receives the corresponding command + (XResizeWindow, XMoveResizeWindow, etc). But only if the window has + a background assigned. Change it to None to block that effect. */ +static void +x_suspend_background_fills (struct frame *f) +{ + Display *dpy = FRAME_X_DISPLAY (f); + + XSetWindowBackgroundPixmap (dpy, FRAME_X_WINDOW (f), None); +} + +/* No automatmic fill happens when the background is restored. */ +static void +x_restore_background_fills (struct frame *f) +{ + Display *dpy = FRAME_X_DISPLAY (f); + + XSetWindowBackground (dpy, FRAME_X_WINDOW (f), FRAME_BACKGROUND_PIXEL (f)); +} /* Change the size of frame F's X window to WIDTH and HEIGHT pixels. If CHANGE_GRAVITY, change to top-left-corner window gravity for this @@ -28554,6 +28575,9 @@ x_set_window_size (struct frame *f, bool change_gravity, { block_input (); + if (FRAME_PARENT_FRAME (f)) + x_suspend_background_fills (FRAME_PARENT_FRAME (f)); + #ifdef USE_GTK if (FRAME_GTK_WIDGET (f)) xg_frame_set_char_size (f, width, height); @@ -28565,6 +28589,9 @@ x_set_window_size (struct frame *f, bool change_gravity, x_clear_under_internal_border (f); #endif /* not USE_GTK */ + if (FRAME_PARENT_FRAME (f)) + x_restore_background_fills (FRAME_PARENT_FRAME (f)); + /* If cursor was outside the new size, mark it as off. */ mark_window_cursors_off (XWINDOW (f->root_window)); @@ -28626,6 +28653,9 @@ x_set_window_size_and_position (struct frame *f, int width, int height) { block_input (); + if (FRAME_PARENT_FRAME (f)) + x_suspend_background_fills (FRAME_PARENT_FRAME (f)); + #ifdef USE_GTK if (FRAME_GTK_WIDGET (f)) xg_frame_set_size_and_position (f, width, height); @@ -28638,6 +28668,9 @@ x_set_window_size_and_position (struct frame *f, int width, int height) if (!FRAME_PARENT_FRAME (f)) x_clear_under_internal_border (f); + if (FRAME_PARENT_FRAME (f)) + x_restore_background_fills (FRAME_PARENT_FRAME (f)); + /* If cursor was outside the new size, mark it as off. */ mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f))); @@ -29397,6 +29430,9 @@ x_make_frame_invisible (struct frame *f) by hand again (they have already done that once for this window.) */ x_wm_set_size_hint (f, 0, true); + if (FRAME_PARENT_FRAME (f)) + x_suspend_background_fills (FRAME_PARENT_FRAME (f)); + #ifdef USE_GTK if (FRAME_GTK_OUTER_WIDGET (f)) gtk_widget_hide (FRAME_GTK_OUTER_WIDGET (f)); @@ -29414,6 +29450,9 @@ x_make_frame_invisible (struct frame *f) error ("Can't notify window manager of window withdrawal"); } + if (FRAME_PARENT_FRAME (f)) + x_restore_background_fills (FRAME_PARENT_FRAME (f)); + /* Don't perform the synchronization if the network connection is slow, and the user says it is unwanted. */ if (NILP (Vx_lax_frame_positioning)) From d852d36c77fa5f9e7b762ce6b6ff0972a8fcc8ac Mon Sep 17 00:00:00 2001 From: Xiyue Deng Date: Sun, 24 May 2026 19:23:48 -0700 Subject: [PATCH 077/125] Decrypt plstore when needed in 'plstore-delete' When a plstore has entries with secret keys, processing the plstore file would require decryption first. However, unlike other functions like 'plstore-get', 'plstore-put', etc., 'plstore-delete' does not check for secret keys and decrypt the file, which would corrupt the file when deleting any entries with secret keys. This patch adds checking for secret keys and decrypt the file when needed before removing the entry with name. * lisp/plstore.el (plstore--has-secret-keys): New. * lisp/plstore.el (plstore-delete): Check for secret keys of the entry and decrypt plstore before performing the deletion. (Bug#81061) --- lisp/plstore.el | 43 ++++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/lisp/plstore.el b/lisp/plstore.el index 0964e6ccaf6..2fada5a308d 100644 --- a/lisp/plstore.el +++ b/lisp/plstore.el @@ -550,23 +550,36 @@ SECRET-KEYS is a plist containing secret data." (cons (cons name secret-plist) (plstore--get-secret-alist plstore))))) (plstore--merge-secret plstore))) +(defun plstore--has-secret-keys (plist) + "Return t if PLIST of a plstore entry has secret keys." + (string-match-p "\\`:secret-" (symbol-name (car plist)))) + (defun plstore-delete (plstore name) "Delete the first entry named NAME from PLSTORE." - (let ((entry (assoc name (plstore--get-alist plstore)))) - (if entry - (plstore--set-alist - plstore - (delq entry (plstore--get-alist plstore)))) - (setq entry (assoc name (plstore--get-secret-alist plstore))) - (if entry - (plstore--set-secret-alist - plstore - (delq entry (plstore--get-secret-alist plstore)))) - (setq entry (assoc name (plstore--get-merged-alist plstore))) - (if entry - (plstore--set-merged-alist - plstore - (delq entry (plstore--get-merged-alist plstore)))))) + (when-let* ((entry (assoc name (plstore--get-alist plstore))) + (plist (cdr entry))) + (when (plstore--has-secret-keys plist) + (plstore--decrypt plstore) + (setq entry (assoc name (plstore--get-alist plstore)))) + (plstore--set-alist + plstore + (delq entry (plstore--get-alist plstore)))) + (when-let* ((entry (assoc name (plstore--get-secret-alist plstore))) + (plist (cdr entry))) + (when (plstore--has-secret-keys plist) + (plstore--decrypt plstore) + (setq entry (assoc name (plstore--get-secret-alist plstore)))) + (plstore--set-secret-alist + plstore + (delq entry (plstore--get-secret-alist plstore)))) + (when-let* ((entry (assoc name (plstore--get-merged-alist plstore))) + (plist (cdr entry))) + (when (plstore--has-secret-keys plist) + (plstore--decrypt plstore) + (setq entry (assoc name (plstore--get-merged-alist plstore)))) + (plstore--set-merged-alist + plstore + (delq entry (plstore--get-merged-alist plstore))))) (defvar pp-escape-newlines) (defun plstore--insert-buffer (plstore) From 0989625d369379599e0b88362704c02fb63422c9 Mon Sep 17 00:00:00 2001 From: Rahul Martim Juliato Date: Mon, 25 May 2026 15:17:25 -0300 Subject: [PATCH 078/125] markdown-ts-mode: fix first-item indent (bug#81118) * lisp/textmodes/markdown-ts-mode.el (markdown-ts--fontify-unordered-list-marker): Skip leading whitespace in the node range before applying the display bullet, since the tree-sitter grammar bundles indent into the first list_marker_* node. --- lisp/textmodes/markdown-ts-mode.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/textmodes/markdown-ts-mode.el b/lisp/textmodes/markdown-ts-mode.el index e6b01c77b57..b2124b20775 100644 --- a/lisp/textmodes/markdown-ts-mode.el +++ b/lisp/textmodes/markdown-ts-mode.el @@ -1406,8 +1406,16 @@ If NODE is not in a list, return -1." "Fontify unordered list marker NODE, show a symbol when markup is hidden. OVERRIDE, START, and END are passed through to `treesit-fontify-with-override'." - (let* ((node-start (treesit-node-start node)) + ;; The tree-sitter markdown grammar includes the leading indentation + ;; in the first list_marker_minus/plus/star node of a list, so skip + ;; over any leading whitespace to avoid overwriting the indent with + ;; the replacement glyph. + (let* ((raw-start (treesit-node-start node)) (node-end (treesit-node-end node)) + (node-start (save-excursion + (goto-char raw-start) + (skip-chars-forward " \t" node-end) + (point))) (face 'markdown-ts-list-marker)) (treesit-fontify-with-override node-start node-end face override start end) From e6e79b1e090df382ccc25c01305035b16cf3b8b6 Mon Sep 17 00:00:00 2001 From: David Ponce Date: Mon, 1 Jun 2026 11:35:15 +0200 Subject: [PATCH 079/125] Don't unconditionally append the :ascent property in wid-edit * lisp/wid-edit.el (widget-toggle-value-create): Don't duplicate the :ascent property if already set. (Bug#81167) --- lisp/wid-edit.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 3871d0f64c4..b81adc49a54 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -2546,9 +2546,13 @@ when he invoked the menu." (widget-get widget (if val :on :off)))) (img (widget-image-find (widget-get widget (if val :on-glyph :off-glyph))))) - (widget-image-insert widget (or text "") - (if img - (append img '(:ascent center)))))) + (and img (null (image-property img :ascent)) + ;; Unlike (setf (image-property img :ascent) 'center), a simple + ;; `append' will not modify img as a side effect, and is safe + ;; to use here because the :ascent property is guaranteed to be + ;; absent. + (setq img (append img '(:ascent center)))) + (widget-image-insert widget (or text "") img))) (defun widget-toggle-action (widget &optional event) ;; Toggle value. From 108710992d07bc17d7fa2751ad3ef3efaeb856b9 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 4 Jun 2026 09:25:21 +0300 Subject: [PATCH 080/125] ; * doc/misc/ert.texi (erts files): Improve example (bug#81154). --- doc/misc/ert.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/misc/ert.texi b/doc/misc/ert.texi index 458cccf3063..b08c62c06b6 100644 --- a/doc/misc/ert.texi +++ b/doc/misc/ert.texi @@ -933,8 +933,8 @@ that start with a space are part of the value). @example Name: foo -Code: (indent-region - (point-min) (point-max)) +Code: (lambda () + (indent-region (point-min) (point-max))) @end example @table @samp From fe1c02d8498e443e5816bdd76402bd16df8ab1f7 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Thu, 4 Jun 2026 08:34:48 +0200 Subject: [PATCH 081/125] Fix Tramp distrobox integration * lisp/net/tramp.el (tramp-yesno-prompt-regexp): Fix docstring. (tramp-yn-prompt-regexp): Fix docstring. Extend. Add :version. * test/lisp/net/tramp-tests.el (tramp-test03-file-error): Adapt test. --- lisp/net/tramp.el | 10 +++++++--- test/lisp/net/tramp-tests.el | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index fc897fb2a7c..bbe44880fd1 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -801,19 +801,23 @@ The regexp should match at end of buffer." (? "/[fingerprint]") ")?" (* blank)) "Regular expression matching all yes/no queries which need to be confirmed. -The confirmation should be done with yes or no. +The confirmation should be done with \"yes\" or \"no\". The regexp should match at end of buffer. See also `tramp-yn-prompt-regexp'." :type 'regexp) (defcustom tramp-yn-prompt-regexp (rx (| (: "Store key in cache? (y/n" (* nonl) ")") - "Update cached key? (y/n, Return cancels connection)") + "Update cached key? (y/n, Return cancels connection)" + ;; distrobox. + (: "Error: no such container \"" (+ nonl) "\"\n" + "Create it now, out of image " (+ nonl) "? [Y/n]:")) (* blank)) "Regular expression matching all y/n queries which need to be confirmed. -The confirmation should be done with y or n. +The confirmation should be done with \"y\" or \"n\". The regexp should match at end of buffer. See also `tramp-yesno-prompt-regexp'." + :version "31.1" :type 'regexp) ;;;###tramp-autoload diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 4d11faf64de..3577388aa62 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -2299,6 +2299,7 @@ being the result.") (tramp-default-proxies-alist tramp-default-proxies-alist) (tramp-show-ad-hoc-proxies t)) (cl-letf* (((symbol-function #'read-string) #'ignore) ; Suppress password. + ((symbol-function #'y-or-n-p) #'ignore) ; distrobox. ((tramp-file-name-host vec) "example.com.invalid")) (should-error (file-exists-p (tramp-make-tramp-file-name vec)) From 3d9d9be3a1d0a9d4ea6f4fad86cfe4ebc8da329b Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Thu, 21 May 2026 14:58:23 +0000 Subject: [PATCH 082/125] CC Mode: Fontify a cast type preceding a brace initialization This fixes bug#81084. * lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): In the test for a cast near the end of the function, add a test for a {...} block which isn't a statement block, allowing such blocks to be recognized as operands of casts. --- lisp/progmodes/cc-engine.el | 59 +++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index bc7d8372f11..5f150778129 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -11687,34 +11687,37 @@ This function might do hidden buffer changes." (forward-char) (c-forward-syntactic-ws) (setq cast-end (point)) - (and (looking-at c-primary-expr-regexp) - (progn - (setq pos (match-end 0)) - (or - ;; Check if the expression begins with a prefix keyword. - (match-beginning 2) - (if (match-beginning 1) - ;; Expression begins with an ambiguous operator. - (cond - ((match-beginning c-per-&*+--match) - (memq at-type '(t known found))) - ((match-beginning c-per-++---match) - t) - ((match-beginning c-per-\(-match) - (or - (memq at-type '(t known found)) - (not inside-macro))) - (t nil)) - ;; Unless it's a keyword, it's the beginning of a primary - ;; expression. - (not (looking-at c-keywords-regexp))))) - ;; If `c-primary-expr-regexp' matched a nonsymbol token, check - ;; that it matched a whole one so that we don't e.g. confuse - ;; the operator '-' with '->'. It's ok if it matches further, - ;; though, since it e.g. can match the float '.5' while the - ;; operator regexp only matches '.'. - (or (not (looking-at c-nonsymbol-token-regexp)) - (<= (match-end 0) pos)))) + (or + (and (looking-at c-primary-expr-regexp) + (progn + (setq pos (match-end 0)) + (or + ;; Check if the expression begins with a prefix keyword. + (match-beginning 2) + (if (match-beginning 1) + ;; Expression begins with an ambiguous operator. + (cond + ((match-beginning c-per-&*+--match) + (memq at-type '(t known found))) + ((match-beginning c-per-++---match) + t) + ((match-beginning c-per-\(-match) + (or + (memq at-type '(t known found)) + (not inside-macro))) + (t nil)) + ;; Unless it's a keyword, it's the beginning of a primary + ;; expression. + (not (looking-at c-keywords-regexp))))) + ;; If `c-primary-expr-regexp' matched a nonsymbol token, + ;; check that it matched a whole one so that we don't + ;; e.g. confuse the operator '-' with '->'. It's ok if it + ;; matches further, though, since it e.g. can match the float + ;; '.5' while the operator regexp only matches '.'. + (or (not (looking-at c-nonsymbol-token-regexp)) + (<= (match-end 0) pos))) + (and (eq (char-after) ?\{) + (not (eq (c-looking-at-statement-block-1) t))))) ;; There should either be a cast before it or something that isn't an ;; identifier or close paren. From 6b3991940885e2c13ff23ff72830e18b425ee74d Mon Sep 17 00:00:00 2001 From: Karl Stump <36189+kes@users.noreply.github.com> Date: Wed, 3 Jun 2026 12:25:04 -0400 Subject: [PATCH 083/125] ; Fix typo in prog-indentation-context documentation (bug#81180) Copyright-paperwork-exempt: yes --- doc/lispref/text.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 5ef6cbebfb9..ac010fe332b 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -2625,7 +2625,7 @@ avoid calling @code{widen} in their indentation code and obey @defvar prog-indentation-context This variable, when non-@code{nil}, holds the indentation context for the sub-mode's indentation engine provided by the superior major mode. -The value should be a list of the form @code{(@var{first-column} . @var{rest}}. +The value should be a list of the form @code{(@var{first-column} . @var{rest})}. The members of the list have the following meaning: @table @var From 438af2764d2c2032d27e56f84ed68de960c173c0 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 4 Jun 2026 09:42:56 +0300 Subject: [PATCH 084/125] ; * doc/lispref/text.texi (Mode-Specific Indent): Fix markup. --- doc/lispref/text.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index ac010fe332b..6fcc1b0a078 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -2625,7 +2625,8 @@ avoid calling @code{widen} in their indentation code and obey @defvar prog-indentation-context This variable, when non-@code{nil}, holds the indentation context for the sub-mode's indentation engine provided by the superior major mode. -The value should be a list of the form @code{(@var{first-column} . @var{rest})}. +The value should be a list of the form @w{@code{(@var{first-column} +. @var{rest})}}. The members of the list have the following meaning: @table @var From aa6acc69edb64eb962beb074c065c7b44c194da7 Mon Sep 17 00:00:00 2001 From: Xiyue Deng Date: Thu, 4 Jun 2026 00:31:41 -0700 Subject: [PATCH 085/125] plstore: use 'plstore--has-secret-keys' * lisp/plstore.el (plstore-find, plstore-get, plstore--encode) (plstore--decode): Use 'plstore--has-secret-keys' to replace manual check for existence of secret keys. (Bug#81061) --- lisp/plstore.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/plstore.el b/lisp/plstore.el index 2fada5a308d..6a1d858f958 100644 --- a/lisp/plstore.el +++ b/lisp/plstore.el @@ -478,7 +478,7 @@ perform a match." (when match (setq plist (cdr entry)) (while plist - (if (string-match "\\`:secret-" (symbol-name (car plist))) + (if (plstore--has-secret-keys plstore) (setq decrypt t plist nil)) (setq plist (nthcdr 2 plist))) @@ -503,7 +503,7 @@ Return nil if there is none." plist) (setq plist (cdr entry)) (while plist - (if (string-match "\\`:secret-" (symbol-name (car plist))) + (if (plstore--has-secret-keys plstore) (progn (plstore--decrypt plstore) (setq entry (assoc name (plstore--get-merged-alist plstore)) @@ -663,7 +663,7 @@ GnuPG key, silently save with symmetric encryption." ; (FIXME) (let ((merged-plist (cdr (assoc (car entry) merged-alist))) (plist (cdr entry))) (while plist - (if (string-match "\\`:secret-" (symbol-name (car plist))) + (if (plstore--has-secret-keys plstore) (setcar (cdr plist) (plist-get merged-plist @@ -691,7 +691,7 @@ some plstore." (error "Invalid plstore format %s" string)) (setq plist (cdr (car pointer))) (while plist - (when (string-match "\\`:secret-" (symbol-name (car plist))) + (when (plstore--has-secret-keys plstore) (setq entry (assoc (car (car pointer)) secret-alist)) (unless entry (setq entry (list (car (car pointer))) From 7226082f46fc2b68aaca7b4308e72d483bae8f67 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 4 Jun 2026 10:49:23 +0100 Subject: [PATCH 086/125] vc-dir-refresh: Respect non-essential wrt saving buffers * lisp/vc/vc-dir.el (vc-dir-refresh): If non-essential is non-nil, don't call vc-buffer-sync-fileset. --- lisp/vc/vc-dir.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index 2cb56aac715..27513f463bd 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -1522,7 +1522,7 @@ Throw an error if another update process is in progress." (error "Another update process is in progress, cannot run two at a time") (let ((def-dir default-directory) (backend vc-dir-backend)) - (when vc-dir-save-some-buffers-on-revert + (when (and vc-dir-save-some-buffers-on-revert (not non-essential)) (vc-buffer-sync-fileset `(,vc-dir-backend (,def-dir)) t)) (vc-set-mode-line-busy-indicator) ;; Call the `dir-status' backend function. From f3b17c49695802ab21f2998e68c81320300ca99c Mon Sep 17 00:00:00 2001 From: JD Smith Date: Tue, 2 Jun 2026 16:38:58 -0400 Subject: [PATCH 087/125] Allow brew/macports libgccjit for default native compilation * configure.ac: Move flag setup for libgccjit installed by Homebrew or macports earlier, so default native compilation can proceed (bug#81171). --- configure.ac | 54 ++++++++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/configure.ac b/configure.ac index 8bc5f6daa11..7c592e6b89f 100644 --- a/configure.ac +++ b/configure.ac @@ -5227,25 +5227,7 @@ if test "$with_features" = "no" \ with_native_compilation=no fi -if test "${with_native_compilation}" = "default"; then - # Check if libgccjit is available. - AC_CHECK_LIB([gccjit], [gcc_jit_context_acquire], - [], [libgccjit_not_found]) - AC_CHECK_HEADERS([libgccjit.h], [], [libgccjit_dev_not_found]) - if test "${with_native_compilation}" != "no"; then - # Check if libgccjit really works. - AC_RUN_IFELSE([libgccjit_smoke_test], [], [libgccjit_broken]) - fi -fi - if test "${with_native_compilation}" != "no"; then - if test "${HAVE_ZLIB}" = no; then - AC_MSG_ERROR(['--with-native-compilation' requires zlib]) - fi - - SAVE_CFLAGS=$CFLAGS - SAVE_LIBS=$LIBS - if test "${opsys}" = "darwin"; then # Ensure libgccjit installed by Homebrew or macports can be found. if test -n "$BREW"; then @@ -5282,15 +5264,37 @@ if test "${with_native_compilation}" != "no"; then fi fi - # In the default case we already checked - if test "${with_native_compilation}" != "default"; then - # Check if libgccjit is available. - AC_CHECK_LIB([gccjit], [gcc_jit_context_acquire], - [], [libgccjit_not_found_err]) - AC_CHECK_HEADERS([libgccjit.h], [], [libgccjit_dev_not_found_err]) + # Check if libgccjit is available. + AC_CHECK_LIB([gccjit], [gcc_jit_context_acquire], [], + [if test "${with_native_compilation}" = "default"; then + libgccjit_not_found + else + libgccjit_not_found_err + fi]) + AC_CHECK_HEADERS([libgccjit.h], [], + [if test "${with_native_compilation}" = "default"; then + libgccjit_dev_not_found + else + libgccjit_dev_not_found_err + fi]) + if test "${with_native_compilation}" != "no"; then # Check if libgccjit really works. - AC_RUN_IFELSE([libgccjit_smoke_test], [], [libgccjit_broken_err]) + AC_RUN_IFELSE([libgccjit_smoke_test], [], + [if test "${with_native_compilation}" = "default"; then + libgccjit_broken + else + libgccjit_broken_err + fi]) fi +fi + +if test "${with_native_compilation}" != "no"; then + if test "${HAVE_ZLIB}" = no; then + AC_MSG_ERROR(['--with-native-compilation' requires zlib]) + fi + + SAVE_CFLAGS=$CFLAGS + SAVE_LIBS=$LIBS HAVE_NATIVE_COMP=yes case "${opsys}" in # mingw32 loads the library dynamically. From 0a8a5d4fadbe8c053a348e99e87aa0dda058ddef Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 4 Jun 2026 12:04:13 +0100 Subject: [PATCH 088/125] Don't query on exit for dir-status-files VC backend processes * lisp/vc/vc-bzr.el (vc-bzr-dir-status-files): * lisp/vc/vc-cvs.el (vc-cvs-dir-status-files): * lisp/vc/vc-git.el (vc-git-dir-status-goto-stage): * lisp/vc/vc-hg.el (vc-hg-dir-status-files): * lisp/vc/vc-svn.el (vc-svn-dir-status-files): Set the query-on-exit flag for the processes populating VC-Dir buffers to nil. --- lisp/vc/vc-bzr.el | 4 ++- lisp/vc/vc-cvs.el | 8 ++++-- lisp/vc/vc-git.el | 71 ++++++++++++++++++++++------------------------- lisp/vc/vc-hg.el | 12 ++++---- lisp/vc/vc-svn.el | 4 ++- 5 files changed, 51 insertions(+), 48 deletions(-) diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index 1be1f6db7f4..7b2bf33fad6 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -1032,7 +1032,9 @@ stream. Standard error output is discarded." (defun vc-bzr-dir-status-files (dir files update-function) "Return a list of conses (file . state) for DIR." - (apply #'vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S" files) + (set-process-query-on-exit-flag + (apply #'vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S" files) + nil) ;; FIXME: Consider `vc-run-delayed-success'. (vc-run-delayed (vc-bzr-after-dir-status update-function diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index eb971754c1c..293ebcca3e2 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el @@ -1083,9 +1083,11 @@ Query all files in DIR if files is nil." (let ((local (vc-cvs-stay-local-p dir))) (if (and (not files) local (not (eq local 'only-file))) (vc-cvs-dir-status-heuristic dir update-function)) - (vc-cvs-command (current-buffer) 'async - files - "-f" "-n" "-q" "update") + (set-process-query-on-exit-flag + (vc-cvs-command (current-buffer) 'async + files + "-f" "-n" "-q" "update") + nil) ;; FIXME: Consider `vc-run-delayed-success'. (vc-run-delayed (vc-cvs-after-dir-status update-function)))) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 6b9530c9570..4021c69ea4f 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -724,44 +724,39 @@ or an empty string if none." (defun vc-git-dir-status-goto-stage (git-state) ;; TODO: Look into reimplementing this using `git status --porcelain=v2'. - (let ((files (vc-git-dir-status-state->files git-state)) - (allowed-exit 1)) - (erase-buffer) - (pcase (vc-git-dir-status-state->stage git-state) - ('update-index - (if files - (progn (vc-git-command (current-buffer) 'async files - "add" "--refresh" "--") - ;; git-add exits 128 if some of FILES are untracked; - ;; we can ignore that (bug#79999). - (setq allowed-exit 128)) - (vc-git-command (current-buffer) 'async nil - "update-index" "--refresh"))) - ('ls-files-added - (vc-git-command (current-buffer) 'async files - "ls-files" "-z" "-c" "-s" "--")) - ('ls-files-up-to-date - (vc-git-command (current-buffer) 'async files - "ls-files" "-z" "-c" "-s" "--")) - ('ls-files-conflict - (vc-git-command (current-buffer) 'async files - "ls-files" "-z" "-u" "--")) - ('ls-files-missing - (vc-git-command (current-buffer) 'async files - "ls-files" "-z" "-d" "--")) - ('ls-files-unknown - (vc-git-command (current-buffer) 'async files - "ls-files" "-z" "-o" "--exclude-standard" "--")) - ('ls-files-ignored - (vc-git-command (current-buffer) 'async files - "ls-files" "-z" "-o" "-i" "--directory" - "--no-empty-directory" "--exclude-standard" "--")) - ;; --relative added in Git 1.5.5. - ('diff-index - (vc-git-command (current-buffer) 'async files - "diff-index" "--relative" "-z" "-M" "HEAD" "--"))) - (vc-run-delayed-success allowed-exit - (vc-git-after-dir-status-stage git-state)))) + (cl-flet ((git-cmd (&rest args) + (set-process-query-on-exit-flag + (apply #'vc-git-command (current-buffer) 'async args) + nil))) + (let ((files (vc-git-dir-status-state->files git-state)) + (allowed-exit 1)) + (erase-buffer) + (pcase (vc-git-dir-status-state->stage git-state) + ('update-index + (if files + (progn (git-cmd files "add" "--refresh" "--") + ;; git-add exits 128 if some of FILES are untracked; + ;; we can ignore that (bug#79999). + (setq allowed-exit 128)) + (git-cmd nil "update-index" "--refresh"))) + ('ls-files-added + (git-cmd files "ls-files" "-z" "-c" "-s" "--")) + ('ls-files-up-to-date + (git-cmd files "ls-files" "-z" "-c" "-s" "--")) + ('ls-files-conflict + (git-cmd files "ls-files" "-z" "-u" "--")) + ('ls-files-missing + (git-cmd files "ls-files" "-z" "-d" "--")) + ('ls-files-unknown + (git-cmd files "ls-files" "-z" "-o" "--exclude-standard" "--")) + ('ls-files-ignored + (git-cmd files "ls-files" "-z" "-o" "-i" "--directory" + "--no-empty-directory" "--exclude-standard" "--")) + ;; --relative added in Git 1.5.5. + ('diff-index + (git-cmd files "diff-index" "--relative" "-z" "-M" "HEAD" "--"))) + (vc-run-delayed-success allowed-exit + (vc-git-after-dir-status-stage git-state))))) (defun vc-git-dir-status-files (_dir files update-function) "Return a list of (FILE STATE EXTRA) entries for DIR." diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index af143a4b1da..c375d14b7e3 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -1544,11 +1544,13 @@ REV is the revision to check out into WORKFILE." ;; XXX: We can't pass DIR directly to 'hg status' because that ;; returns all ignored files if FILES is non-nil (bug#22481). (let ((default-directory dir)) - (apply #'vc-hg-command '(t nil) 'async files - "status" (concat "-mardu" (if files "i")) "-C" - (if (version<= "4.2" (vc-hg--program-version)) - '("--config" "commands.status.relative=1") - '("re:" "-I" ".")))) + (set-process-query-on-exit-flag + (apply #'vc-hg-command '(t nil) 'async files + "status" (concat "-mardu" (if files "i")) "-C" + (if (version<= "4.2" (vc-hg--program-version)) + '("--config" "commands.status.relative=1") + '("re:" "-I" "."))) + nil)) (vc-run-delayed-success 0 (vc-hg-after-dir-status update-function))) diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index 12704361430..6e920f7e721 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el @@ -227,7 +227,9 @@ A value of `default' means to use the value of `vc-resolve-conflicts'." CALLBACK is called as (CALLBACK RESULT BUFFER), where RESULT is a list of conses (FILE . STATE) for directory DIR." ;; FIXME shouldn't this rather default to all the files in dir? - (apply #'vc-svn-command (current-buffer) 'async nil "status" "-u" files) + (set-process-query-on-exit-flag + (apply #'vc-svn-command (current-buffer) 'async nil "status" "-u" files) + nil) ;; FIXME: Consider `vc-run-delayed-success'. (vc-run-delayed (vc-svn-after-dir-status callback t))) From 8a00733af5d083c79298ddc21d8c02fe296abfd7 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 4 Jun 2026 14:47:13 +0300 Subject: [PATCH 089/125] ; Fix last change * lisp/plstore.el (plstore--decode, plstore--encode) (plstore-get, plstore-find): Fix last change. (Bug#81061) --- lisp/plstore.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/plstore.el b/lisp/plstore.el index 6a1d858f958..c67ca37e716 100644 --- a/lisp/plstore.el +++ b/lisp/plstore.el @@ -478,7 +478,7 @@ perform a match." (when match (setq plist (cdr entry)) (while plist - (if (plstore--has-secret-keys plstore) + (if (plstore--has-secret-keys plist) (setq decrypt t plist nil)) (setq plist (nthcdr 2 plist))) @@ -503,7 +503,7 @@ Return nil if there is none." plist) (setq plist (cdr entry)) (while plist - (if (plstore--has-secret-keys plstore) + (if (plstore--has-secret-keys plist) (progn (plstore--decrypt plstore) (setq entry (assoc name (plstore--get-merged-alist plstore)) @@ -663,7 +663,7 @@ GnuPG key, silently save with symmetric encryption." ; (FIXME) (let ((merged-plist (cdr (assoc (car entry) merged-alist))) (plist (cdr entry))) (while plist - (if (plstore--has-secret-keys plstore) + (if (plstore--has-secret-keys plist) (setcar (cdr plist) (plist-get merged-plist @@ -691,7 +691,7 @@ some plstore." (error "Invalid plstore format %s" string)) (setq plist (cdr (car pointer))) (while plist - (when (plstore--has-secret-keys plstore) + (when (plstore--has-secret-keys plist) (setq entry (assoc (car (car pointer)) secret-alist)) (unless entry (setq entry (list (car (car pointer))) From 6df1d33b6ce145d4fb84ff4b8b11812ca2372b4b Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Sun, 26 Apr 2026 15:46:19 +0300 Subject: [PATCH 090/125] Fmake_xwidget: Use about:blank workaround only when needed * src/process.c (glib_installs_sigchld_handler): New variable. (init_process_emacs): Set it when GLib overrides Emacs's SIGCHLD handler. * src/process.h (glib_installs_sigchld_handler): Declare. * src/xwidget.c (Fmake_xwidget): Skip the "about:blank" workaround when glib_installs_sigchld_handler is false. --- src/process.c | 7 +++++++ src/process.h | 2 ++ src/xwidget.c | 25 +++++++++++++++++++------ 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/src/process.c b/src/process.c index d46be48821f..3a14f60b3c2 100644 --- a/src/process.c +++ b/src/process.c @@ -7656,6 +7656,12 @@ child_signal_notify (void) static void dummy_handler (int sig) {} static signal_handler_t volatile lib_child_handler; +/* True if Glib installs its own SIGCHLD handler that Emacs must work + around. Determined once in init_process_emacs; consulted elsewhere + (e.g. xwidget.c) to decide whether the about:blank load workaround + is needed. */ +bool glib_installs_sigchld_handler; + /* Handle a SIGCHLD signal by looking for known child processes of Emacs whose status have changed. For each one found, record its new status. @@ -8718,6 +8724,7 @@ init_process_emacs (int sockfd) if (lib_child_handler != dummy_handler) { /* The hacky workaround is needed on this platform. */ + glib_installs_sigchld_handler = true; signal_handler_t lib_child_handler_glib = lib_child_handler; catch_child_signal (); eassert (lib_child_handler == dummy_handler); diff --git a/src/process.h b/src/process.h index 1c9b04aa06e..c43f2fe1ea9 100644 --- a/src/process.h +++ b/src/process.h @@ -263,6 +263,8 @@ pset_gnutls_cred_type (struct Lisp_Process *p, Lisp_Object val) /* True means don't run process sentinels. This is used when exiting. */ extern bool inhibit_sentinels; +/* True means that Glib clobbers Emacs SIGCHLD handler. */ +extern bool glib_installs_sigchld_handler; /* Exit statuses for GNU programs that exec other programs. */ enum diff --git a/src/xwidget.c b/src/xwidget.c index 0b890375c30..e2ab7499927 100644 --- a/src/xwidget.c +++ b/src/xwidget.c @@ -361,13 +361,26 @@ fails. */) g_signal_connect (G_OBJECT (ctx), "download-started", G_CALLBACK (webkit_download_cb), xw); + /* In process.c:init_process_emacs(), we determine whether GLib + overrides Emacs' SIGCHLD handler (based on Glib version + and kernel; see process.c for details). - webkit_web_view_load_uri (WEBKIT_WEB_VIEW (xw->widget_osr), - "about:blank"); - /* webkitgtk uses GSubprocess which sets sigaction causing - Emacs to not catch SIGCHLD with its usual handle setup in - 'catch_child_signal'. This resets the SIGCHLD sigaction. */ - catch_child_signal (); + webkit_web_view_load_uri() is potentially affected by this + (through GSubProcess), so as a workaround we load a minimal + about:blank url and restore the SIGCHLD handler afterward. + + With PGTK, this workaround has the unfortunate side-effect of + making the first load of an URI not work immediately (it needs + a refresh), so avoid the workaround when we can. + + See thread + . */ + if (glib_installs_sigchld_handler) + { + webkit_web_view_load_uri (WEBKIT_WEB_VIEW (xw->widget_osr), + "about:blank"); + catch_child_signal (); + } } else { From 621239ae6af60eeab19ed272630192ee66bdaaac Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Thu, 4 Jun 2026 19:44:07 +0200 Subject: [PATCH 091/125] Fix prompt in remote shell * lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Do not use a hard-coded directory in PS1. (Bug#81177) --- lisp/net/tramp-sh.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 8d4dc557676..f939635cfb5 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -3081,7 +3081,7 @@ will be used." ;; We discard hops, if existing, that's why we cannot use ;; `file-remote-p'. (prompt (format "PS1=%s %s" - (tramp-make-tramp-file-name v) + (tramp-make-tramp-file-name v 'noloc) tramp-initial-end-of-output)) ;; We use as environment the difference to toplevel ;; `process-environment'. From bbe805e4b14595f5364875bcceda6a7ce56250d4 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 4 Jun 2026 14:20:06 -0400 Subject: [PATCH 092/125] message.el: Fix part of bug#81035 * lisp/gnus/message.el (message-narrow-to-field) (message-hide-headers): Syntax-propertize before narrowing. --- lisp/gnus/message.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 671c3fdc1bc..61bf3659150 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -2217,6 +2217,8 @@ see `message-narrow-to-headers-or-head'." (beginning-of-line) (while (looking-at "[ \t]") (forward-line -1)) + ;; `syntax-propertize' can't widen so make sure it won't need to (bug#81035). + (syntax-propertize (point)) (narrow-to-region (point) (progn @@ -8658,6 +8660,9 @@ From headers in the original article." (save-excursion (goto-char end-of-headers) (insert-before-markers header)))))))) + ;; `syntax-propertize' can't widen so make sure it won't need to + ;; (bug#81035). + (syntax-propertize end-of-headers) (narrow-to-region end-of-headers (point-max))))) (defun message-hide-header-p (regexps) From 0f6c38288807f79c01a659c4187bdc69fa92845f Mon Sep 17 00:00:00 2001 From: Pip Cet Date: Sun, 31 May 2026 06:24:58 +0000 Subject: [PATCH 093/125] Make 'likely' macro available in all of Emacs (bug#81115) * src/android.c (likely): Move ... * src/conf_post.h (likely): ... here. Ensure true values which aren't equal to 1 are still predicted correctly. --- src/android.c | 2 -- src/conf_post.h | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/android.c b/src/android.c index 7ff7f26b527..034e1db2dd6 100644 --- a/src/android.c +++ b/src/android.c @@ -6158,8 +6158,6 @@ android_build_jstring (const char *text) if global_foo cannot be allocated, and after the global reference is created. */ -#define likely(cond) __builtin_expect (cond, 1) - /* Check for JNI exceptions and call memory_full in that situation. */ diff --git a/src/conf_post.h b/src/conf_post.h index e0bb753df56..74742ac16dc 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -371,6 +371,11 @@ extern int emacs_setenv_TZ (char const *); # define UNINIT /* empty */ #endif +/* likely (COND) is equivalent to COND ? 1 : 0, but instructs the + compiler to provide static branch prediction hints to the CPU so that + the branch isn't mispredicted. */ +#define likely(cond) __builtin_expect (!!(cond), 1) + /* Emacs needs neither glibc strftime behavior for AM and PM indicators, nor Gnulib strftime support for non-Gregorian calendars. */ #define REQUIRE_GNUISH_STRFTIME_AM_PM false From de67c677fe9ef8215888d5d6fc9e2e93abaf163e Mon Sep 17 00:00:00 2001 From: Pip Cet Date: Sun, 31 May 2026 06:27:56 +0000 Subject: [PATCH 094/125] * src/lisp.h (EQ): Use new 'likely' macro. --- src/lisp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lisp.h b/src/lisp.h index 370c8effa48..babfe3ee4a5 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1316,7 +1316,7 @@ EQ (Lisp_Object x, Lisp_Object y) { if (BASE_EQ (x, y)) return true; - else if (!__builtin_expect (symbols_with_pos_enabled, false)) + else if (likely (symbols_with_pos_enabled == false)) return false; else return slow_eq (x, y); From 0bef3c0e87315708e6d77e2c17e2677ac44fcbea Mon Sep 17 00:00:00 2001 From: Pip Cet Date: Mon, 25 May 2026 09:10:23 +0000 Subject: [PATCH 095/125] Improve FOR_EACH_TAIL (bug#81115) * src/lisp.h (struct for_each_tail_internal): Reduce to two words. (FOR_EACH_TAIL_BASIC): Add compiler hint to indicate that tail is most likely Qnil after the loop and a non-nil non-cons is unlikely. (FOR_EACH_TAIL_STEP_CYCLEP): Rewrite. --- src/lisp.h | 49 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/src/lisp.h b/src/lisp.h index babfe3ee4a5..de94b2fa9d1 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -5833,7 +5833,8 @@ enum { SMALL_LIST_LEN_MAX = 127 }; set TAIL to the current cons. If the loop exits normally, set TAIL to the terminating non-cons, typically nil. The loop body should not modify the list’s top level structure other than by - perhaps deleting the current cons. */ + perhaps deleting the current cons. In practice, this macro rarely + quits. */ #define FOR_EACH_TAIL(tail) \ FOR_EACH_TAIL_INTERNAL (tail, circular_list (tail), true) @@ -5847,16 +5848,17 @@ enum { SMALL_LIST_LEN_MAX = 127 }; /* Iterator intended for use only within FOR_EACH_TAIL_INTERNAL. */ struct for_each_tail_internal { + /* The object we're comparing to. */ Lisp_Object tortoise; - intptr_t max, n; - unsigned short int q; + /* How many iterations of the algorithm have happened. */ + ptrdiff_t l; }; /* Like FOR_EACH_TAIL (LIST), except evaluate CYCLE if a cycle is found, and check for quit if CHECK_QUIT. This is an internal macro intended for use only by the above macros. - Use Brent’s teleporting tortoise-hare algorithm. See: + Modifies Brent’s teleporting tortoise-hare algorithm. See: Brent RP. BIT. 1980;20(2):176-184. doi:10.1007/BF01933190 https://maths-people.anu.edu.au/~brent/pd/rpb051i.pdf @@ -5871,20 +5873,35 @@ struct for_each_tail_internal FOR_EACH_TAIL_STEP_CYCLEP (tail, check_quit) \ ? (cycle) : (void) 0) -#define FOR_EACH_TAIL_BASIC(tail, stepper) \ - for (struct for_each_tail_internal li = { tail, 2, 0, 2 }; \ - CONSP (tail); stepper) +#define FOR_EACH_TAIL_BASIC(tail, stepper) \ + for (struct for_each_tail_internal li = { tail, 0 }; \ + CONSP (tail) || (likely (NILP (tail)), false); \ + stepper) -/* Step TAIL and return whether a cycle has been detected. - If CHECK_QUIT then check for quit occasionally. */ -#define FOR_EACH_TAIL_STEP_CYCLEP(tail, check_quit) \ - ((tail) = XCDR (tail), \ - ((--li.q != 0 \ - || ((check_quit) ? maybe_quit () : (void) 0, 0 < --li.n) \ - || (li.q = li.n = li.max <<= 1, li.n >>= USHRT_WIDTH, \ - li.tortoise = (tail), false)) \ - && BASE_EQ (tail, li.tortoise))) +/* How many iterations until we start advancing the tortoise, which is + necessary to detect lists which end in a cycle but whose initial + elements aren't part of the cycle. Also, number of iterations until + we check for quits. Must be a power of two. */ +#define FOR_EACH_TAIL_THRESHOLD 4096 + +static_assert (POWER_OF_2 (FOR_EACH_TAIL_THRESHOLD)); + +/* Step TAIL and return whether a cycle has been detected. If + CHECK_QUIT then check for quit occasionally. We only check for quits + once every 4096 iterations, and we don't advance the tortoise until + that happens for the first time. + + The C comma operator is used here to avoid statement expressions: the + expression evaluates to the value of BASE_EQ (tail, li.tortoise), but + has additional side effects, possibly exiting nonlocally. */ + +#define FOR_EACH_TAIL_STEP_CYCLEP(tail, check_quit) \ + ((tail) = XCDR (tail), \ + (! likely (!BASE_EQ (tail, li.tortoise)) \ + || (! likely (((++li.l) & (FOR_EACH_TAIL_THRESHOLD-1)) != 0) \ + && (((check_quit) ? maybe_quit () : (void) 0, false) \ + || (POWER_OF_2 (li.l) && (li.tortoise = (tail), false)))))) /* Do a `for' loop over alist values. */ From c1eb458d6b9f6e1c4fa9ce0ae0c91f0314ca94ac Mon Sep 17 00:00:00 2001 From: Pip Cet Date: Mon, 25 May 2026 11:28:38 +0000 Subject: [PATCH 096/125] Avoid relying on FOR_EACH_TAIL internals in 'Fnthcdr' (bug#81115) The new FOR_EACH_TAIL code detects simple cycles sooner than the old code did, leading to integer overflows. * src/fns.c (Fnthcdr): Avoid integer overflow if cycle is detected early. --- src/fns.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fns.c b/src/fns.c index d692a92580a..4284d82d6a5 100644 --- a/src/fns.c +++ b/src/fns.c @@ -1824,7 +1824,10 @@ DEFUN ("nthcdr", Fnthcdr, Snthcdr, 2, 2, 0, mpz_export (&iz, NULL, -1, sizeof iz, 0, 0, mpz[0]); num += iz; } - num += cycle_length - large_num % cycle_length; + if (num < cycle_length) + num += cycle_length; + num -= large_num % cycle_length; + eassume (num >= 0); } num %= cycle_length; From 5e3e1a5bb23b5e7813a60c2b121b1393ff6ca86f Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 5 Jun 2026 10:17:27 +0100 Subject: [PATCH 097/125] ; Tweak some package short descriptions. --- lisp/emacs-lisp/elisp-scope.el | 2 +- lisp/emacs-lisp/timeout.el | 2 +- lisp/progmodes/lua-mode.el | 2 +- lisp/ring-bell-fns.el | 2 +- lisp/tty-tip.el | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/emacs-lisp/elisp-scope.el b/lisp/emacs-lisp/elisp-scope.el index e0198b53b63..f95ea41e496 100644 --- a/lisp/emacs-lisp/elisp-scope.el +++ b/lisp/emacs-lisp/elisp-scope.el @@ -1,4 +1,4 @@ -;;; elisp-scope.el --- Semantic analysis for Elisp symbols -*- lexical-binding: t; -*- +;;; elisp-scope.el --- Semantic analysis for Emacs Lisp symbols -*- lexical-binding: t; -*- ;; Copyright (C) 2025-2026 Free Software Foundation, Inc. diff --git a/lisp/emacs-lisp/timeout.el b/lisp/emacs-lisp/timeout.el index 5accb5b7e24..f0aa0481401 100644 --- a/lisp/emacs-lisp/timeout.el +++ b/lisp/emacs-lisp/timeout.el @@ -1,4 +1,4 @@ -;;; timeout.el --- Throttle or debounce Elisp functions -*- lexical-binding: t; -*- +;;; timeout.el --- Throttle or debounce Emacs Lisp functions -*- lexical-binding: t; -*- ;; Copyright (C) 2023-2026 Free Software Foundation, Inc. diff --git a/lisp/progmodes/lua-mode.el b/lisp/progmodes/lua-mode.el index 72c1932ab64..227d5d777b1 100644 --- a/lisp/progmodes/lua-mode.el +++ b/lisp/progmodes/lua-mode.el @@ -1,4 +1,4 @@ -;;; lua-mode.el --- Major-mode for editing Lua files -*- lexical-binding: t -*- +;;; lua-mode.el --- Major mode for editing Lua files -*- lexical-binding: t -*- ;; Copyright (C) 2025-2026 Free Software Foundation, Inc. diff --git a/lisp/ring-bell-fns.el b/lisp/ring-bell-fns.el index b35725e192b..32eb0c32051 100644 --- a/lisp/ring-bell-fns.el +++ b/lisp/ring-bell-fns.el @@ -1,4 +1,4 @@ -;;; ring-bell-fns.el --- Collection of functions for ring-bell -*- lexical-binding: t; -*- +;;; ring-bell-fns.el --- Collection of functions for ring-bell-function -*- lexical-binding: t; -*- ;; Copyright (C) 2025-2026 Free Software Foundation, Inc. diff --git a/lisp/tty-tip.el b/lisp/tty-tip.el index 4db64126005..4ae2bc7312f 100644 --- a/lisp/tty-tip.el +++ b/lisp/tty-tip.el @@ -1,4 +1,4 @@ -;;; tty-tip.el --- Display help in kind of tooltips on ttys -*- lexical-binding: t -*- +;;; tty-tip.el --- Display tooltip-like child frames on ttys -*- lexical-binding: t -*- ;; Copyright (C) 2024-2026 Free Software Foundation, Inc. From b8133a416d3298065405cce4eee7ed964ce21c64 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 5 Jun 2026 10:41:22 +0100 Subject: [PATCH 098/125] ; Update exported ChangeLog files and etc/AUTHORS * ChangeLog.5: Update. * etc/AUTHORS: Regenerate. --- ChangeLog.5 | 1321 ++++++++++++++++++++++++++++++++++++++++++++++++++- etc/AUTHORS | 93 ++-- 2 files changed, 1372 insertions(+), 42 deletions(-) diff --git a/ChangeLog.5 b/ChangeLog.5 index c20a552f2c5..fbf23263ad3 100644 --- a/ChangeLog.5 +++ b/ChangeLog.5 @@ -1,3 +1,1322 @@ +2026-06-04 Stefan Monnier + + message.el: Fix part of bug#81035 + + * lisp/gnus/message.el (message-narrow-to-field) + (message-hide-headers): Syntax-propertize before narrowing. + +2026-06-04 Michael Albinus + + Fix prompt in remote shell + + * lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Do not use a + hard-coded directory in PS1. (Bug#81177) + +2026-06-04 Dirk-Jan C. Binnema + + Fmake_xwidget: Use about:blank workaround only when needed + + * src/process.c (glib_installs_sigchld_handler): New variable. + (init_process_emacs): Set it when GLib overrides Emacs's SIGCHLD + handler. + * src/process.h (glib_installs_sigchld_handler): Declare. + * src/xwidget.c (Fmake_xwidget): Skip the "about:blank" + workaround when glib_installs_sigchld_handler is false. + +2026-06-04 JD Smith + + Allow brew/macports libgccjit for default native compilation + + * configure.ac: Move flag setup for libgccjit installed by + Homebrew or macports earlier, so default native compilation can + proceed (bug#81171). + +2026-06-04 Sean Whitton + + vc-dir-refresh: Respect non-essential wrt saving buffers + + * lisp/vc/vc-dir.el (vc-dir-refresh): If non-essential is + non-nil, don't call vc-buffer-sync-fileset. + +2026-06-04 Alan Mackenzie + + CC Mode: Fontify a cast type preceding a brace initialization + + This fixes bug#81084. + * lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): + In the test for a cast near the end of the function, add a test + for a {...} block which isn't a statement block, allowing such + blocks to be recognized as operands of casts. + +2026-06-04 Michael Albinus + + Fix Tramp distrobox integration + + * lisp/net/tramp.el (tramp-yesno-prompt-regexp): Fix docstring. + (tramp-yn-prompt-regexp): Fix docstring. Extend. Add :version. + + * test/lisp/net/tramp-tests.el (tramp-test03-file-error): Adapt test. + +2026-06-04 Rahul Martim Juliato + + markdown-ts-mode: fix first-item indent (bug#81118) + + * lisp/textmodes/markdown-ts-mode.el + (markdown-ts--fontify-unordered-list-marker): Skip leading + whitespace in the node range before applying the display bullet, + since the tree-sitter grammar bundles indent into the first + list_marker_* node. + +2026-06-03 Dmitry Gutov + + [GTK3] Re-fix the stored values for width and height + + * src/gtkutil.c (xg_frame_set_char_size) + (xg_frame_set_size_and_position): Round WIDTH and HEIGHT to + multiples of SCALE without adding toolbar/menubar (bug#80662). + +2026-06-02 João Távora + + Eglot: mentions markdown-ts-view-mode less (bug#81150) + + * doc/misc/eglot.texi (Customization Variables): Don't mention + markdown-ts-view-mode. + + * etc/EGLOT-NEWS: Don't mention markdown-ts-view-mode. + +2026-06-02 Alexander Adolf + + vc--subject-to-file-name: Fix over-greedy regex (bug#81017) + + * lisp/vc/vc.el (vc--subject-to-file-name): Make the prefix + regex less greedy, ensure the result has no text properties, + improve the docstring (bug#81017). + +2026-06-02 F. Jason Park + + Fix more missing faces on ERC margin strings + + * lisp/erc/erc-goodies.el (keep-place-indicator): Add + `erc-keep-place-indicator-arrow' face to overlay arrow. + * lisp/erc/erc-stamp.el (erc-stamp--display-prompt-in-left-margin) + (erc--conceal-prompt): Add `erc-prompt-face' to entire `left-margin' + string. See also 9ba65aa9 "Fix missing margin face on display prop in + erc-stamp". + * test/lisp/erc/erc-fill-tests.el (erc-fill--left-hand-stamps): Update + expected text properties on prompt. (Bug#80693) + +2026-06-01 João Távora + + Eglot: Simplify markdown rendering support (bug#81150) + + Now that markdown-ts-view-mode is demoted to "experimental" in emacs-31, + simplify bits of eglot.el and rewrite docs to be more neutral. In + practice 'gfm-view-mode' is still used if found, just like before, but + intrepid users can still try the "experimental" modes. + + * lisp/progmodes/eglot.el (eglot-documentation-renderer): Rewrite + doc string. + (eglot--accepted-formats): Rewrite. + (eglot--builtin-mdown-p): Remove. + + * doc/misc/eglot.texi (Customization Variables): Rewrite entry. + + * etc/EGLOT-NEWS: Tweak. + +2026-06-01 Eli Zaretskii + + Prevent segfaults due to frame resizing at the wrong time + + * src/dispextern.h: + * src/xdisp.c (dont_resize_frames): New variable. + (unwind_format_mode_line): Decrement 'dont_resize_frames'. + (gui_consider_frame_title, display_mode_line, Fformat_mode_line): + Increment 'dont_resize_frames'. + * src/dispnew.c (do_pending_window_change): Don't resize frames if + 'dont_resize_frames' is non-zero. (Bug#81121) + + (cherry picked from commit 94eb6389d403eb1b71a81ecdc3b8416cf5f850d6) + +2026-06-01 Sean Whitton + + Disable markdown-ts-mode & markdown-ts-view-mode for Emacs 31 + + Do not merge to master. + + * lisp/progmodes/eglot.el (eglot-documentation-renderer) + (eglot--format-markup): Don't call eglot--builtin-mdown-p. + * lisp/textmodes/markdown-ts-mode.el (markdown-ts-mode) + (markdown-ts-view-mode): Mark as experimental. + (auto-mode-alist, treesit-major-mode-remap-alist): Don't add + anything. + * doc/misc/eglot.texi (Customization Variables): + * etc/EGLOT-NEWS: + * etc/NEWS: Don't mention markdown-ts-mode or + markdown-ts-view-mode. + +2026-05-31 Juri Linkov + + More tests for fill-paragraph-handle-comment.erts + + * test/lisp/textmodes/fill-resources/fill-paragraph-handle-comment.erts: + Add more tests for current comment lines (bug#80449). + +2026-05-31 Kyle Meyer + + Update to Org 9.8.5 + +2026-05-30 João Távora + + Eglot: replace eglot-prefer-plaintext with eglot-documentation-renderer + + The old boolean 'eglot-prefer-plaintext' is replaced by the more + expressive 'eglot-documentation-renderer', which can hold a major-mode + symbol, t (plain text), or nil (auto-detect each time). By selecting a + renderer once at startup the repeated per-request lookups are avoided, + which helps with the slowness reported in bug#81150. + + * lisp/progmodes/eglot.el (eglot-prefer-plaintext): Declare obsolete + alias to 'eglot-documentation-renderer'. + (eglot-documentation-renderer): New defcustom, reworked from from + eglot-prefer-plaintext. + (eglot--accepted-formats): Use new variable. + (eglot--format-markup): Use new variable. + + * etc/EGLOT-NEWS: Announce change. + + * doc/misc/eglot.texi (Customization Variables): Document + eglot-documentation-renderer. + +2026-05-30 Amin Bandali + + Make HTML button elements tab-stoppable in eww (bug#81107) + + * lisp/net/eww.el (eww-form-submit): Call put-text-property to + add help-echo and shr-tab-stop properties. + (eww-tag-input): Exclude inputs with type="submit" when adding + the help-echo and shr-tab-stop properties, since that's now done + in eww-form-submit, called earlier for type="submit". + +2026-05-30 Eli Zaretskii + + Don't make buffer read-only when reverting if 'view-mode' was disabled + + * lisp/view.el (view--disable): Reset 'read-only-mode--state'. + (Bug#81149) + +2026-05-29 Augusto Stoffel + + * lisp/shell.el (shell): Fix typo: use process-live-p (bug#81145). + +2026-05-28 David Ponce + + widget-image-find: Use 'image-load-path' (bug#81140) + + * lisp/wid-edit.el (widget-image-find): Use 'image-load-path' (bug#81140). + +2026-05-28 Po Lu + + Fix the MSDOS build + + * msdos/sedlibmk.inp (GL_GNULIB_MEMEQ, GL_GNULIB_STREQ) + (GL_GNULIB_STRNUL): New substitutions, replacing that of + GL_GNULIB_STRINGEQ. + + * src/term.c (init_tty) [MSDOS]: Assign appropriate value to + tty->TN_max_colors. + + Do not merge to master. + +2026-05-27 Zhengyi Fu (tiny change) + + Fix lax whitespace highlight during query-replace + + * lisp/replace.el (query-replace-read-args): Add :lax-whitespace to + minibuffer-lazy-highlight-setup, so lazy highlight during + query-replace respects replace-lax-whitespace and + replace-regexp-lax-whitespace (bug#81131). + +2026-05-27 Juri Linkov + + Fix fill-paragraph combining text with preceding comment + + * lisp/textmodes/fill.el (fill-paragraph): Handle the case + when a non-comment line follows a comment line with + non-nil 'fill-paragraph-handle-comment' (bug#80449). + Skip such a comment line before filling a non-comment line. + + * test/lisp/textmodes/fill-tests.el + (fill-test-fill-paragraph-handle-comment): Add new test. + + * test/lisp/textmodes/fill-resources/fill-paragraph-handle-comment.erts: + New file. + +2026-05-27 Paul Eggert + + emacsclient quote_argument is void + + * lib-src/emacsclient.c (quote_argument): + Don’t use ‘return E;’ in a function returning void. + Problem found by Oracle Developer Studio 12.6. + +2026-05-24 Sean Whitton + + Revert "* admin/notes/documentation: Recommend not using "it's"." + +2026-05-24 Sean Whitton + + native--compile-skip-on-battery-p: Try to fix ?b, ?B conditions + + * lisp/emacs-lisp/comp-run.el + (native--compile-skip-on-battery-p): Don't skip charging because + the battery is charging, and don't look for "discharging", at + least for now (bug#80922). Thanks to David Koppelman + for the report. + +2026-05-24 Zhengyi Fu (tiny change) + + Save and restore original local keymap in grep-edit-mode + + * lisp/progmodes/grep.el (grep-edit-original-mode-map): New + variable. + (grep-change-to-grep-edit-mode): Save the current local map + before switching to grep-edit-mode-map. + (grep-edit-save-changes): Restore the saved local map instead of + assuming grep-mode-map (bug#81090). + +2026-05-24 Eli Zaretskii + + Fix display of inline SVG images in Rmail + + * lisp/mail/rmailmm.el (rmail-mime-set-bulk-data): Support + Content-type of "svg+xml" if SVG images are supported, + +2026-05-24 Yuan Fu + + Add treesit-ready-p check back to tree-sitter major modes (bug#80909) + + * lisp/progmodes/c-ts-mode.el (c-ts-mode): + (c++-ts-mode): + * lisp/progmodes/cmake-ts-mode.el (cmake-ts-mode): + * lisp/progmodes/dockerfile-ts-mode.el (dockerfile-ts-mode): + * lisp/progmodes/elixir-ts-mode.el (elixir-ts-mode): + * lisp/progmodes/go-ts-mode.el (go-ts-mode): + (go-mod-ts-mode): + (go-work-ts-mode): + * lisp/progmodes/heex-ts-mode.el (heex-ts-mode): + * lisp/progmodes/js.el (js-ts-mode): + * lisp/progmodes/lua-ts-mode.el (lua-ts-mode): + * lisp/progmodes/python.el (python-ts-mode): + * lisp/progmodes/rust-ts-mode.el (rust-ts-mode): + * lisp/progmodes/sh-script.el (bash-ts-mode): + * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode): + (tsx-ts-mode): + * lisp/textmodes/css-mode.el (css-ts-mode): + * lisp/textmodes/mhtml-ts-mode.el (mhtml-ts-mode): + * lisp/textmodes/toml-ts-mode.el (toml-ts-mode): + * lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode): + * lisp/treesit-x.el (treesit-generic-mode-setup): Add the check. + +2026-05-24 João Távora + + Fix pathological slowness in flex completion + + The 'completion-regexp-list' optimization in + completion--flex-all-completions-1, a cheap pre-filter via a trivial + regexp, performs very poorly for longer patterns and strings, so drop + it. That alone recovers fairly decent performance for the flex + completion when compared to the 'hotfuzz' point of reference. + + We then recover the cheap rejection with an O(N+M) pre-check in the + Fcompletion__flex_cost_gotoh C scorer. This kicks in the common case + (completion-ignore-case is nil) and pays off especially when the table + is already a list and 'all-completions' needn't cons. + + See: + https://lists.gnu.org/archive/html/emacs-devel/2026-04/msg01081.html + https://lists.gnu.org/archive/html/emacs-devel/2026-05/msg00519.html + + * lisp/minibuffer.el (completion--flex-all-completions-1): Remove + regexp pre-filter. + + * src/minibuf.c (Fcompletion__flex_cost_gotoh): Add subsequence + pre-check. + +2026-05-23 Amin Bandali + + No longer raise error on HTTP 402 (Payment Required) (bug#81101) + + * lisp/url/url-http.el (url-http-parse-headers): Return t instead of + raising an error, to give the user a chance to interact with the page. + +2026-05-23 Thomas Mühlbacher (tiny change) + + Avoid compilation-mode matching rust as gnu + + * lisp/progmodes/compile.el + (compilation-error-regexp-alist-alist): Put 'rust' before 'gnu' + to avoid a mismatch since the " |" has become optional (bug#81075). + +2026-05-23 Sean Whitton + + * build-aux/git-hooks/commit-msg: Replace Markdown-style quotation. + +2026-05-23 Sean Whitton + + vc-test--rename-file: Disable part of test for SCCS + + * test/lisp/vc/vc-tests/vc-tests.el (vc-test--rename-file): + Disable part of test for SCCS. + +2026-05-23 Rahul Martim Juliato + + markdown-ts-mode: Don't enable unconditionally by default + + * lisp/textmodes/markdown-ts-mode.el (markdown-ts-mode-maybe): + New function. + (auto-mode-alist): Bind ".md", ".markdown", and ".mdx" to + 'markdown-ts-mode-maybe' instead of 'markdown-ts-mode'. + * etc/NEWS: Update the 'markdown-ts-mode' entry. + +2026-05-23 Manuel Giraud + + Prettify special glyphs + + * lisp/disp-table.el (prettify-special-glyphs-mode): New mode to + display nicer special glyphs. + (special-glyphs): New face for displaying special glyphs when + the minor mode is active. + (prettify-special-glyphs-saved-truncation) + (prettify-special-glyphs-saved-continuation): Internal variables + to save previous special glyphs. + * etc/NEWS: Announce the change. (Bug#80628) + +2026-05-23 Eli Zaretskii + + Revert "sh-script: Mark + and * as punctuation rather than a symbol constituent" + + This reverts commit b3c0aee42b086af4b3c6e26da1a5d81490b6128b. + It caused regressions in 'sh-script', see bug#80794 and + bug#80854. + +2026-05-23 Richard Lawrence + + Rename `icalendar-recur' type and related functions + + More context in Bug#80786 and: + https://lists.gnu.org/archive/html/emacs-orgmode/2026-03/msg00286.html + + `icalendar-recur' as a type name for RRULE values was confusing and made + the accessors for this type difficult to discover, because `icalendar-recur-' + is also used as a prefix in icalendar-recur.el. This change renames the + `icalendar-recur' type to `icalendar-rrule-value' and renames the + accessor functions for these values appropriately. + + * lisp/calendar/icalendar-parser.el: Rename symbols as follows: + (icalendar-recur): `icalendar-rrule-value' + (icalendar-read-recur-rule-part): `icalendar-read-rrule-part' + (icalendar-print-recur-rule-part): `icalendar-print-rrule-part' + (icalendar-recur-rule-part): `icalendar-rrule-part' + (icalendar-read-recur): `icalendar-read-rrule-value' + (icalendar-print-recur): `icalendar-print-rrule-value' + (icalendar--recur-value-types): `icalendar--rrule-value-types' + (icalendar-recur-value-p): `icalendar-rrule-value-p' + (icalendar-recur-freq): `icalendar-rrule-freq' + (icalendar-recur-interval-size): `icalendar-rrule-interval-size' + (icalendar-recur-until): `icalendar-rrule-until' + (icalendar-recur-count): `icalendar-rrule-count' + (icalendar-recur-weekstart): `icalendar-rrule-weekstart' + (icalendar-recur-by*): `icalendar-rrule-by*'. + (icalendar-rrule): + (icalendar-index-insert): + (icalendar-index-get): Update references. + * lisp/calendar/icalendar-recur.el (icalendar-recur-find-interval): + (icalendar-recur-nth-interval): + (icalendar-recur-next-interval): + (icalendar-recur-previous-interval): + (icalendar-recur-refine-from-clauses): + (icalendar-recur-recurrences-in-interval): + (icalendar-recur-recurrences-in-window): + (icalendar-recur-recurrences-to-count): + (icalendar-recur-tz-observance-on): Update references. + * lisp/calendar/diary-icalendar.el: Update references. + * lisp/calendar/icalendar-shortdoc.el (icalendar): Update shortdoc examples. + * lisp/gnus/gnus-icalendar.el: Update references. + * test/lisp/calendar/diary-icalendar-tests.el: + * test/lisp/calendar/icalendar-parser-tests.el: + * test/lisp/calendar/icalendar-recur-tests.el: Update references in tests. + +2026-05-22 Jacek Migacz + + Fix Lisp injection via X-Draft-From in Gnus + + * lisp/gnus/gnus-msg.el (gnus-inews-make-draft-meta-information): + Escape the group name with prin1-to-string to prevent arbitrary + Lisp injection through crafted group names. The unescaped group + name was embedded into a Lisp-readable string, parsed back with + read-from-string in gnus-draft-setup, and eventually eval'd via + message-do-actions, allowing code execution when a draft was sent. + +2026-05-22 Martin Rudalics + + Save/restore old_buffer slot via window configurations (Bug#81097) + + With Emacs 31 the old_buffer slot of a window gets overwritten + with the buffer unshown in that window when that window is + deleted. Fset_window_configuration triggers that when calling + delete_all_child_windows. If a window configuration gets saved + and restored in one and the same redisplay cycle, the change + time stamps of the window and its frame will be equal and + 'window-buffer-change-functions' may wrongly decide that the + window's buffer has not changed because its buffer and + old_buffer slots refer to the same buffer (Bug#81097). Fix that + by saving and restoring the old_buffer slot. + + * src/window.c (struct saved_window): Add 'old_buffer' slot. + (Fset_window_configuration): Restore old_buffer slot. + (save_window_save): Save old_buffer slot. + +2026-05-22 Michael Albinus + + Adapt ert-remote-temporary-file-directory settings + + * lisp/emacs-lisp/ert-x.el (tramp-default-remote-shell) + (tramp-encoding-shell): Declare. + (tramp-methods) : Add `tramp-tmpdir'. Adapt + `tramp-login-program' and `tramp-remote-shell'. + +2026-05-22 Eli Zaretskii + + Fix warning message in 'markdown-ts-mode--initialize' + + * lisp/textmodes/markdown-ts-mode.el + (markdown-ts-mode--initialize): Tweak the warning message when + Tree-sitter is not available. (Bug#81100) + +2026-05-22 Dmitry Gutov + + Fix "assertion 'GTK_IS_WINDOW (window)' failed" + + * src/gtkutil.c (xg_frame_set_size_and_position): Remove a + gtk_window_resize call which used a wrong value type + (GdkX11Window instead of GtkWindow). The original motivation + for that line seems to be fixed by later changes (bug#80662). + +2026-05-21 Dmitry Gutov + + [Xt] Fix child frame resizing glitch + + * src/widget.c (EmacsFrameResize): Exit early for child frames + (bug#81077). + +2026-05-21 João Távora + + Eglot: use standard face for completion annotations (bug#81088) + + * lisp/progmodes/eglot.el (eglot-completion-at-point): Use + completions-annotations face, not font-lock-function-name-face. + +2026-05-20 Juri Linkov + + Fix 'shr-outline-search' (bug#81073) + + * lisp/net/shr.el (shr-outline-search): + Don't check for the beginning of the line. + Suggested by Omar Antolín Camarena . + Confirmed by Rahguzar . + +2026-05-20 Michael Albinus + + Improve auth-source-backend-parse + + * lisp/auth-source.el (auth-source-backend-parse): Use `run-hook-wrapped'. + Suggested by Augusto Stoffel . + Transform a warning into a debug message. + +2026-05-20 João Távora + + Eglot: announce markdown support for completion docs + + No reason not to. Tested with gfm-view-mode and markdown-ts-mode + + * lisp/progmodes/eglot.el (eglot-client-capabilities): Annouce + markdown support for completion docs. + +2026-05-20 Rahul Martim Juliato + + markdown-ts-mode: hide fence lines in view-mode (bug#81081) + + * lisp/textmodes/markdown-ts-mode.el + (markdown-ts--fontify-delimiter): When `markdown-ts-hide-markup' + is enabled in `markdown-ts-view-mode', also hide the whole line + containing a `fenced_code_block_delimiter' (including its + terminating newline) so Eldoc/LSP markdown snippets render + without stray blank lines around the code block. Scoped to + view-mode and to fenced delimiters on purpose: the same handler + is shared by inline delimiters (emphasis, code span, link + brackets) where munching surrounding whitespace would collapse + word separators, and tuning rendering for + hide-markup-while-editing is not a goal. + +2026-05-20 João Távora + + markdown-ts-mode: align default face definitions with markdown-mode + + Match the out-of-the-box appearance of markdown-ts-mode to the + non-tree-sitter markdown-mode package, making switching between modes + less jarring. + + * lisp/textmodes/markdown-ts-mode.el (markdown-ts-delimiter) + (markdown-ts-heading-1, markdown-ts-heading-2, markdown-ts-heading-3) + (markdown-ts-heading-4, markdown-ts-heading-5, markdown-ts-heading-6) + (markdown-ts-block-quote, markdown-ts-code-block, markdown-ts-code-span) + (markdown-ts-indented-code-block, markdown-ts-html-tag) + (markdown-ts-html-block, markdown-ts-thematic-break) + (markdown-ts-entity-reference, markdown-ts-numeric-character-reference) + (markdown-ts-table, markdown-ts-table-header, markdown-ts-table-cell) + (markdown-ts-table-delimiter-cell, markdown-ts-language-keyword) + (markdown-ts-list-marker, markdown-ts-hard-line-break-backslash) + (markdown-ts-hard-line-break-backslash-hidden) + (markdown-ts-hard-line-break-space-hidden) + (markdown-ts-task-unchecked, markdown-ts-task-checked): Tweak. + +2026-05-20 Stéphane Marks + + Fix markdown-ts-mode atx_heading face computation (bug#81042) + + The grammar reports leading spaces as part of the atx_heading "marker" + and we cannot use the length of the marker as a result. Instead, count + the number of consecutive # after any blanks to determine its "level." + + * lisp/textmodes/markdown-ts-mode.el + (markdown-ts--fontify-atx-heading): Count the octothorpes rather + than using the length of the marker node's text. + +2026-05-20 Stéphane Marks + + Allow markdown-ts--run-command-in-code-block to ignore output (bug#81041) + + Do not assume every command run in + 'markdown-ts--run-command-in-code-block' produces output that needs to + be merged from the temp/work buffer into the source buffer. One example + is 'xref-find-definitions', the temp buffer of which is unrelated to the + source buffer. + + * lisp/textmodes/markdown-ts-mode.el + (markdown-ts-code-block-commands): Add 'complete-symbol'. + (markdown-ts-code-block-ignore-output-commands): New defvar. + (markdown-ts--run-command-in-code-block): Ignore command output + when necessary. + +2026-05-19 Lin Sun + + hideshow: Menu entry for 'hs-toggle-all' + + * lisp/progmodes/hideshow.el: Menu entry for hs-toggle-all (bug#81045). + +2026-05-18 Stefan Monnier + + doc/lispref/text.texi: Add complement to commit f4a1c006569f + + * doc/lispref/text.texi (Examining Properties): Mention the change in + cursor-sensor-functions. + +2026-05-18 João Távora + + Eglot: fix eglot--format-makrup when MARKUP just a string + + * lisp/progmodes/eglot.el (eglot--format-markup): Fix case where + markup is string. + +2026-05-18 F. Jason Park + + Fix missing margin face on display prop in erc-stamp + + * lisp/erc/erc-stamp.el (erc-insert-timestamp-right): Explicitly add + face to right-hand stamp's `display' margin string. Commit d24b10ca + "Introduce 'margin' face for window margin background" did away with the + "fall-through" behavior in which a margin spec's string that lacks its + own face property inherited whatever the associated `display' char + happened to have. (Bug#80693) + + ;; The old language in "(elisp) Display Margins" said "if the + ;; string to be displayed in the margin doesn't specify a face, its + ;; face is determined using the same rules and priorities as it is + ;; for strings displayed in the text area (see Displaying Faces)," + ;; and that "if this results in undesirable 'leaking' of faces into + ;; the margin, make sure the string has an explicit face specified + ;; for it." It seems ERC and likely more than a few other packages + ;; never came to heed this guidance and have erroneously depended + ;; on such behavior for years if not decades. + ;; + ;; * test/lisp/erc/resources/fill/snapshots/merge-01-start.eld: + ;; * test/lisp/erc/resources/fill/snapshots/merge-02-right.eld: + ;; * test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld: + ;; * test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-pre-01.eld: + ;; * test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld: + ;; * test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld: + ;; * test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld: + ;; * test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld: + ;; * test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld: Update + ;; snapshot. + +2026-05-18 Sean Whitton + + vc-refresh-state: Override default-directory for backend functions + + I ran into the issue described in the comment with the current + code in project-find-file-in and project-find-dir, when using + 'C-x p p' to switch between projects. + + * lisp/vc/vc-hooks.el (vc-refresh-state): When calling into the + backend, override any let-bindings of default-directory. + +2026-05-18 João Távora + + Eglot: unbreak for treesit-less builds + + * lisp/progmodes/eglot.el + (eglot--builtin-mdown-p): New helper. + (eglot--accepted-formats) + (eglot--format-markup): Use it. + +2026-05-18 Joshua Murphy (tiny change) + + Get selected item in newsticker list view + + * lisp/net/newst-treeview.el + (newsticker--treeview-get-selected-item): If an item is already + selected, use it. (Bug#80972) + +2026-05-17 Brian Leung + + Eglot: fix thinko in recent markdown-related commit (bug#81063) + + * lisp/progmodes/eglot.el (eglot--format-markup): Correct return value + for gfm-view-mode. + +2026-05-17 João Távora + + Jsonrpc: migrate more tests to Python subprocess fixtures + + All tests now use 'jsonrpc--with-python-fixture' with a Python3 + subprocess instead of the in-Emacs TCP server. Changed the "harakiri" + method to be a request instead of a notification for to reduce chance of + "Sentinel hasn't run" warning. + + The two in-Emacs-RPC-specific error tests ('errors-with--32601' and + 'signals-an--32603-JSONRPC-error') are dropped with the fixture itself, + as the error paths they exercise are internal to the Emacs Lisp + dispatcher and have no direct Python equivalent. They will have to be + re-done later on in other form. + + * test/lisp/jsonrpc-resources/server-emacsrpc.py: New file. + + * test/lisp/jsonrpc-resources/server-anxious-nested.py: Use new + harakiri. + + * test/lisp/jsonrpc-resources/server-emacsrpc.py: Use new harakiri. + + * test/lisp/jsonrpc-resources/server-harakiri.py: Use new harakiri. + + * test/lisp/jsonrpc-resources/server-remote-during-sync-1.py: Use new + harakiri. + + * test/lisp/jsonrpc-resources/server-remote-during-sync-2.py: Use new + harakiri. + + * test/lisp/jsonrpc-resources/server-remote-error.py: Use new harakiri. + + * test/lisp/jsonrpc-resources/common.py (harakiri): New definition. + + * test/lisp/jsonrpc-tests.el + (jsonrpc--with-python-fixture): Rework, move up. + (jsonrpc-connection-ready-p): Move up. + (jsonrpc--call-with-emacsrpc-fixture) + (jsonrpc--with-emacsrpc-fixture) + (errors-with--32601) + (signals-an--32603-JSONRPC-error): Remove. + (returns-3, times-out, doesnt-time-out, stretching-it-but-works) + (deferred-action-toolate, deferred-action-intime) + (deferred-action-complex-tests): Migrate to Python fixture. + (scontrol-remote-during-sync-1, scontrol-remote-during-sync-2) + (scontrol-anxious-nested, scontrol-remote-error) + (shutdown-clean-after-notification): Tweak. + +2026-05-17 João Távora + + Eglot: add left-fringe code action indicator (bug#80326) + + The fringe indicator uses a custom lightning-bolt bitmap, an alternative + to the margin indicator on GUI frames. It is non-interactive, however. + + * lisp/progmodes/eglot.el (eglot--fringe-action): New fringe bitmap. + + (eglot-code-action-indications): Add 'left-fringe' to default value + and to docstring. Update incompatibility note. + + (eglot-code-action-suggestion): Handle 'left-fringe' indication. + +2026-05-17 Michael Albinus + + Fix auth-source-backends-parse + + * lisp/auth-source.el (auth-source-backend-parse): Drop backends + of type `ignore'. (Bug#81024) + (auth-source-backends): Drop duplicate backends. + +2026-05-17 Eli Zaretskii + + Fix updates of embedded formulas by 'calc-embedded-update-formula' + + * lisp/calc/calc-embed.el (calc-embedded-update): Use + 'buffer-substring' to better track the string representation of + the formula when it is being edited. Suggested by + gnu@publik.slmail.me. Also, update commentary. (Bug#80901) + +2026-05-16 Andrea Alberti + + Fill margins with 'margin' face on truncated screen lines + + * src/xdisp.c (display_line): Remove the unnecessary condition that + row->used of the margin areas is zero, for when we call + 'extend_face_to_end_of_line'. (Bug#80693) + +2026-05-14 João Távora + + Eglot: adjust reference to completion frontends in manual + + * doc/misc/eglot.texi (Eglot Features): Rework. + +2026-05-14 João Távora + + Eldoc: display documentation in visual-line-mode + + Documentation is overwhelmingly prose and intended to be viewed, + not edited. Using visual-line-mode allows members of + 'eldoc-doc-functions' to provide long lines that correctly fill + to the window width. + + * lisp/emacs-lisp/eldoc.el (eldoc--format-doc-buffer): Use + visual-line-mode. + +2026-05-14 João Távora + + Eglot: prefer markdown-ts-view-mode for markup rendering (bug#80127) + + Eglot previously needed gfm-view-mode from markdown-mode.el to render + Markdown from LSP servers. It now prefers markdown-ts-view-mode when + available. + + * lisp/progmodes/eglot.el (eglot--accepted-formats): Recognize + markdown-ts-view-mode as a Markdown renderer. + (eglot--format-markup): Rework with cl-labels; prefer + markdown-ts-view-mode over gfm-view-mode. + + * doc/misc/eglot.texi (Eglot Features): Don't mention + markdown-mode directly. + + * etc/EGLOT-NEWS: Mention change + +2026-05-14 Rahul Martim Juliato + + Use 'read-multiple-choice' in 'markdown-ts-mode' (bug#81027) + + Replace the "c" character-prompt interactive spec with + 'read-multiple-choice', which presents named options instead of + requiring users to decode the prompt string and type a single + character. + + * lisp/textmodes/markdown-ts-mode.el + (markdown-ts-table-align-column): Use 'read-multiple-choice'. + Adjust ALIGN docstring punctuation. + * lisp/textmodes/markdown-ts-mode-x.el + (markdown-ts-toc-insert-template): Use 'read-multiple-choice'. + +2026-05-14 Rahul Martim Juliato + + Fix 'markdown-ts-code-span' face (bug#81026) + + * lisp/textmodes/markdown-ts-mode.el (markdown-ts-code-span): + Inherit from 'font-lock-keyword-face' rather than + 'font-lock-string-face'. + +2026-05-14 Rahul Martim Juliato + + Add read-only 'markdown-ts-view-mode' (bug#81023) + + This new derived mode is intended for consumers that render + Markdown content for display rather than editing, such as Eglot + and Eldoc when showing documentation popups and buffers. It + pre-sets the relevant customizations (markup hidden, inline + images on, hard-line-break markup hidden, native code-block + fontification, table and code-block context minor modes off), + makes the buffer read-only, and uses its own keymap derived from + 'special-mode-map' so navigation keys behave like a viewer. + + A pre-init hook lets callers normalize buffer content before the + grammar parses it; 'markdown-ts-add-final-newline' is the + default so that markup depending on a terminating newline parses + correctly. 'markdown-ts-buffer-string' returns the rendered + buffer string with overlay faces flattened into text properties, + which is useful for callers that capture the rendered output. + + Along the way: 'list_marker_parenthesis' is now recognized as an + ordered list marker; the strikethrough query is simplified to a + single rule; thematic breaks span the window via an ':extend' + underline when the face supports it. + + * lisp/textmodes/markdown-ts-mode.el (markdown-ts-view-mode): + New read-only derived mode. + (markdown-ts-view-mode-map): New keymap. + (markdown-ts-view-mode-pre-init-hook): New hook, defaulting to + 'markdown-ts-add-final-newline'. + (markdown-ts-mode--initialize): New helper, factored out of + 'markdown-ts-mode' so 'markdown-ts-view-mode' can reuse the + parser readiness and setup logic after overriding local + variables. + (markdown-ts-mode): Call 'markdown-ts-mode--initialize'. + (markdown-ts-add-final-newline): New function. + (markdown-ts-buffer-string): New function. + (markdown-ts-unordered-list-marker): New defcustom. + (markdown-ts-hard-line-break-backslash) + (markdown-ts-hard-line-break-space): Accept the symbol 'hide. + (markdown-ts--fontify-hard-line-break): Honor 'hide. + (markdown-ts--fontify-atx-heading) + (markdown-ts--fontify-setext-heading) + (markdown-ts--fontify-atx-delimiter) + (markdown-ts--fontify-unordered-list-marker) + (markdown-ts--list-item-depth): New functions supporting clean + rendering when markup is hidden. + (markdown-ts--fontify-thematic-break): Use ':extend' underline + span when the face supports it. + (markdown-ts--resolve-display-value): Accept non-cons values. + (markdown-ts--list-ordered-item-p): Also recognize + 'list_marker_parenthesis'. + (markdown-ts--range-settings): Mark markdown-inline embed as + ':local t'. + (markdown-ts--set-up): Create the markdown-inline parser only in + the inline setup branch; drop the redundant + 'markdown-ts-hide-markup' make-local-variable. + (markdown-ts--treesit-settings): Route atx and setext headings + to their dedicated fontifiers; route unordered list markers + through 'markdown-ts--fontify-unordered-list-marker'; move + 'strikethrough' to the simpler paragraph-inline query. + +2026-05-13 Rahul Martim Juliato + + Fix strikethrough in 'markdown-ts-mode' (bug#80991) + + * lisp/textmodes/markdown-ts-mode.el + (markdown-ts--treesit-settings): Add a new font-lock block for + 'paragraph-inline' that handles strikethrough nodes more + carefully. + +2026-05-13 Rahul Martim Juliato + + Fix code-span in headings in 'markdown-ts-mode' (bug#80979) + + * lisp/textmodes/markdown-ts-mode.el + (markdown-ts--treesit-settings): Move the 'code_span' and + 'code_span_delimiter' font-lock rules into a separate block with + ':override prepend' instead of 'append'. The heading feature + (level 1) applies its face via 'font-lock-append-text-property', + so a code span that later appends 'markdown-ts-code-span' ends + up with '(markdown-ts-heading-N markdown-ts-code-span)', where + the heading face takes priority and the code-span face is + suppressed. Prepending ensures 'markdown-ts-code-span' appears + first in the face list and wins visually. + +2026-05-13 Stéphane Marks + + Make 'markdown-ts-inline-images' buffer local and test for GUI (bug#80978) + + * lisp/textmodes/markdown-ts-mode.el (markdown-ts-inline-images): + Now buffer local. + (markdown-ts--fontify-image): Defensively test for graphical + display before rendering images. + +2026-05-13 Michael Albinus + + * etc/NEWS: Mention new user option tramp-propagate-emacsclient-tramp. + +2026-05-13 Michael Albinus + + Propagate EMACSCLIENT_TRAMP to remote hosts with Tramp + + * doc/misc/tramp.texi (Remote processes): + Explain `tramp-propagate-emacsclient-tramp'. + + * lisp/net/tramp.el (tramp-remote-process-environment): Adapt docstring. + (tramp-propagate-emacsclient-tramp): New defcustom. + (tramp-handle-make-process): + * lisp/net/tramp-sh.el (tramp-sh-handle-make-process) + (tramp-sh-handle-process-file): Use it. + + * test/lisp/net/tramp-tests.el (tramp-test33-environment-variables): + Adapt test. + +2026-05-13 Stefan Monnier + + keyboard-tests.el: Try and fix the failure on EMBA + + * test/src/keyboard-tests.el (keyboard-sigint-to-quit): Fix a small + race condition and avoid `sit-for` returning early. + +2026-05-13 Stefan Monnier + + doc: Remove long obsolete references to `package-initialize` + + Since Emacs-27, `package-initialize` is for internal use only, + and callers should either call `package-activate-all` instead + (cheaper and faster) or do nothing at all (because the other + functions should trigger the needed initialization automatically + as needed). + + * doc/lispref/package.texi (Packaging Basics): Delete `package-initialize`. + + * doc/misc/eglot.texi (Reporting bugs): Don't recommend using `package-initialize`. + + * doc/misc/org.org (Using Emacs packaging system): Simplify the command + line since both `(require 'package)` and `(package-initialize)` are + redundant here. + +2026-05-13 Sean Whitton + + vc-next-action: Call vc-delete-file on FILESET-ONLY-FILES + + * lisp/vc/vc.el (vc-next-action): Call vc-delete-file on + FILESET-ONLY-FILES, not FILES (bug#80998). + +2026-05-12 Elias Gabriel Perez + + hideshow: Support new 'margin' face for margin indicators. (Bug#80693) + + * lisp/progmodes/hideshow.el (hs-indicator-hide): Remove 'default' face. + (hs--make-indicators-overlays): Rework. + +2026-05-12 Juri Linkov + + Use the new 'margin' face in Flymake (bug#80693) + + * lisp/progmodes/flymake.el (flymake--bs-display): + Use the 'margin' face when it's available. + +2026-05-12 Sean Whitton + + vc-dir-resynch-file: Pass down non-truename'd FILE + + * lisp/vc/vc-dir.el (vc-dir-recompute-file-state): Delete + recently introduced TRUENAME parameter. + (vc-dir-resynch-file): Pass the file name from before calling + file-truename to vc-dir-recompute-file-state. + +2026-05-12 F. Jason Park + + Change ERC version for Emacs 31 to 5.6.2.31.1 + + * doc/misc/erc.texi: Change ERCVER to 5.6.2.31.1. + * lisp/erc/erc.el: Change "Version" package header to 5.6.2.31.1. Don't + update the `customize-package-emacs-version-alist' entry because this is + not a GNU ELPA release. + (erc-version): Change version to 5.6.2.31.1. + + Do not merge to master. + +2026-05-11 Philip Kaludercic + + Fix 'sgml-parse-tag-backward' to handle tags in comments + + * lisp/textmodes/sgml-mode.el (sgml--find-<>-backward): Ignore + SGML tags that happen to occur within comments. This also means + that the contents of comments are not indented, but also do not + affect the indentation of tags following the comments as well. + + (Bug#80841) + +2026-05-11 Aidan Coyle (tiny change) + + Fix eww-submit for forms with no action (bug#80918) + + * lisp/net/eww.el (eww-submit): If a form does not specify an action + the assumed action is the current URL. If the current URL has an + existing query part, that part must be replaced by the form values, + rather than appended to. + +2026-05-11 Elias Gabriel Perez + + * lisp/progmodes/hideshow.el (hs--set-variable): Use 'set-local' (bug#80999) + +2026-05-11 Juri Linkov + + Fix Completions buffer disappearing with tmm-menubar (bug#80995) + + * lisp/minibuffer.el (completions--start-background-update): + Cancel a possible leftover timer (e.g. from the previous + after-change hook) that would suppress the display of + *Completions* when 'completion-eager-update' is nil. + (completions--after-change): Don't start background update + when not required to automatically update *Completions*. + +2026-05-11 Michael Albinus + + Fix secrets.el when Emacs is a flatpak + + * doc/misc/dbus.texi (Flatpak integration): New chapter. + + * lisp/net/secrets.el (top): Protect against wrong signals in the + flatpak case. (Bug#80977) + +2026-05-11 Philip Kaludercic + + Fix 'prepare-user-lisp' to follow symlinks + + * lisp/startup.el (prepare-user-lisp): Call + 'directory-files-recursively' with a non-nil value for + FOLLOW-SYMLINKS. This was the intended way for the function to + operate, during the planning phase, so that users could + structure their User Lisp directory by linking in Lisp + directories from other parts of their file system. + +2026-05-11 Philip Kaludercic + + Update "timeout" to 2.1.6 + + See https://lists.gnu.org/archive/html/emacs-devel/2026-05/msg00033.html. + +2026-05-11 Dmitry Gutov + + [GTK3, HiDPI] Fix width/height round-trip through ConfigureNotify + + * src/gtkutil.c (xg_frame_set_char_size) + (xg_frame_set_size_and_position): Truncate WIDTH and HEIGHT to + be multiples of the scale factor (bug#80662). + +2026-05-11 Dmitry Gutov + + [GTK3] On Expose, repaint the border before the content + + * src/xterm.c (handle_one_xevent): Move the + x_clear_under_internal_border call before expose_frame, for less + chance of implicit flush to screen in between (bug#80662). + +2026-05-10 Pip Cet + + Test read-passwd behavior (bug#80838) + + * test/lisp/auth-source-tests.el (auth-source-test--displayed-string): + (auth-source-test-read-passwd): + (auth-source-test-read-passwd-revealed): + (auth-source-test-read-passwd-nested): New. + +2026-05-10 Pip Cet + + Fix nested read-passwd calls (bug#80838) + + Calls to 'read-passwd' may be nested. The old code didn't handle + that, because some of the state was global and we'd end up revealing + passwords. The new code still has global state, but it has been + changed so that we hide rather than reveal passwords when we enter or + leave a nested read-passwd prompt. + + * lisp/auth-source.el (read-passwd--hide-password): Removed. + (read-passwd--password-hidden): New. + (read-passwd-toggle-visibility): Add optional FORCE argument. + (read-passwd--mini-buffers): New variable. + (read-passwd-mode): Don't modify mode line when nested. Hide password + when returning to nested minibuffer or entering a new one. + +2026-05-09 Pip Cet + + Fix terminal emulation of "ESC [ K" sequence + + * lisp/term.el (term-erase-in-line): Don't immediately delete the + newly inserted characters. + +2026-05-09 Eli Zaretskii + + Fix vertical-motion across overlay strings with embedded newlines + + * src/indent.c (Fvertical_motion): Handle the case of an overlay + string on invisible text at point. (Bug#80989) + +2026-05-09 Morgan Smith + + Mark gnus-dbus.el as obsolete + + This functionality has been replaced by the new sleep library + which supports more then just DBUS systems. + + * lisp/obsolete/gnus-dbus.el: Add Obsolete-since header. Add + commentary. + (gnus-dbus-close-on-sleep, gnus-dbus-sleep-registration-object) + (gnus-dbus-register-sleep-signal gnus-dbus-sleep-handler) + (gnus-dbus-unregister-sleep-signal): Mark as obsolete. + +2026-05-09 Morgan Smith + + Move gnus-dbus.el to obsolete/gnus-dbus.el + + * lisp/gnus/gnus-dbus.el: Move from here... + * lisp/obsolete/gnus-dbus.el: ...to here. + +2026-05-09 Morgan Smith + + Gnus: Use new sleep library + + * etc/NEWS: Announce. + * lisp/gnus/gnus-start.el: Don't require gnus-dbus. + (gnus-sleep-handler): New function. + (gnus-close-on-sleep): New variable. + (gnus-1): Add `gnus-sleep-handler' to + `system-sleep-event-functions' when `gnus-close-on-sleep' is + non-nil. + * doc/misc/gnus.texi: Update documentation. + +2026-05-09 Eli Zaretskii + + Fix Rmail behavior wrt globalized minor modes + + Previously, "M-x rmail" would not call 'run-mode-hooks', which + didn't let globalized minor modes a chance to turn on themselves + in Rmail buffers. This modifies the way Rmail runs the various + hooks so as to abide by behavior required by Emacs 30 and later. + * lisp/mail/rmail.el (rmail-mode-2): Call 'run-mode-hooks'. + (rmail-mode): Call 'run-hooks', not 'run-mode-hooks'. Suggested + by Mark Lillibridge . (Bug#80879) + +2026-05-09 Eli Zaretskii + + Fix display images in the display margins + + * src/xdisp.c (handle_single_display_spec): Set the iterator face + to use 'margin' when displaying in the margins. (Bug#80693) + +2026-05-09 João Távora + + Eglot: fix eglot--sig-info with non-UTF-32 positionEncoding + + Github-reference: https://github.com/joaotavora/eglot/discussions/1588 + + When the server negotiates positionEncoding utf-8 or utf-16, + ParameterInformation.label vector offsets are byte/code-unit counts + into the signature label, not character counts. Using them raw caused + wrong highlights and crashes on Unicode-rich signatures. + + * lisp/progmodes/eglot.el (eglot--sig-info): Mostly rewrite. + (eglot-move-to-utf-8-linepos-function): Tweak docstring. + (eglot-move-to-utf-8-linepos, eglot-move-to-utf-16-linepos): Return + position moved to. + +2026-05-08 Alan Third + + [NS] Fix deprecated variable (bug#80985) + + * src/nsterm.h (NSLevelIndicatorStyleContinuousCapacity): Define in + macOS < 10.15. + +2026-05-08 Dmitry Gutov + + vc-switch-working-tree: Use project-current again + + * lisp/vc/vc.el (vc-switch-working-tree): Use project-current + instead of manually constructing VC project objects. + +2026-05-08 Stéphane Marks + + treesit-explore-mode usability improvements (bug#80935) + + Improve the usability of treesit-explore-mode. + + - Prompt for the primary parser first, if there is one, rather + than the first in the list reported by 'treesit-parser-list'. + Previously, in a multi-parser buffer like 'markdown-ts-mode', one + had to hunt for the primary parser. + + - Kill the tree buffer and its window if the source buffer is + killed or 'treesit-explore-mode'. Previously, when + 'treesit-explore-mode' is disabled in the source buffer, its + companion explorer tree buffer was left dangling and window + open (with an unrelated buffer). + + - Improve 'treesit--explorer-refresh-1' to recenter the window + around the selected nodes when the selected region in the source + buffer changes. Previously, one had to navigate manually to find + the corresponding highlighted node in the tree window which may + be far away from that the source buffer's region represents. + + - Disable 'treesit-explore-mode' in the source buffer if its + companion tree buffer is killed. Previously, + 'treesit-explore-mode' remained active in the source buffer in + an effectively unusable state. + + - Disable 'treesit-explore-mode' if the user quits + 'completing-read' in 'treesit-explorer-switch-parser' when + enabling the mode. Previously, 'treesit-explore-mode' was left + enabled after quit. + + - New command to switch back and forth between the source buffer + and tree buffer windows to make navigating more convenient. + Previously, in a multi-window frame, one had to navigate to/from + these two related windows in a more cumbersome way. + + - New command to quit 'treesit-explore-mode' and + 'treesit--explorer-tree-mode' and handle buffer and window + cleanup. + + * lisp/treesit.el (treesit--explorer-refresh-1): Recenter the + window, if amenable, to the node selected in the source buffer. + (treesit--explorer-kill-explorer-buffer): Remove function. + (treesit--explorer-generate-parser-alist): Prioritize the + primary parser, if there is one. + (treesit--explorer-tree-mode-cleanup): New defun. + (treesit-explore-quit): New command. + (treesit-explorer-tree-window): New defun. + (treesit-explorer-source-buffer-window): New defun. + (treesit-explore-mode-map): Revise key bindings. + (treesit--explorer-tree-mode-map): Revise key bindings. + (treesit--explorer-tree-mode): New keymap. + (treesit-explorer-switch-parser): Add a default to + completing-read. + (treesit-explore-mode): Guard completing read quit. Wire up the + new cleanup functions. + +2026-05-07 João Távora + + Fix 'vc-dir-resynch-file' again (bug#80967) + + This unbreak project-vc-dir for dirs under non-truename + hierarchies. + + The following commit presumably makes 'M-x vc-dir' usable again + for versioned directories inside non-truename hierarchies, + + commit e05fab5775c96f8f88eab8d75dea40253bfb78eb + Author: Stephen Berman + Date: Sat May 2 15:11:37 2026 +0200 + + Fix 'vc-dir-resynch-file' (bug#80803) + + * lisp/vc/vc-dir.el (vc-dir-resynch-file): Apply 'file-truename' + instead of 'expand-file-name' to FNAME argument to prevent + spurious display of symlinked files in *vc-dir* buffer. + + However the similar command 'M-x project-vc-dir' was broken and made + unusable in similar circumstances. + + This relatively simple fix addresses both situations touching only the + problematic 'vc-resynch-file' and one of its callees, + 'vc-dir-recompute-file-state', which now discerns clearly between the + short/familiar name to present in the list and the "fname" to use to + call into the backend to gather the VC state. Since this function is + also called from another context, where the requirements are less clear, + keeping current smenatics in that situation seemed prudent, so the new + behaviour is activate with a new optional parameter. + + * lisp/vc/vc-dir.el (vc-dir-resynch-file): Call + vc-dir-recompute-file-state with truename=t. + (vc-dir-recompute-file-state): Accept optional truename param. + 2026-05-07 Sean Whitton Cut the emacs-31 release branch @@ -64440,7 +65759,7 @@ This file records repository revisions from commit 1cda0967b4d3c815fc610794ad6a8fc2b913a3c5 (exclusive) to -commit 311f1fe2ba2a4d069715c992ba839645b55a9427 (inclusive). +commit 5e3e1a5bb23b5e7813a60c2b121b1393ff6ca86f (inclusive). See ChangeLog.4 for earlier changes. ;; Local Variables: diff --git a/etc/AUTHORS b/etc/AUTHORS index ab4abbfc62b..150f5ee6527 100644 --- a/etc/AUTHORS +++ b/etc/AUTHORS @@ -87,6 +87,8 @@ Agustín Martín: changed ispell.el flyspell.el fixit.texi Ahmed Khanzada: changed gtkutil.c battery.el frame.c frame.el gtkutil.h nsterm.m w32fns.c w32term.c w32term.h xsettings.c xsettings.h +Aidan Coyle: changed eww.el + Aidan Gauland: wrote em-tramp.el and changed eshell.texi em-term.el em-unix.el erc-match.el em-cmpl.el em-dirs.el em-ls.el em-script.el esh-proc.el eshell-tests.el @@ -157,7 +159,7 @@ Aleksey Kladov: changed eglot.el Alexander Adolf: wrote eudc-capf.el eudcb-ecomplete.el eudcb-macos-contacts.el eudcb-mailabbrev.el and changed eudc.texi message.el eudc-vars.el ecompleterc eudc-tests.el - eudc.el mailrc + eudc.el mailrc vc.el Alexander Becher: changed vc-annotate.el @@ -288,7 +290,7 @@ Amin Bandali: changed erc.el erc.texi erc-backend.el erc-button.el erc-compat.el erc-track.el erc-dcc.el erc-desktop-notifications.el erc-match.el erc-services.el erc-speedbar.el erc-status-sidebar.el erc-autoaway.el erc-fill.el erc-goodies.el erc-ibuffer.el erc-imenu.el - erc-join.el erc-lang.el erc-list.el erc-log.el and 13 other files + erc-join.el erc-lang.el erc-list.el erc-log.el and 15 other files Amos Bird: changed xfns.c @@ -309,7 +311,7 @@ and changed nsterm.m nsfns.m nsmenu.m nsterm.h font-lock.el nsimage.m Anders Waldenborg: changed emacsclient.c -Andrea Alberti: changed dispextern.h faces.el xdisp.c xfaces.c +Andrea Alberti: changed xdisp.c dispextern.h faces.el xfaces.c Andrea Corallo: wrote [native compilation of Emacs Lisp] comp-common.el comp-cstr-tests.el comp-cstr.el comp-run.el comp-tests.el comp.c @@ -583,7 +585,7 @@ and changed progmodes/python.el eglot.el isearch.el comint.el eldoc.el progmodes/compile.el project.el README.md bookmark.el dired.el dockerfile-ts-mode.el files.el font-lock.el glasses.el gnutls.el man.el message.el message.texi misc.texi modes.texi outline.el - and 16 other files + and 17 other files Aurélien Aptel: changed alloc.c emacs-module.h lisp.h Makefile configure.ac cus-face.el data.c dispextern.h display.texi dynlib.c @@ -1542,7 +1544,7 @@ David Ponce: wrote bovine/grammar.el cedet.el comp.el java-tags.el semantic/java.el semantic/wisent.el senator.el tree-widget.el wisent/grammar.el wisent/wisent.el and co-wrote util-modes.el -and changed subr-x.el wid-edit.el image.el w32menu.c w32term.c +and changed wid-edit.el subr-x.el image.el w32menu.c w32term.c cl-extra.el cl-types.el close.png close.xpm cus-edit.el empty.png empty.xpm end-guide.png end-guide.xpm files.el guide.png guide.xpm handle.png handle.xpm keyboard.c leaf.png and 36 other files @@ -1670,7 +1672,8 @@ Dionisio E Alonso: changed eglot.el Dirk Herrmann: co-wrote bibtex.el -Dirk-Jan C. Binnema: changed configure.ac org-agenda.el xwidget.c +Dirk-Jan C. Binnema: changed xwidget.c configure.ac org-agenda.el + process.c process.h Dirk Ullrich: changed ispell.el @@ -1809,9 +1812,9 @@ Eli Zaretskii: wrote [bidirectional display in xdisp.c] chartab-tests.el coding-tests.el etags-tests.el rxvt.el tty-colors.el and co-wrote help-tests.el and changed xdisp.c display.texi w32.c msdos.c simple.el w32fns.c - files.el fileio.c keyboard.c configure.ac emacs.c text.texi w32term.c - dispnew.c frames.texi files.texi w32proc.c xfaces.c process.c window.c - dispextern.h and 1451 other files + files.el fileio.c keyboard.c configure.ac emacs.c text.texi dispnew.c + w32term.c frames.texi files.texi w32proc.c xfaces.c process.c window.c + dispextern.h and 1453 other files Eliza Velasquez: changed server.el simple.el @@ -2093,8 +2096,8 @@ Filipp Gunbin: changed ldap.el compilation.txt progmodes/compile.el Filippo Argiolas: changed eglot.el eglot.texi c-ts-common.el -F. Jason Park: changed erc.el erc-tests.el erc-backend.el erc-common.el - erc-stamp.el erc-fill.el erc.texi erc-goodies.el erc-button.el +F. Jason Park: changed erc.el erc-tests.el erc-backend.el erc-stamp.el + erc-common.el erc-fill.el erc.texi erc-goodies.el erc-button.el erc-fill-tests.el erc-networks.el foonet.eld erc-compat.el erc-match.el erc-speedbar.el erc-dcc.el erc-scenarios-common.el erc-sasl.el erc-networks-tests.el erc-track.el erc-goodies-tests.el @@ -2648,6 +2651,8 @@ Iwamuro Motonori: changed gnus-kill.el Jaap-Henk Hoepman: changed mm-decode.el +Jacek Migacz: changed gnus-msg.el + Jacek Świerk: changed compilation.txt compile-tests.el progmodes/compile.el @@ -2849,9 +2854,9 @@ Jay Sachs: changed gnus-score.el gnus-win.el J.D. Smith: co-wrote idlw-help.el idlw-shell.el idlwave.el and changed idlw-rinfo.el comint.el idlwave.texi loaddefs-gen.el vc.el - bibtex.el byte-run.el cl-generic.el easy-mmode.el eglot.el files.texi - functions.texi hideshow.el inline.el loading.texi misc.texi mouse.el - os.texi pcase.el repeat.el shr.el and 9 other files + bibtex.el byte-run.el cl-generic.el configure.ac easy-mmode.el eglot.el + files.texi functions.texi hideshow.el inline.el loading.texi misc.texi + mouse.el os.texi pcase.el repeat.el and 10 other files Jean Abou Samra: changed scheme.el @@ -3054,11 +3059,11 @@ João P. L. De Carvalho: changed sh-script.el João Távora: wrote eglot-tests.el eglot.el elec-pair.el electric-tests.el flymake-cc.el jsonrpc-tests.el jsonrpc.el message-tests.el shorthands.el -and changed flymake.el icomplete.el EGLOT-NEWS README.md eldoc.el +and changed flymake.el EGLOT-NEWS icomplete.el README.md eldoc.el eglot.texi minibuffer.el flymake-proc.el flymake.texi elisp-mode.el flymake-tests.el flymake-elisp.el electric.el elisp-mode-tests.el lread.c text.texi Makefile flymake-ui.el progmodes/python.el project.el - xref.el and 74 other files + xref.el and 77 other files Jochen Hein: changed gnus-art.el @@ -3314,6 +3319,8 @@ Josh Huber: changed mml-sec.el mml.el message.el gnus-msg.el mml2015.el Joshua Datko: changed fortune.el +Joshua Murphy: changed newst-treeview.el + Joshua Varner: changed intro.texi Jostein Kjønigsen: changed csharp-mode.el typescript-ts-mode.el eglot.el @@ -3391,7 +3398,7 @@ Juri Linkov: wrote compose.el emoji.el files-x.el misearch.el and changed isearch.el simple.el replace.el info.el dired.el treesit.el minibuffer.el dired-aux.el window.el outline.el progmodes/grep.el subr.el diff-mode.el repeat.el vc.el mouse.el files.el image-mode.el - menu-bar.el project.el display.texi and 526 other files + menu-bar.el project.el display.texi and 528 other files Jussi Lahdenniemi: changed w32fns.c ms-w32.h msdos.texi w32.c w32.h w32console.c w32heap.c w32inevt.c w32term.h @@ -3877,9 +3884,9 @@ Lin Jian: changed Makefile.in subr.el Lin Sun: changed python-tests.el cedet/semantic.el ediff-util.el package.el progmodes/python.el autorevert-tests.el autorevert.el - bovine/make.el calc.el esh-mode.el eww.el find-func.el html.el - java-tags.el javascript.el lread.c ls-lisp-tests.el ls-lisp.el - master.el package-test-server.py package-tests.el and 5 other files + bovine/make.el calc.el esh-mode.el eww.el find-func.el hideshow.el + html.el java-tags.el javascript.el lread.c ls-lisp-tests.el ls-lisp.el + master.el package-test-server.py and 6 other files Lin Zhou: changed w32fns.c w32term.h @@ -3972,7 +3979,7 @@ Manuel Giraud: changed image-dired.el xdisp.c tmm.el calendar.el doc-view.el image.c vc.el ox-html.el bookmark.el diary-lib.el find-dired.el gnus.el image-dired-util.el keyboard.c longlines.el midnight.el ox-publish.el simple.el smtpmail.el buff-menu.el - cal-hebrew.el and 68 other files + cal-hebrew.el and 69 other files Manuel Gómez: changed speedbar.el @@ -4583,9 +4590,10 @@ Mohsin Kaleem: changed cus-face.el dispextern.h eglot.el term.c Mon Key: changed animate.el imap.el syntax.el -Morgan Smith: changed doc-view.el image-dired.el window.el battery.el - dbus.texi esh-var-tests.el esh-var.el eshell.texi gnus-group-tests.el - minibuffer-tests.el minibuffer.el url-vars.el vc-git.el +Morgan Smith: changed doc-view.el gnus-dbus.el image-dired.el window.el + battery.el dbus.texi esh-var-tests.el esh-var.el eshell.texi + gnus-group-tests.el gnus-start.el gnus.texi minibuffer-tests.el + minibuffer.el url-vars.el vc-git.el Morgan Willcock: changed tempo.el electric.el ert-font-lock.el imenu.el modes.texi progmodes/python.el smie.el speedbar-tests.el speedbar.el @@ -5140,7 +5148,7 @@ Philip Kaludercic: wrote epa-ks.el newcomers-presets-theme.el and co-wrote compat.el and changed package.el rcirc.el package.texi rcirc.texi vc.el sgml-mode.el vc-git.el project.el which-key.el package-autosuggest.eld - package-activate.el message.el startup.el subr.el custom.texi eglot.el + package-activate.el startup.el message.el subr.el custom.texi eglot.el simple.el bytecomp.el cus-edit.el custom.el help.el and 94 other files Philippe Altherr: changed sh-script.el sh-script-tests.el shell.sh @@ -5232,7 +5240,7 @@ Pip Cet: wrote image-circular-tests.el and changed pdumper.c comp.c lisp.h xdisp.c alloc.c xterm.c fns.c configure.ac emacs.c eval.c image.c comp.el frame.c print.c src/Makefile.in byte-opt.el conf_post.h data.c doc.c ftcrfont.c - gtkutil.c and 116 other files + gtkutil.c and 119 other files Platon Pronko: changed tramp.el @@ -5299,8 +5307,8 @@ Raffael Mancini: changed misc.el Raffael Stocker: changed w32.c w32console.c w32fns.c w32term.h w32xfns.c -Rahul Martim Juliato: changed markdown-ts-mode.el icomplete.el - markdown-ts-mode-x.el newst-backend.el +Rahul Martim Juliato: changed markdown-ts-mode.el markdown-ts-mode-x.el + icomplete.el newst-backend.el Raimon Grau: changed thingatpt.el calc-fin.el eww.el replace.el thingatpt-tests.el @@ -5430,11 +5438,11 @@ Richard Lawrence: wrote calendar-tests.el diary-icalendar.el icalendar-ast.el icalendar-macs.el icalendar-mode.el icalendar-parser.el icalendar-recur.el icalendar-shortdoc.el icalendar-utils.el -and changed calendar.el icalendar.el calendar.texi - diary-icalendar-tests.el icalendar-recur-tests.el diary-lib.el - icalendar-tests.el .gitattributes cal-dst.el cal-move.el cond-star.el - diary-icalendar-resources emacs.texi gnus-icalendar-tests.el - gnus-icalendar.el icalendar-ast-tests.el icalendar-parser-tests.el +and changed calendar.el diary-icalendar-tests.el icalendar-recur-tests.el + icalendar.el calendar.texi diary-lib.el gnus-icalendar.el + icalendar-parser-tests.el icalendar-tests.el .gitattributes cal-dst.el + cal-move.el cond-star.el diary-icalendar-resources emacs.texi + gnus-icalendar-tests.el icalendar-ast-tests.el import-legacy-function.ics import-legacy-vars.ics import-non-recurring-all-day.ics import-rrule-anniversary.ics and 8 other files @@ -5761,7 +5769,7 @@ and co-wrote vc-tests.el and changed vc.el vc-git.el vc-dispatcher.el vc-hg.el vc-dir.el diff-mode.el vc-hooks.el vc1-xtra.texi log-view.el maintaining.texi subr.el project.el log-edit.el files.texi server.el simple.el window.el - cond-star.el dired-aux.el keyboard.c vc/vc-bzr.el and 329 other files + cond-star.el dired-aux.el keyboard.c vc/vc-bzr.el and 333 other files Sebastian Fieber: changed gnus-art.el mm-decode.el mm-view.el @@ -6007,7 +6015,7 @@ and co-wrote font-lock.el gitmerge.el pcvs.el visual-wrap.el and changed subr.el simple.el cl-macs.el bytecomp.el files.el keyboard.c lisp.h vc.el eval.c xdisp.c alloc.c help-fns.el buffer.c sh-script.el package.el tex-mode.el progmodes/compile.el lread.c keymap.c window.c - easy-mmode.el and 1744 other files + easy-mmode.el and 1745 other files Stefano Facchini: changed gtkutil.c @@ -6035,9 +6043,9 @@ Stéphane Boucher: changed replace.el Stephane Marks: wrote savehist-tests.el system-sleep.el system-taskbar.el and changed frame.el frames.texi nsfns.m tab-bar.el bookmark.el frame.c - nsterm.m project.el recentf.el savehist.el subr.el vtable.el w32fns.c - display.texi ibuf-macs.el os.texi saveplace.el shell.el vtable-tests.el - androidfns.c ansi-osc.el and 32 other files + nsterm.m markdown-ts-mode.el project.el recentf.el savehist.el subr.el + vtable.el w32fns.c display.texi ibuf-macs.el os.texi saveplace.el + shell.el treesit.el vtable-tests.el and 32 other files Stephane Zermatten: changed term-tests.el term.el ansi-osc.el @@ -6330,6 +6338,8 @@ Thomas Link: wrote filesets.el Thomas Morgan: changed org-habit.el forms.el select.el +Thomas Mühlbacher: changed progmodes/compile.el + Thomas Neumann: co-wrote make-mode.el and changed makefile.el @@ -6929,8 +6939,8 @@ Your Name: changed configure.ac Yuan Fu: changed treesit.el treesit.c c-ts-mode.el parsing.texi treesit-tests.el progmodes/python.el modes.texi js.el c-ts-common.el typescript-ts-mode.el indent.erts treesit.h java-ts-mode.el - rust-ts-mode.el css-mode.el go-ts-mode.el sh-script.el configure.ac - csharp-mode.el treesit-admin.el cmake-ts-mode.el and 88 other files + rust-ts-mode.el css-mode.el go-ts-mode.el sh-script.el cmake-ts-mode.el + configure.ac csharp-mode.el treesit-admin.el and 89 other files Yuanle Song: changed rng-xsd.el @@ -6997,7 +7007,8 @@ Zhang Weize: wrote ob-plantuml.el Zhehao Lin: changed xfaces.c -Zhengyi Fu: changed bookmark.el executable.el +Zhengyi Fu: changed bookmark.el executable.el progmodes/grep.el + replace.el Zhiwei Chen: changed hideif.el From 4f4af26dd2ff7b2e5c7d35c6f8ffdabc5024d5b6 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 5 Jun 2026 10:42:43 +0100 Subject: [PATCH 099/125] Bump Emacs version to 31.0.90 * README: * configure.ac: * exec/configure.ac: * java/AndroidManifest.xml.in (Version-code): * msdos/sed2v2.inp: * nt/README.W32: Bump Emacs version to 31.0.90. --- README | 2 +- configure.ac | 2 +- exec/configure.ac | 2 +- java/AndroidManifest.xml.in | 2 +- msdos/sed2v2.inp | 2 +- nt/README.W32 | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README b/README index 4bd79384117..7708ed28ec7 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ Copyright (C) 2001-2026 Free Software Foundation, Inc. See the end of the file for license conditions. -This directory tree holds version 31.0.60 of GNU Emacs, the extensible, +This directory tree holds version 31.0.90 of GNU Emacs, the extensible, customizable, self-documenting real-time display editor. The file INSTALL in this directory says how to build and install GNU diff --git a/configure.ac b/configure.ac index 7c592e6b89f..d2967210bc3 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ dnl along with GNU Emacs. If not, see . AC_PREREQ([2.65]) dnl Note this is parsed by (at least) make-dist and lisp/cedet/ede/emacs.el. -AC_INIT([GNU Emacs], [31.0.60], [bug-gnu-emacs@gnu.org], [], +AC_INIT([GNU Emacs], [31.0.90], [bug-gnu-emacs@gnu.org], [], [https://www.gnu.org/software/emacs/]) if test "$XCONFIGURE" = "android"; then diff --git a/exec/configure.ac b/exec/configure.ac index d3907b61bc8..6716f2ecb9d 100644 --- a/exec/configure.ac +++ b/exec/configure.ac @@ -22,7 +22,7 @@ dnl You should have received a copy of the GNU General Public License dnl along with GNU Emacs. If not, see . AC_PREREQ([2.65]) -AC_INIT([libexec], [31.0.60], [bug-gnu-emacs@gnu.org], [], +AC_INIT([libexec], [31.0.90], [bug-gnu-emacs@gnu.org], [], [https://www.gnu.org/software/emacs/]) AH_TOP([/* Copyright (C) 2026 Free Software Foundation, Inc. diff --git a/java/AndroidManifest.xml.in b/java/AndroidManifest.xml.in index 138a0fb8b1e..c7775abee0f 100644 --- a/java/AndroidManifest.xml.in +++ b/java/AndroidManifest.xml.in @@ -350,6 +350,6 @@ repositories require an incrementing numeric version code to detect upgrades, which is provided here and is altered by admin/admin.el. Refer to e.g. https://forum.f-droid.org/t/emacs-packaging/30424/25. -Version-code: 310060000 +Version-code: 310090000 --> diff --git a/msdos/sed2v2.inp b/msdos/sed2v2.inp index 47ffc77835f..cce277cc06a 100644 --- a/msdos/sed2v2.inp +++ b/msdos/sed2v2.inp @@ -66,7 +66,7 @@ /^#undef PACKAGE_NAME/s/^.*$/#define PACKAGE_NAME ""/ /^#undef PACKAGE_STRING/s/^.*$/#define PACKAGE_STRING ""/ /^#undef PACKAGE_TARNAME/s/^.*$/#define PACKAGE_TARNAME ""/ -/^#undef PACKAGE_VERSION/s/^.*$/#define PACKAGE_VERSION "31.0.60"/ +/^#undef PACKAGE_VERSION/s/^.*$/#define PACKAGE_VERSION "31.0.90"/ /^#undef SYSTEM_TYPE/s/^.*$/#define SYSTEM_TYPE "ms-dos"/ /^#undef HAVE_DECL_GETENV/s/^.*$/#define HAVE_DECL_GETENV 1/ /^#undef SYS_SIGLIST_DECLARED/s/^.*$/#define SYS_SIGLIST_DECLARED 1/ diff --git a/nt/README.W32 b/nt/README.W32 index 5ac4e1dba7f..76ef4036008 100644 --- a/nt/README.W32 +++ b/nt/README.W32 @@ -1,7 +1,7 @@ Copyright (C) 2001-2026 Free Software Foundation, Inc. See the end of the file for license conditions. - Emacs version 31.0.60 for MS-Windows + Emacs version 31.0.90 for MS-Windows This README file describes how to set up and run a precompiled distribution of the latest version of GNU Emacs for MS-Windows. You From 0ee48ac4df205e0d915946b5db00e73a0cd21ae0 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 5 Jun 2026 10:57:06 +0100 Subject: [PATCH 100/125] ; Update ldefs-boot.el. --- lisp/ldefs-boot.el | 155 +++++++++++++++++++++++++++++++++------------ 1 file changed, 113 insertions(+), 42 deletions(-) diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index b8664c9693d..f35ff6e28ec 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -2561,8 +2561,9 @@ used instead of `browse-url-new-window-flag'. (make-obsolete 'browse-url-mozilla 'nil "29.1") (autoload 'browse-url-firefox "browse-url" "Ask the Firefox WWW browser to load URL. -Defaults to the URL around or before point. Passes the strings -in the variable `browse-url-firefox-arguments' to Firefox. +Defaults to the URL around or before point. Invokes the program +specified by `browse-url-firefox-program'. Passes the strings +in the variable `browse-url-firefox-arguments' to that program. Interactively, if the variable `browse-url-new-window-flag' is non-nil, loads the document in a new Firefox window. A non-nil prefix argument @@ -2578,9 +2579,9 @@ instead of `browse-url-new-window-flag'. (fn URL &optional NEW-WINDOW)" t) (autoload 'browse-url-chromium "browse-url" "Ask the Chromium WWW browser to load URL. -Default to the URL around or before point. The strings in -variable `browse-url-chromium-arguments' are also passed to -Chromium. +Default to the URL around or before point. Invokes the program +specified by `browse-url-chromium-program'. Passes the strings in +variable `browse-url-chromium-arguments' to that program. The optional argument NEW-WINDOW is not used. (fn URL &optional NEW-WINDOW)" t) @@ -8407,6 +8408,38 @@ Linux console, for which Emacs has a reliable way of determining which characters can be displayed and which cannot. (fn &optional REPL FROM TO)" t) +(defvar prettify-special-glyphs-mode nil +"Non-nil if Prettify-Special-Glyphs mode is enabled. +See the `prettify-special-glyphs-mode' command +for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `prettify-special-glyphs-mode'.") +(custom-autoload 'prettify-special-glyphs-mode "disp-table" nil) +(autoload 'prettify-special-glyphs-mode "disp-table" +"Mode to display pretty special character glyphs. + +If you have already customized your special character glyphs, only the +`special-glyphs' face is applied to them. This mode only applies to the +`standard-display-table'. Window or buffer display table, if defined, +still take precedence. + +This is a global minor mode. If called interactively, toggle the +`Prettify-Special-Glyphs mode' mode. If the prefix argument is +positive, enable the mode, and if it is zero or negative, disable the +mode. + +If called from Lisp, toggle the mode if ARG is `toggle'. Enable the +mode if ARG is nil, omitted, or is a positive number. Disable the mode +if ARG is a negative number. + +To check whether the minor mode is enabled in the current buffer, +evaluate `(default-value \\='prettify-special-glyphs-mode)'. + +The mode's hook is called both when the mode is enabled and when it is +disabled. + +(fn &optional ARG)" t) (register-definition-prefixes "disp-table" '("display-table-print-array")) @@ -10332,10 +10365,50 @@ Interactively, prompt for ROLE. Call CALLBACK for each analyzed symbol SYM with arguments ROLE, POS, SYM, ID and DEF, where ROLE is a symbol that specifies the semantics of SYM; POS is the position of SYM in STREAM; ID is an object that uniquely -identifies (co-)occurrences of SYM in the current defun; and DEF is the -position in which SYM is locally defined, or nil. If SYM is itself a -binding occurrence, then POS and DEF are equal. If SYM is not lexically -bound, then DEF is nil. +identifies the local reference of SYM in the current defun, so different +occurrences of SYM get the same ID (up to `equal') if and only if they +refer to the same object; and lastly, DEF is the position in which SYM +is locally defined, or nil. For the occurrence of SYM at the position +where it is locally defined (a.k.a. \"bound\"), the values of POS and +DEF are equal. If SYM is not lexically bound, then DEF is nil and so +is ID. + +CALLBACK should use ID by checking if it is nil or `equal' to other ID +values produced in the same call to this function. The specific value +of a given ID is otherwise meaningless. + +As an example, when this function analyzes the following form + + (lambda (mode) (let ((mode (or mode major-mode))) (symbol-name mode))) + +the CALLBACK function is invoked four times with SYM `mode': + +- Once for the `mode' in the `lambda' arguments list, with ROLE + `binding-variable', some non-nil ID value MODE-ID1, and with POS and + DEF both being the same position POS1 where this `mode' occurs. + +- Another time for the binder in the let form, with ROLE + `binding-variable' some non-nil ID value MODE-ID2 that is not `equal' + to MODE-ID1, and with POS and DEF both being the same position POS2. + +- Another for the first argument of `or', with ROLE `bound-variable' and + ID of MODE-ID1, since this occurrence of `mode' is bound by the + `lambda' argument `mode'. Similarly, DEF is POS1, and POS is now a + different position, POS3. + +- Finally, CALLBACK is also invoked for the `mode' that appears in the + body of `let' as the argument of `symbol-name', with ROLE set to + `bound-variable', ID set to MODE-ID2, and DEF set to POS3. + +In the above example, CALLBACK is also invoked for `lambda', `let', +`or', `major-mode' and `symbol-name'. Since those symbols do not have +local references (they refer to global functions/macros/variables), +CALLBACK gets nil ID and nil DEF. + +Note that if SYM is locally-bound, but has no specific binding position, +then DEF is nil while ID is non-nil. This is the case when SYM is bound +by a binder that is only introduced during macro expansion and does not +appear literally in the analyzed code. If STREAM is nil, it defaults to the current buffer. When reading from the current buffer, this function leaves point at the end of the form. @@ -10678,9 +10751,12 @@ Message buffer where you can explain more about the patch. ;;; Generated autoloads from international/emoji.el -(autoload 'emoji-insert "emoji") -(autoload 'emoji-recent "emoji") -(autoload 'emoji-search "emoji") +(autoload 'emoji-insert "emoji" nil t) +(autoload 'emoji-recent "emoji" nil t) +(autoload 'emoji-search "emoji" +" + +(fn GLYPH DERIVED)" t) (autoload 'emoji-list "emoji" "List Emoji and allow selecting and inserting one of them. If you are displaying Emoji on a text-only terminal, and some @@ -10700,7 +10776,10 @@ If called from Lisp, return the name as a string; return nil if the name is not known. (fn GLYPH &optional INTERACTIVE)" t) -(autoload 'emoji-list-select "emoji") +(autoload 'emoji-list-select "emoji" +" + +(fn EVENT)" '(emoji-list-mode)) (autoload 'emoji--init "emoji" " @@ -11093,7 +11172,7 @@ a single minimum version string. ;;; Generated autoloads from erc/erc.el -(push '(erc 5 6 2 -4) package--builtin-versions) +(push '(erc 5 6 2 31 1) package--builtin-versions) (dolist (symbol '( erc-sasl erc-spelling ; 29 erc-imenu erc-nicks)) ; 30 (custom-add-load symbol symbol)) @@ -11310,7 +11389,7 @@ server name and search for a match in `erc-networks-alist'.") ;;; Generated autoloads from erc/erc-pcomplete.el -(register-definition-prefixes "erc-pcomplete" '("erc-pcomplet" "pcomplete")) +(register-definition-prefixes "erc-pcomplete" '("erc-" "pcomplete")) ;;; Generated autoloads from erc/erc-replace.el @@ -15031,11 +15110,6 @@ supported. (register-definition-prefixes "gnus-cus" '("category-fields" "gnus-")) - -;;; Generated autoloads from gnus/gnus-dbus.el - -(register-definition-prefixes "gnus-dbus" '("gnus-dbus-")) - ;;; Generated autoloads from gnus/gnus-delay.el @@ -20427,7 +20501,7 @@ penultimate step during initialization." t) Dotted symbol is any symbol starting with a `.'. This macro creates let-bindings for dotted symbols that appear literally in BODY (whether or not they are actually used). It does not create bindings for dotted -symbols that are introdcued by macro-expansion in BODY. +symbols that are introduced by macro-expansion in BODY. A symbol of the form `.foo.N' where N is a natural number refers to the Nth element of the value that ALIST associates to key `foo'. @@ -21429,21 +21503,15 @@ for the current invocation. ;;; Generated autoloads from textmodes/markdown-ts-mode.el -(autoload 'markdown-ts-mode "markdown-ts-mode" -"Major mode for editing Markdown using tree-sitter grammar. - -In addition to any hooks its parent mode `text-mode' might have run, -this mode runs the hook `markdown-ts-mode-hook', as the final or -penultimate step during initialization. - -\\{markdown-ts-mode-map}" t) -(autoload 'markdown-ts-mode-maybe "markdown-ts-mode" -"Enable `markdown-ts-mode' when its grammar is available. -Also propose to install the grammar when `treesit-enabled-modes' -is t or contains the mode name.") -(when (boundp 'treesit-major-mode-remap-alist) (add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-ts-mode-maybe)) (add-to-list 'treesit-major-mode-remap-alist '(markdown-mode . markdown-ts-mode))) +(push '(markdown-ts-mode 1 0) package--builtin-versions) (register-definition-prefixes "markdown-ts-mode" '("markdown-ts-")) + +;;; Generated autoloads from textmodes/markdown-ts-mode-x.el + +(push '(markdown-ts-mode-x 1 0) package--builtin-versions) +(register-definition-prefixes "markdown-ts-mode-x" '("markdown-ts-")) + ;;; Generated autoloads from master.el @@ -23940,7 +24008,7 @@ penultimate step during initialization." t) ;;; Generated autoloads from org/org.el -(push '(org 9 8 3) package--builtin-versions) +(push '(org 9 8 5) package--builtin-versions) (autoload 'org-babel-do-load-languages "org" "Load the languages defined in `org-babel-load-languages'. @@ -25081,9 +25149,9 @@ DESC must be a `package-desc' object. "List of the names of currently activated packages.") (defvar package--activated nil "Non-nil if `package-activate-all' has been run.") -(defun package-activate-all nil +(autoload 'package-activate-all "package-activate" "Activate all installed packages. -The variable `package-load-list' controls which packages to load." (setq package--activated t) (let* ((elc (concat package-quickstart-file "c")) (qs (if (file-readable-p elc) elc (if (file-readable-p package-quickstart-file) package-quickstart-file)))) (or (and qs (not (bound-and-true-p package-activated-list)) (with-demoted-errors "Error during quickstart: %S" (let ((load-source-file-function nil)) (unless (boundp 'package-activated-list) (setq package-activated-list nil)) (load qs nil 'nomessage) t))) (progn (require 'package) (with-no-warnings (package--activate-all)))))) +The variable `package-load-list' controls which packages to load.") (autoload 'package-installed-p "package-activate" "Return non-nil if PACKAGE, of MIN-VERSION or newer, is installed. If PACKAGE is a symbol, it is the package name and MIN-VERSION @@ -25396,10 +25464,9 @@ Emacs Lisp manual for more information and examples. (autoload 'pcase--make-docstring "pcase") (autoload 'pcase-exhaustive "pcase" "The exhaustive version of `pcase' (which see). -If EXP fails to match any of the patterns in CASES, an error is -signaled. +If EXP fails to match any of the patterns in CASES, signal an error. -In contrast, `pcase' will return nil if there is no match, but +In contrast, `pcase' will return nil if there is no match, but will not signal an error. (fn EXP &rest CASES)" nil t) @@ -32326,6 +32393,10 @@ as the new values of the bound variables in the recursive invocation. This construct can only be used with lexical binding. (fn NAME BINDINGS &rest BODY)" nil t) +(autoload 'work-buffer--release "subr-x" +"Release work BUFFER. + +(fn BUFFER)") (autoload 'with-work-buffer "subr-x" "Create a work buffer, and evaluate BODY there like `progn'. Like `with-temp-buffer', but reuse an already created temporary @@ -34560,7 +34631,7 @@ relative only to the time worked today, and not to past time. ;;; Generated autoloads from emacs-lisp/timeout.el -(push '(timeout 2 1) package--builtin-versions) +(push '(timeout 2 1 6) package--builtin-versions) (autoload 'timeout-debounce "timeout" "Debounce FUNC by making it run DELAY seconds after it is called. @@ -35198,7 +35269,7 @@ Interactively, with a prefix argument, prompt for a different method." t) ;;; Generated autoloads from transient.el -(push '(transient 0 13 0) package--builtin-versions) +(push '(transient 0 13 3) package--builtin-versions) (autoload 'transient-insert-suffix "transient" "Insert a SUFFIX into PREFIX before LOC. PREFIX is a prefix command, a symbol. From 8f5b786cacbc5e85a71b1e2ec530db9feb41e73c Mon Sep 17 00:00:00 2001 From: Augusto Stoffel Date: Wed, 3 Jun 2026 15:01:07 +0200 Subject: [PATCH 101/125] Check buffer-local value in tramp-local-environment-variable-p * lisp/net/tramp.el (tramp-local-environment-variable-p): Do it. --- lisp/net/tramp.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index bbe44880fd1..044580bac07 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -5478,7 +5478,9 @@ should be set connection-local.") "Return non-nil if ARG exists in default `process-environment'. Tramp does not propagate local environment variables in remote processes." - (member arg (default-toplevel-value 'process-environment))) + (or (ignore-error void-variable + (member arg (buffer-local-toplevel-value 'process-environment))) + (member arg (default-toplevel-value 'process-environment)))) (defun tramp-handle-make-process (&rest args) "An alternative `make-process' implementation for Tramp files." From 84556123ebd9a29a973bea086dd35638faff01ee Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 5 Jun 2026 12:18:36 +0100 Subject: [PATCH 102/125] ; * admin/make-tarball.txt: Update. --- admin/make-tarball.txt | 60 ++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index 2ef31c0042b..8299668a8a6 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -13,29 +13,22 @@ Preparations: Steps to take before starting on the first pretest in any release sequence: -0. The release branch (e.g. emacs-28) should already have been made +0. The release branch (e.g. emacs-31) should already have been made and you should use it for all that follows. Diffs from this branch should be going to the emacs-diffs mailing list. 1. Decide on versions of m4 and autoconf, and ensure you will have them available for the duration of the release process. -2. Consider increasing the value of the variable - 'customize-changed-options-previous-release' in cus-edit.el to - refer to a newer version of Emacs. (This is now done when cutting - the release branch, see admin/release-branch.txt, but it can't - hurt to double check its value.) Commit cus-edit.el if changed. - -3. Remove any old pretests from . +2. Remove any old pretests from . You can use 'gnupload --delete' (see below for more gnupload details). - (We currently don't bother with this.) -4. Check that all new Lisp libraries belong to sensible packages. +3. Check that all new Lisp libraries belong to sensible packages. Run "make -C lisp finder-data" and check the diff of the generated file against the previously released Emacs version to see what has changed. -5. If this is an emergency release without a prior pretest, inform the +4. If this is an emergency release without a prior pretest, inform the maintainers of the bundled packages which are developed separately to make sure they install adjustments required for an official release. Currently, these packages include: @@ -70,7 +63,7 @@ General steps (for each step, check for possible errors): "M-x emacs-news-delete-temporary-markers" command to delete any left-over "---" and "+++" markers from etc/NEWS, as well as the "Temporary note" section at the beginning of that file, and commit - etc/NEWS if it was modified. For a bug fix release (e.g. 28.2), + etc/NEWS if it was modified. For a bug fix release (e.g. 31.2), delete any empty headlines too. 2. Regenerate the versioned ChangeLog.N and etc/AUTHORS files. @@ -268,30 +261,33 @@ General steps (for each step, check for possible errors): 9. You can now tag the release/pretest and push it together with the last commit: - cd EMACS_ROOT_DIR && git tag -a TAG -m "Emacs TAG" + cd EMACS_ROOT_DIR && git tag -s TAG -m "Emacs STR" git push git push --tags Here TAG is emacs-XX.Y.ZZ for a pretest, emacs-XX.Y for a release. - For a release, if you are producing a release candidate first, use - emacs-XX.Y-rcN (N = 1, 2, ...) when you tar the RC, and add the - actual release tag later, when the official release tarball is - uploaded to ftp.gnu.org. When adding a tag later, it is safer to - use the SHA1 of the last commit which went into the release + For STR see below. For a release, if you are producing a release + candidate first, use emacs-XX.Y-rcN (N = 1, 2, ...) when you tar the + RC, and add the actual release tag later, when the official release + tarball is uploaded to ftp.gnu.org. When adding a tag later, it is + safer to use the SHA1 of the last commit which went into the release tarball, in case there were some intervening commits since then: - git tag -a TAG -m "Emacs TAG" SHA1 + git tag -s TAG -m "Emacs TAG STR" SHA1 git push --tags In the past, we were not always consistent with the annotation (i.e. -m "Emacs TAG"). The preferred format is like this for a pretest, release candidate and final release: - git tag -a emacs-28.0.90 -m "Emacs 28.0.90 pretest" - git tag -a emacs-28.1-rc1 -m "Emacs 28.1 RC1" - git tag -a emacs-28.1 -m "Emacs 28.1 release" + git tag -s emacs-31.0.90 -m "Emacs 31.0.90 pretest" + git tag -s emacs-31.1-rc1 -m "Emacs 31.1 RC1" + git tag -s emacs-31.1 -m "Emacs 31.1 release" -10. Decide what compression schemes to offer. +10. Merge the release branch to master, checking you skip the right + commits. + +11. Decide what compression schemes to offer. For a release, at least gz and xz: gzip --best --no-name -c emacs-NEW.tar > emacs-NEW.tar.gz xz -c emacs-NEW.tar > emacs-NEW.tar.xz @@ -300,7 +296,9 @@ General steps (for each step, check for possible errors): Now you should upload the files to the GNU FTP server; your GPG key must already be accepted as described above. The simplest method of uploading is with the gnulib - script "build-aux/gnupload": + script "build-aux/gnupload" + (/usr/share/gnulib/build-aux/gnupload on Debian and its derivatives + with the 'gnulib' and 'ncftp' packages installed): For a pretest or release candidate: gnupload [--user your@gpg.key.email] --to alpha.gnu.org:emacs/pretest \ @@ -333,14 +331,14 @@ General steps (for each step, check for possible errors): For a pretest, place the files in /incoming/alpha instead, so that they appear on . -11. After five minutes, verify that the files are visible at +12. After five minutes, verify that the files are visible at for a pretest, or for a release. Download them and check the signatures and SHA1/SHA256 checksums. Check they build (./configure --with-native-compilation). -12. Send an announcement to: emacs-devel, and bcc: info-gnu-emacs@gnu.org. +13. Send an announcement to: emacs-devel, and bcc: info-gnu-emacs@gnu.org. For a pretest, also bcc: platform-testers@gnu.org. For a release, also bcc: info-gnu@gnu.org. (The reason for using bcc: is to make it less likely that people @@ -354,19 +352,19 @@ General steps (for each step, check for possible errors): because replies that invariably are not announcements also get sent out as if they were.) - To create the included SHA1 and SHA256 checksums, run: + To create the included SHA256 and SHA512 checksums, run: - sha1sum emacs-NEW.tar.xz sha256sum emacs-NEW.tar.xz + sha512sum emacs-NEW.tar.xz You can optionally sign the announcement email using the same PGP key that you used for signing the tarball. (Use e.g. `M-x mml-secure-message-sign' in `message-mode' to sign an email.) -13. After a release, update the Emacs pages as described below. +14. After a release, update the Emacs pages as described below. -14. After a release, bump the Emacs version on the release branch. +15. After a release, bump the Emacs version on the release branch. There is no need to bump the version after a pretest; the version is bumped before the next pretest or release instead. @@ -396,7 +394,7 @@ like this:
-

Emacs 28.1 is out, download it here!

+

Emacs 31.1 is out, download it here!

From cf325876faad8a2505a8714a6a5d767eab5ae120 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Fri, 5 Jun 2026 13:21:15 +0200 Subject: [PATCH 103/125] Adapt Tramp version * lisp/net/trampver.el (customize-package-emacs-version-alist): Add Tramp version integrated in Emacs 31.1. * doc/misc/trampver.texi: * lisp/net/trampver.el (tramp-version): Adapt Tramp versions. --- doc/misc/trampver.texi | 2 +- lisp/net/trampver.el | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi index 6eddd0e71c5..165d0eb1352 100644 --- a/doc/misc/trampver.texi +++ b/doc/misc/trampver.texi @@ -7,7 +7,7 @@ @c In the Tramp GIT, the version number and the bug report address @c are auto-frobbed from configure.ac. -@set trampver 2.8.2-pre +@set trampver 2.8.2 @set trampurl https://www.gnu.org/software/tramp/ @set tramp-bug-report-address tramp-devel@@gnu.org @set emacsver 28.1 diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index b900ab377aa..00d5ffb2afa 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@ -7,7 +7,7 @@ ;; Maintainer: Michael Albinus ;; Keywords: comm, processes ;; Package: tramp -;; Version: 2.8.2-pre +;; Version: 2.8.2 ;; Package-Requires: ((emacs "28.1")) ;; Package-Type: multi ;; URL: https://www.gnu.org/software/tramp/ @@ -40,7 +40,7 @@ ;; ./configure" to change them. ;;;###tramp-autoload -(defconst tramp-version "2.8.2-pre" +(defconst tramp-version "2.8.2" "This version of Tramp.") ;;;###tramp-autoload @@ -76,7 +76,7 @@ ;; Check for Emacs version. (let ((x (if (not (string-version-lessp emacs-version "28.1")) "ok" - (format "Tramp 2.8.2-pre is not fit for %s" + (format "Tramp 2.8.2 is not fit for %s" (replace-regexp-in-string "\n" "" (emacs-version)))))) (unless (string-equal "ok" x) (error "%s" x))) @@ -109,7 +109,8 @@ ("2.5.2.28.1" . "28.1") ("2.5.3.28.2" . "28.2") ("2.5.4" . "28.3") ("2.6.0.29.1" . "29.1") ("2.6.2.29.2" . "29.2") ("2.6.3-pre" . "29.3") ("2.6.3" . "29.4") - ("2.7.1.30.1" . "30.1") ("2.7.3.30.2" . "30.2"))) + ("2.7.1.30.1" . "30.1") ("2.7.3.30.2" . "30.2") + ("2.8.2" . "31.1"))) (add-hook 'tramp-unload-hook (lambda () From f26f2a832c4ee36c1fd0602210c8da54d6868731 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 5 Jun 2026 14:35:34 +0300 Subject: [PATCH 104/125] ; Avoid byte-compilation warning in mouse.el * lisp/mouse.el (send-to): Require, not only when compiling, as 'send-to--resolve-handler' is used at run time. --- lisp/mouse.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/mouse.el b/lisp/mouse.el index 20c819ee0a8..53a189772f2 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -30,7 +30,7 @@ ;;; Code: (eval-when-compile (require 'rect)) -(eval-when-compile (require 'send-to)) +(require 'send-to) ;; Indent track-mouse like progn. (put 'track-mouse 'lisp-indent-function 0) From eb1de3f585a4dd40d026a0a4449936cbdf7ae412 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 5 Jun 2026 14:42:58 +0300 Subject: [PATCH 105/125] ; Avoid rebuilding Emacs Lisp Intro when building release tarball * make-dist (info_files): Include "*.png" images, which are used in the doc/lispintro/ directory, and should be in the tarball. This makes sure eintr.info will not need to be rebuilt on the end-users' systems when a release tarball is being built, due to the fact that PNG files are copied from doc/lispintro/ and are thus newer than eintr.info that came with the tarball. We don't want to force rebuilding Info files when a release tarball is built because users are not required to have Texinfo installed. --- make-dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make-dist b/make-dist index 427274cf249..aa8df7126ee 100755 --- a/make-dist +++ b/make-dist @@ -369,7 +369,7 @@ possibly_non_vc_files=" ) || exit if [ $with_info = yes ]; then - info_files="info/dir $(echo info/*.info info/*.txt info/*.jpg)" || exit + info_files="info/dir $(echo info/*.info info/*.txt info/*.jpg info/*.png)" || exit else info_files= fi From 79391d3e1941a168e9e5e650fe44f168ae3b8712 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 5 Jun 2026 15:05:19 +0300 Subject: [PATCH 106/125] ; * lisp/mouse.el (send-to--resolve-handler): Fix last change. --- lisp/mouse.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/mouse.el b/lisp/mouse.el index 53a189772f2..1ff79e3833e 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -30,7 +30,7 @@ ;;; Code: (eval-when-compile (require 'rect)) -(require 'send-to) +(eval-when-compile (require 'send-to)) ;; Indent track-mouse like progn. (put 'track-mouse 'lisp-indent-function 0) @@ -539,6 +539,7 @@ Some context functions add menu items below the separator." (cdr mode)))) menu) +(autoload 'send-to--resolve-handler "send-to") (defun context-menu-send-to (menu _click) "Add a \"Send to...\" context MENU entry on supported platforms." (run-hooks 'activate-menubar-hook 'menu-bar-update-hook) From fd1b5cd890931d68facc4e5e6604d577fdddf04a Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 5 Jun 2026 13:07:24 +0100 Subject: [PATCH 107/125] ; * test/lisp/files-tests.el (w32-downcase-file-names): Declare. --- test/lisp/files-tests.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index 55011cd461a..5001f9aaf96 100644 --- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el @@ -696,6 +696,8 @@ unquoted file names." (tmpdir nospecial-dir t) (should-error (directory-files-and-attributes nospecial-dir)))) +(defvar w32-downcase-file-names) + (ert-deftest files-tests-directory-files-recursively-w32 () "Test MS-Windows specific features of `directory-files-recursively'." (skip-unless (eq system-type 'windows-nt)) From e9d1367a32f1a6a9d637f14b2326e19e58762acc Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 5 Jun 2026 12:43:43 -0400 Subject: [PATCH 108/125] paren.el: Fix part of bug#81035 * lisp/paren.el (show-paren--default): Syntax-propertize before narrowing. --- lisp/paren.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/paren.el b/lisp/paren.el index 10c72dadc79..c2ecdc60c72 100644 --- a/lisp/paren.el +++ b/lisp/paren.el @@ -272,9 +272,14 @@ It is the default value of `show-paren-data-function'." (save-restriction ;; Determine the range within which to look for a match. (when blink-matching-paren-distance - (narrow-to-region - (max (point-min) (- (point) blink-matching-paren-distance)) - (min (point-max) (+ (point) blink-matching-paren-distance)))) + (let ((beg (max (point-min) + (- (point) blink-matching-paren-distance)))) + ;; `syntax-propertize' can't widen so make sure it won't + ;; need to (bug#81035). + (syntax-propertize beg) + (narrow-to-region + beg + (min (point-max) (+ (point) blink-matching-paren-distance))))) ;; Scan across one sexp within that range. ;; Errors or nil mean there is a mismatch. (condition-case () From 35a82765bf6e35926d7077afd9a7cf3d92683c9e Mon Sep 17 00:00:00 2001 From: Al Haji-Ali Date: Fri, 22 May 2026 12:56:33 +0100 Subject: [PATCH 109/125] Fix bug in latexenc when AUCTeX is loaded * lisp/international/latexenc.el (latexenc-find-file-coding-system): Set file name correctly when `TeX-master' is a string. (Bug#81099) --- lisp/international/latexenc.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/international/latexenc.el b/lisp/international/latexenc.el index 57f23e6b8aa..6e0cde6b653 100644 --- a/lisp/international/latexenc.el +++ b/lisp/international/latexenc.el @@ -157,7 +157,8 @@ coding system names is determined from `latex-inputenc-coding-alist'." nil t) (match-string 2) (or (and (bound-and-true-p TeX-master) - (stringp TeX-master)) + (stringp TeX-master) + TeX-master) (bound-and-true-p tex-main-file))))) (dolist (ext `("" ,(if (boundp 'TeX-default-extension) (concat "." TeX-default-extension) From 30df8657fbcfdd47d51c724a391752f7c27e7a29 Mon Sep 17 00:00:00 2001 From: Arash Esbati Date: Fri, 5 Jun 2026 12:52:00 -0400 Subject: [PATCH 110/125] (tex-main-file): Add forgotten safety predicate (bug#81099) That variable is commonly set file-locally. * lisp/textmodes/tex-mode.el (tex-main-file): Add safety predicate. --- lisp/textmodes/tex-mode.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 86a4b1d006e..d6be9d511d6 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -89,6 +89,7 @@ The command `tex-file' runs TeX on the file specified by `tex-main-file' if the variable is non-nil." :type '(choice (const :tag "None" nil) file) + :safe (lambda (x) (or (stringp x) (null x))) :group 'tex-file) ;;;###autoload From e4350c538f4a2a9f1199812bdb38c3d2b73f20e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Marks?= Date: Wed, 27 May 2026 16:05:23 -0400 Subject: [PATCH 111/125] Improve progress-reporter state to remove hard coded length (bug#80988) Remove hard-coded state range, now a monotonically increasing integer. * lisp/subr.el (progress-reporter-update-functions): Update docstring. (progress-reporter-echo-area): Use 'progress-reporter--pulse-characters' length. (progress-reporter-do-update): Increase 'state' by 1 each pass. * lisp/system-taskbar.el (system-taskbar--progress-reporter-update): Make steps independent of 'progress-reporter-echo-area' steps. --- lisp/subr.el | 12 ++++++------ lisp/system-taskbar.el | 4 +++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lisp/subr.el b/lisp/subr.el index d97598ab61f..16234d313a7 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -7114,8 +7114,7 @@ REPORTER is the result of a call to `make-progress-reporter'. STATE can be one of: - A float representing the percentage complete in the range 0.0-1.0 for a numeric reporter. -- An integer representing the index which cycles through the range 0-3 -for a pulsing reporter. +- A monotonically increasing integer for a pulsing reporter. - The symbol `done' to indicate that the progress reporter is complete.") (defsubst progress-reporter-update (reporter &optional value suffix) @@ -7130,7 +7129,7 @@ MIN-VALUE and MAX-VALUE. Optional argument SUFFIX is a string to be displayed after REPORTER's main message and progress text. If REPORTER is a non-numerical reporter, then VALUE should be nil, or a string to use instead of -SUFFIX. SUFFIX is considered obsolete and may be removed in the future. +SUFFIX. See `progress-reporter-update-functions' for the list of functions called on each update. @@ -7241,8 +7240,9 @@ area is busy with something else." (message "%s" text))) ((pred integerp) (let ((message-log-max nil) - (pulse-char (aref progress-reporter--pulse-characters - state))) + (pulse-char + (aref progress-reporter--pulse-characters + (mod state (length progress-reporter--pulse-characters))))) (message "%s %s" text pulse-char))) ('done (message "%sdone" text)))))) @@ -7294,7 +7294,7 @@ area is busy with something else." (if suffix (aset parameters 6 suffix) (setq suffix (or (aref parameters 6) ""))) - (let ((index (mod (1+ (car reporter)) 4))) + (let ((index (1+ (car reporter)))) (setcar reporter index) (run-hook-with-args 'progress-reporter-update-functions reporter diff --git a/lisp/system-taskbar.el b/lisp/system-taskbar.el index cc41183fb32..973b426e026 100644 --- a/lisp/system-taskbar.el +++ b/lisp/system-taskbar.el @@ -282,7 +282,9 @@ REPORTER and STATE are the same as in ((pred floatp) (system-taskbar--progress state)) ((pred integerp) - (system-taskbar--progress (/ (1+ state) 4.0))) + ;; This won't show 0.0 to indicate work in process until done. + (system-taskbar--progress + (/ (1+ (mod state 5)) 5.0))) ('done (system-taskbar--progress nil))))) From 66e02b3123a2f6845b1ec6e192f3820bb74d4a7b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 29 May 2026 23:49:22 -0400 Subject: [PATCH 112/125] (Fmarkers_in): New function (bug#81153) * src/marker.c (Fmarkers_in): New function. (syms_of_marker): Defsubr it. * doc/lispref/text.texi (Replacing): Add markers-in. * test/src/marker-tests.el (marker-markers-in): New test. --- doc/lispref/text.texi | 18 ++++++++++++++++++ etc/NEWS | 3 +++ src/marker.c | 31 +++++++++++++++++++++++++++++++ test/src/marker-tests.el | 13 +++++++++++++ 4 files changed, 65 insertions(+) diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 6fcc1b0a078..a5535df601b 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -4871,6 +4871,24 @@ Therefore, all else being equal, it is preferable to pass a buffer than a string as @var{source} argument. @end defun +Sometimes @code{replace-region-contents} is unable to understand the +nature of the change in which case information such as overlays and +markers will not be preserved as well as we would like. If this is +important and you have enough knowledge about the change, you can +preserve this information manually. For example, when sorting the lines +of a region, you can start by collecting all the overlays and markers in +the affected region using @code{overlays-in} and @code{markers-in} as +well as recording a description of the line on which they were found. +After inserting the sorted lines, you can then move the objects back to +their rightful position. + +@defun markers-in &optional beg end +Return a list of all the markers found between @var{beg} and @var{end} +in the current buffer. @var{beg} defaults the @code{point-min} and +@var{end} defaults to @code{point-max}. Do not rely on the order of the +markers in the list, because it is unspecified. +@end defun + @node Decompression @section Dealing With Compressed Data diff --git a/etc/NEWS b/etc/NEWS index 2ee0df5650d..1b5bd471cb8 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -90,6 +90,9 @@ To install the grammars, use 'M-x markdown-ts-mode-install-parsers'. * Lisp Changes in Emacs 32.1 ++++ +** The new function 'markers-in' returns the set of markers in a region. + --- ** New variable 'completion-frontend-properties'. This variable generalizes the 'completion-lazy-hilit' variable added in diff --git a/src/marker.c b/src/marker.c index b0b05fbb5a0..84614e42e11 100644 --- a/src/marker.c +++ b/src/marker.c @@ -794,6 +794,36 @@ If TYPE is nil, it means the marker stays behind when you insert text at it. */ return type; } +DEFUN ("markers-in", Fmarkers_in, Smarkers_in, 0, 2, 0, + doc: /* Return the list of markers in region BEG..END. +The list includes markers at BEG and at END. */) + (Lisp_Object beg, Lisp_Object end) +{ + Lisp_Object res = Qnil; + struct Lisp_Marker *tail; + ptrdiff_t ibeg, iend; + if (NILP (beg)) + ibeg = BEGV; + else + { + CHECK_FIXNUM_COERCE_MARKER (beg); + ibeg = clip_to_bounds (BEGV, XFIXNUM (beg), ZV); + } + if (NILP (end)) + iend = ZV; + else + { + CHECK_FIXNUM_COERCE_MARKER (end); + iend = clip_to_bounds (BEGV, XFIXNUM (end), ZV); + } + + for (tail = BUF_MARKERS (current_buffer); tail; tail = tail->next) + if (ibeg <= tail->charpos && tail->charpos <= iend) + res = Fcons (make_lisp_ptr (tail, Lisp_Vectorlike), res); + + return res; +} + #ifdef MARKER_DEBUG /* For debugging -- count the markers in buffer BUF. */ @@ -840,4 +870,5 @@ syms_of_marker (void) defsubr (&Scopy_marker); defsubr (&Smarker_insertion_type); defsubr (&Sset_marker_insertion_type); + defsubr (&Smarkers_in); } diff --git a/test/src/marker-tests.el b/test/src/marker-tests.el index ddd8bc702e4..f083ece41e1 100644 --- a/test/src/marker-tests.el +++ b/test/src/marker-tests.el @@ -57,4 +57,17 @@ (set-marker marker-2 marker-1) (should (goto-char marker-2)))) +(ert-deftest marker-markers-in () + (with-temp-buffer + (insert "hello ") + (let ((m2 (point-marker))) + (insert "world") + (let ((m1 (point-min-marker)) + (m3 (point-max-marker)) + (ms (markers-in (1+ (point-min)) (1- (point-max))))) + (should (memq m2 ms)) + (should-not (memq m1 ms)) + (should-not (memq m3 ms)) + (should (all (lambda (m) (eq (marker-buffer m) (current-buffer))) ms)))))) + ;;; marker-tests.el ends here From 3801c09ae22fe5bc0bf42546b2747824cb9fe0b6 Mon Sep 17 00:00:00 2001 From: Andrea Alberti Date: Fri, 29 May 2026 10:42:47 +0200 Subject: [PATCH 113/125] Don't resurrect invisible child frames when rebuilding parent links On the NS port, -[EmacsWindow setParentChildRelationships] reattaches every child frame to its parent via -addChildWindow:ordered:, which also orders the child window onto the screen. This runs whenever the parent/child relationships are rebuilt, e.g., when entering non-native fullscreen, which allocates a fresh EmacsWindow whose initializer rebuilds the relationships. A child frame that Emacs had made invisible (e.g. a corfu/company completion popup) was thereby brought back as a stale, non-responsive child frame. Emacs never repaints to clear it because frame_redisplay_p trusts FRAME_VISIBLE_P on the NS port and avoids dealing with the child frame when it is marked as invisible. Native fullscreen does not trigger this: -toggleFullScreen: hands off to AppKit without allocating a new window, so the rebuild never runs. A hidden child frame is normally detached from its parent already: Emacs hides it with -orderOut: (ns_make_frame_invisible), which per Apple's documentation removes a child window from its parent before ordering it out. The fix is therefore not to re-attach a child while it is invisible; ns_make_frame_visible already reinstates the parent/child link when the frame is shown again. * src/nsterm.m ([EmacsWindow setParentChildRelationships]): Only re-attach a child window when the frame is marked visible. (ns_make_frame_visible): Explain, with a reference to Apple's documentation, why the parent/child link must be reinstated on show. --- src/nsterm.m | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index 2507053f3a1..f4de0a76c0a 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -1651,8 +1651,13 @@ -(void)remove unblock_input (); } - /* Making a frame invisible seems to break the parent->child - relationship, so reinstate it. */ + /* A child window cannot remain attached while hidden. Per Apple's + documentation, "Calling orderOut(_:) on a child window causes the + window to be removed from its parent window before being removed" + (https://developer.apple.com/documentation/appkit/nswindow/orderout(_:)), + and ns_make_frame_invisible hides the frame with -orderOut:. The + parent->child relationship is therefore broken while invisible, so + reinstate it now that we are making the frame visible again. */ if ([window parentWindow] == nil && FRAME_PARENT_FRAME (f) != NULL) { block_input (); @@ -9979,8 +9984,15 @@ - (void)setParentChildRelationships [ourView toggleFullScreen:self]; #endif - [parentWindow addChildWindow:self - ordered:NSWindowAbove]; + /* -addChildWindow: also orders the child window onto the screen, so + attaching a child frame Emacs considers invisible is what + resurrects a dismissed completion popup (corfu, company-box, ...) + when relationships are rebuilt. Only attach a visible child; a + hidden one is re-attached by ns_make_frame_visible when it is + shown again. */ + if (FRAME_VISIBLE_P (ourFrame)) + [parentWindow addChildWindow:self + ordered:NSWindowAbove]; } /* Check our child windows are configured correctly. */ From bf9a1e1f1659d55ae159a651fba5b9c71038cc99 Mon Sep 17 00:00:00 2001 From: Andrea Alberti Date: Fri, 29 May 2026 17:34:35 +0200 Subject: [PATCH 114/125] Fix respondsToSelector: selector for native fullscreen check The two -respondsToSelector: guards in -[EmacsWindow setParentChildRelationships] tested @selector(toggleFullScreen) without the trailing colon, but the method is -toggleFullScreen:. The colon-less selector matches nothing, so the guarded code was always skipped. This is inert on modern builds (MAC_OS_X_VERSION_MIN_REQUIRED >= 1070, where the check is #if'd out), but on a binary targeting pre-10.7 yet running on 10.7+ it would wrongly skip taking a child frame out of native fullscreen. * src/nsterm.m ([EmacsWindow setParentChildRelationships]): Add the missing colon to both @selector(toggleFullScreen:) checks. --- src/nsterm.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index 20097454444..45d43c88423 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -9947,7 +9947,7 @@ - (void)setParentChildRelationships #ifdef NS_IMPL_COCOA #if MAC_OS_X_VERSION_MIN_REQUIRED < 1070 - if ([ourView respondsToSelector:@selector (toggleFullScreen)]) + if ([ourView respondsToSelector:@selector (toggleFullScreen:)]) #endif /* If we are the descendent of a fullscreen window and we have no new parent, go fullscreen. */ @@ -9972,7 +9972,7 @@ - (void)setParentChildRelationships #ifdef NS_IMPL_COCOA #if MAC_OS_X_VERSION_MIN_REQUIRED < 1070 - if ([ourView respondsToSelector:@selector (toggleFullScreen)]) + if ([ourView respondsToSelector:@selector (toggleFullScreen:)]) #endif /* Child frames must not be fullscreen. */ if ([ourView fsIsNative] && [ourView isFullscreen]) From 1b019b135b85003cf2a57506ce221b8bd5da3517 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 5 Jun 2026 18:59:25 -0700 Subject: [PATCH 115/125] Avoid double-rounding in byte-code speed doc * doc/lispref/compile.texi (Speed of Byte-Code): Avoid some double-rounding in time calculations. Modernize the timings. --- doc/lispref/compile.texi | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi index 87a1e053905..e72d78928c3 100644 --- a/doc/lispref/compile.texi +++ b/doc/lispref/compile.texi @@ -52,15 +52,15 @@ Here is an example: @group (defun silly-loop (n) "Return the time, in seconds, to run N iterations of a loop." - (let ((t1 (float-time))) + (let ((t1 (current-time))) (while (> (setq n (1- n)) 0)) - (- (float-time) t1))) + (float-time (time-since t1)))) @result{} silly-loop @end group @group -(silly-loop 50000000) -@result{} 5.200886011123657 +(silly-loop 100000000) +@result{} 2.236908583 @end group @group @@ -69,13 +69,13 @@ Here is an example: @end group @group -(silly-loop 50000000) -@result{} 0.6239290237426758 -@end group +(silly-loop 100000000) +@result{} 0.374873305 +end group @end example - In this example, the interpreted code required more than 5 seconds to run, -whereas the byte-compiled code required less than 1 second. These + In this example, the interpreted code was about six times slower +than the byte-compiled code. These results are representative, but actual results may vary. @node Compilation Functions From 2dc98b69e007ec87bae8a1481c523dccc0504203 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 5 Jun 2026 18:59:25 -0700 Subject: [PATCH 116/125] format-seconds takes time values, not just numbers * lisp/calendar/time-date.el (format-seconds): Document that the arg can be any time value, and need not be a number. This has been true for some time, but has not been documented. Avoid some (but not all) rounding errors internally, and add a comment about the remaining rounding error. * lisp/emacs-lisp/timer-list.el (list-timers): * lisp/org/org-timer.el (org-timer-show-remaining-time): * lisp/org/ox.el (org-export--stack-generate): * lisp/time.el (emacs-uptime): Omit unnecessary conversion of time value that can increase rounding error. * test/lisp/calendar/time-date-tests.el (test-format-seconds): Test that format-seconds works on time values that are not numbers. --- doc/lispref/os.texi | 1 + lisp/calendar/time-date.el | 26 ++++++++++++++------------ lisp/emacs-lisp/timer-list.el | 7 +++---- lisp/org/org-timer.el | 5 +---- lisp/org/ox.el | 2 +- lisp/time.el | 4 +--- test/lisp/calendar/time-date-tests.el | 5 +++-- 7 files changed, 24 insertions(+), 26 deletions(-) diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 809fa36098a..59e0fe90a46 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -2040,6 +2040,7 @@ system. @defun format-seconds format-string seconds This function converts its argument @var{seconds} into a string of years, days, hours, etc., according to @var{format-string}. The +argument @var{seconds} is a time value (@pxref{Time of Day}). The argument @var{format-string} may contain @samp{%}-sequences which control the conversion. Here is a table of what the @samp{%}-sequences mean: diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el index 83764074eec..cc40b99cfb4 100644 --- a/lisp/calendar/time-date.el +++ b/lisp/calendar/time-date.el @@ -267,7 +267,7 @@ If DATE is malformed, return a time value of zero." ;;;###autoload (defun format-seconds (string seconds) - "Use format control STRING to format the number SECONDS. + "Use format control STRING to format the time value SECONDS. The valid format specifiers are: %y is the number of (365-day) years. %d is the number of days. @@ -325,13 +325,14 @@ right of \"%x\", trailing zero units are not output." (push match usedunits))) (when (and zeroflag larger) (error "Units are not in decreasing order of size")) - (unless (numberp seconds) - (setq seconds (float-time seconds))) - (setq minus (when (< seconds 0) "-") ; Treat -0.0 like 0.0. - seconds (abs seconds) - seconds (let ((s (floor seconds))) - (setq fraction (- seconds s)) - s)) + (unless seconds + (setq seconds (current-time))) + (let ((negative (time-less-p seconds 0))) + (setq minus (when negative "-") ; Treat -0.0 like 0.0. + seconds (if negative (time-subtract 0 seconds) seconds) + seconds (let ((s (time-convert seconds 'integer))) + (setq fraction (time-subtract seconds s)) + s))) (dolist (u units) (setq spec (car u) name (cadr u) @@ -352,9 +353,8 @@ right of \"%x\", trailing zero units are not output." ;; Cf article-make-date-line in gnus-art. (setq num (floor seconds unit) seconds (- seconds (* num unit))) - (let ((is-zero (zerop (if (= unit 1) - (+ num fraction) - num)))) + (let ((is-zero (and (zerop num) + (or (/= unit 1) (time-equal-p 0 fraction))))) ;; Start position of the first non-zero unit. (when (and (not leading-zeropos) (not is-zero)) @@ -379,7 +379,9 @@ right of \"%x\", trailing zero units are not output." "f%s") (concat "%" (match-string 1 string) "d%s")) (if (= unit 1) - (+ num fraction) + ;; 'float-time' rounds, then 'format' rounds. + ;; Oh well. + (float-time (time-add num fraction)) num) (if (string-equal (match-string 3 string) spec) "" ; lower-case, no unit-name diff --git a/lisp/emacs-lisp/timer-list.el b/lisp/emacs-lisp/timer-list.el index 9416e217ba9..70e74bb0928 100644 --- a/lisp/emacs-lisp/timer-list.el +++ b/lisp/emacs-lisp/timer-list.el @@ -49,10 +49,9 @@ (let ((time (timer--time timer))) (format "%12s" (format-seconds "%dd %hh %mm %z%,1ss" - (float-time - (if (timer--idle-delay timer) - time - (time-subtract time nil)))))) + (if (timer--idle-delay timer) + time + (time-subtract time nil))))) 'help-echo "Time until next invocation") ;; Repeat. ,(let ((repeat (timer--repeat-delay timer))) diff --git a/lisp/org/org-timer.el b/lisp/org/org-timer.el index d6d7cfaa43b..82db4829afc 100644 --- a/lisp/org/org-timer.el +++ b/lisp/org/org-timer.el @@ -388,10 +388,7 @@ VALUE can be `on', `off', or `paused'." "No timer set" (format-seconds "%m minute(s) %s seconds left before next time out" - ;; Note: Once our minimal require is Emacs 27, we can drop this - ;; org-time-convert-to-integer call. - (org-time-convert-to-integer - (time-subtract (timer--time org-timer-countdown-timer) nil)))))) + (time-subtract (timer--time org-timer-countdown-timer) nil))))) ;;;###autoload (defun org-timer-set-timer (&optional opt) diff --git a/lisp/org/ox.el b/lisp/org/ox.el index 686ffee8de2..8d7201353fd 100644 --- a/lisp/org/ox.el +++ b/lisp/org/ox.el @@ -7137,7 +7137,7 @@ appropriate for `tabulated-list-print'." ;; Age. (let ((info (nth 2 entry))) (if (processp info) (symbol-name (process-status info)) - (format-seconds "%h:%.2m" (float-time (time-since info))))) + (format-seconds "%h:%.2m" (time-since info)))) ;; Source. (if (stringp source) source (buffer-name source)))))) org-export-stack-contents))) diff --git a/lisp/time.el b/lisp/time.el index f553ebab413..ddcd44ee8c0 100644 --- a/lisp/time.el +++ b/lisp/time.el @@ -708,9 +708,7 @@ point." (interactive "i\nP") (let ((str (format-seconds (or format "%Y, %D, %H, %M, %z%S") - (time-convert - (time-since before-init-time) - 'integer)))) + (time-since before-init-time)))) (if here (insert str) (if (called-interactively-p 'interactive) diff --git a/test/lisp/calendar/time-date-tests.el b/test/lisp/calendar/time-date-tests.el index cd2dc203adf..d3477ff3e04 100644 --- a/test/lisp/calendar/time-date-tests.el +++ b/test/lisp/calendar/time-date-tests.el @@ -115,6 +115,7 @@ ("%mm %5ss" 66 "1m 6s") ("%mm %.5ss" 66.4 "1m 00006s") ("%mm %,1ss" 66.4 "1m 6.4s") + ("%mm %,1ss" (664 . 10) "1m 6.4s") ("%mm %5,1ss" 66.4 "1m 6.4s") ("%mm %.5,1ss" 66.4 "1m 006.4s") ("%hh %z%x%mm %ss" 120 "2m") @@ -128,8 +129,8 @@ (seconds (nth 1 fs)) (expected (nth 2 fs))) (should (equal (format-seconds string seconds) expected)) - (when (< 0 seconds) - (should (equal (format-seconds string (- seconds)) + (when (time-less-p 0 seconds) + (should (equal (format-seconds string (time-subtract 0 seconds)) (concat "-" expected)))))))) (ert-deftest test-ordinal () From 56b93016fcce2646e4c3aaba98adc3a597495033 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 5 Jun 2026 18:59:25 -0700 Subject: [PATCH 117/125] Simplify epa-ks--display-keys time calc * lisp/epa-ks.el (epa-ks--display-keys): Simplify by using time-less-p. This also avoids a rounding error. --- lisp/epa-ks.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/epa-ks.el b/lisp/epa-ks.el index 83c8bc38b26..e0504371e0d 100644 --- a/lisp/epa-ks.el +++ b/lisp/epa-ks.el @@ -194,7 +194,7 @@ KEYS is a list of `epa-ks-key' structures, as parsed by (if (epa-ks-key-expires key) (let* ((date (epa-ks-key-expires key)) (str (format-time-string "%F" date))) - (when (< 0 (time-to-seconds (time-since date))) + (when (time-less-p date nil) (setq str (propertize str 'face 'font-lock-warning-face))) str) From 5eee9e239bec2f02bf635a0f7764abe6fcfe9d1e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 5 Jun 2026 18:59:25 -0700 Subject: [PATCH 118/125] Simplify gnus-backend-trace time calc * lisp/gnus/gnus-int.el (gnus-backend-trace): Simplify, since (float-time (time-since nil)) returns 0.0. --- lisp/gnus/gnus-int.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el index 782c51add08..703619848d7 100644 --- a/lisp/gnus/gnus-int.el +++ b/lisp/gnus/gnus-int.el @@ -257,10 +257,8 @@ If it is down, start it up (again)." (goto-char (point-max)) (insert (format-time-string "%H:%M:%S") (format " %.2fs %s %S\n" - (if (numberp gnus-backend-trace-elapsed) - (float-time - (time-since gnus-backend-trace-elapsed)) - 0) + (float-time + (time-since gnus-backend-trace-elapsed)) type form)) (setq gnus-backend-trace-elapsed (float-time))))) From 4fd59d0eba074a9c49df72493327fd6a31d1d03e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 5 Jun 2026 18:59:25 -0700 Subject: [PATCH 119/125] =?UTF-8?q?Omit=20a=20=E2=80=98/=E2=80=99=20from?= =?UTF-8?q?=20org-clock-resolve?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lisp/org/org-clock.el (org-clock-resolve): Replace (floor (/ X 60)) with (floor X 60). --- lisp/org/org-clock.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index b803d0fe874..43f7681d684 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el @@ -1207,9 +1207,9 @@ to be CLOCKED OUT.")))) (read-number "Keep how many minutes: " default)) (and (memq ch '(?t ?T)) (floor - (/ (float-time - (time-subtract (org-read-date t t) last-valid)) - 60))))) + (float-time + (time-subtract (org-read-date t t) last-valid)) + 60)))) (gotback (and (memq ch '(?g ?G)) (read-number "Got back how many minutes ago: " default))) From 2f699717145c1630cc0c7f81ab129415ad042f75 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 5 Jun 2026 18:59:25 -0700 Subject: [PATCH 120/125] mpc-last-seek-time and mpc--faster are no longer used * lisp/mpc.el (mpc-last-seek-time, mpc--faster): Add a FIXME; should they be removed? --- lisp/mpc.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/mpc.el b/lisp/mpc.el index 4b2aa7ac647..1d2f38a97dc 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -2570,6 +2570,9 @@ If stopped, start playback." (t (mpc-proc-cmd "previous"))) (mpc-status-refresh))) +;; FIXME - mpc-last-seek-time and mpc--faster are no longer used; +;; remove them? + (defvar mpc-last-seek-time '(0 . 0)) (defun mpc--faster (event speedup step) From 916572f6e0ab3e36f7098b6d9b5ff19f87240da4 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sat, 6 Jun 2026 11:38:04 +0800 Subject: [PATCH 121/125] Fix the Android build * configure.ac: Don't test for libgccjit.h if a preceding test have already concluded that native compilation is unavailable. --- configure.ac | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index d2967210bc3..cfa238e254c 100644 --- a/configure.ac +++ b/configure.ac @@ -5271,12 +5271,14 @@ if test "${with_native_compilation}" != "no"; then else libgccjit_not_found_err fi]) - AC_CHECK_HEADERS([libgccjit.h], [], - [if test "${with_native_compilation}" = "default"; then + # `libgcc_not_found' may set `with_native_compilation' to `no'. + AS_IF([test "$with_native_compilation" != "no"], + [AC_CHECK_HEADERS([libgccjit.h], [], + [if test "${with_native_compilation}" = "default"; then libgccjit_dev_not_found else libgccjit_dev_not_found_err - fi]) + fi])]) if test "${with_native_compilation}" != "no"; then # Check if libgccjit really works. AC_RUN_IFELSE([libgccjit_smoke_test], [], From a21e93b7e236d64931a240254d31178011a7b01e Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sat, 6 Jun 2026 11:38:49 +0800 Subject: [PATCH 122/125] ; * doc/lispref/compile.texi (Speed of Byte-Code): Fix typo. --- doc/lispref/compile.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi index e72d78928c3..d0a0285f9f1 100644 --- a/doc/lispref/compile.texi +++ b/doc/lispref/compile.texi @@ -71,7 +71,7 @@ Here is an example: @group (silly-loop 100000000) @result{} 0.374873305 -end group +@end group @end example In this example, the interpreted code was about six times slower From cff9c8bc001e9ebd7b9cb54b981ddc675726c9a5 Mon Sep 17 00:00:00 2001 From: Augusto Stoffel Date: Thu, 28 May 2026 11:43:59 +0200 Subject: [PATCH 123/125] Improve prompting for mail sending by by 'report-emacs-bug' * lisp/mail/emacsbug.el (report-emacs-bug-hook): Don't ask about mail sending options if 'message-server-alist' is set. (Bug#81176) --- lisp/mail/emacsbug.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index f4a032c647d..d69fd106e5c 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el @@ -473,6 +473,7 @@ and send the mail again%s." ;; questions about From header validity if the user is going to ;; use mailclient, anyway. (when (or (and (derived-mode-p 'message-mode) + (not message-server-alist) (eq (message-default-send-mail-function) 'sendmail-query-once)) (and (not (derived-mode-p 'message-mode)) (eq send-mail-function 'sendmail-query-once))) From e33e9f7e85a992b0b8df7677959ff07814c876a2 Mon Sep 17 00:00:00 2001 From: Andrea Alberti Date: Sun, 31 May 2026 23:11:02 +0200 Subject: [PATCH 124/125] Document 'margin' face as base for margin display strings (Bug#80693) * doc/lispref/display.texi (Displaying Faces): Note that the underlying-text rule does not apply to strings displayed in the display margins, and reword the margin-face bullet to describe 'margin' as the base. (Basic Faces): Note that the 'margin' face also provides the base attributes for strings displayed in the margins. (Display Margins): Drop a sentence that restated the preceding one about unspecified attributes inheriting from 'margin'. * etc/NEWS: Document the change for margin strings. Suggested by F. Jason Park . --- doc/lispref/display.texi | 24 ++++++++++++------------ etc/NEWS | 6 ++++++ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 09022883f71..263addd5a41 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -3535,13 +3535,14 @@ contain a @code{face} or @code{mouse-face} property, or these properties leave some face attributes undefined, but the buffer text affected by the overlay/display property does define a face or those attributes, Emacs applies the face attributes of the ``underlying'' -buffer text. Note that this is so even if the overlay or display -string is displayed in the display margins (@pxref{Display Margins}). +buffer text. This does not apply to strings displayed in the display +margins, which use the @code{margin} face as the base instead +(@pxref{Display Margins}). @item -If the text is to be shown in the display margins, and any given -attribute has not been specified during the preceding steps, Emacs -applies the attribute of the @code{margin} face. +If the text is to be shown in the display margins, Emacs uses the +@code{margin} face as the base, so any attribute not specified by the +string's own face is taken from @code{margin}. @item If any given attribute has not been specified during the preceding @@ -3825,7 +3826,9 @@ The basic face used for the text cursor. @item margin The basic face used for window margins, both on the left and on the right. It is commonly used to customize the background of the empty -areas of the margins. It inherits from the @code{default} face. +areas of the margins, and it also provides the base attributes for +strings displayed in the margins (@pxref{Display Margins}). It +inherits from the @code{default} face. @item mouse The basic face used for displaying mouse-sensitive text when the mouse @@ -5921,12 +5924,9 @@ the before-string. Note that if the string to be displayed in the margin doesn't fully specify its face, the nonspecified attributes are inherited from the -@code{margin} face (@pxref{Basic Faces}). The face merging mechanism -ensures that the margin background remains consistent when margin -annotations specify only a foreground color. If you want a margin -string to have a specific appearance independent of the @code{margin} -face, make sure the string has a face specifying all required -attributes. +@code{margin} face (@pxref{Basic Faces}). If you want a margin string +to have a specific appearance independent of the @code{margin} face, +make sure the string has a face specifying all required attributes. Before the display margins can display anything, you must give them a nonzero width. The usual way to do that is to set these diff --git a/etc/NEWS b/etc/NEWS index 4c552389a8a..55b06a1cf93 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -95,6 +95,12 @@ left and right margin areas, which are used by various packages for per-line annotations. Its background defaults to the frame default, so existing behavior is unchanged for users who do not customize it. +Margin strings that do not fully specify their face now inherit the +unspecified attributes from the 'margin' face. If your code relied on +the face of the underlying buffer text to specify the face attributes of +strings displayed in the margin, you must now set their face on the margin +string itself via 'propertize'. + +++ ** 'prettify-symbols-mode' attempts to ignore undisplayable characters. Previously, such characters would be rendered as, e.g., white boxes. From a24b081602117de9853de342634c55780abffee4 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 6 Jun 2026 12:06:42 +0300 Subject: [PATCH 125/125] ; Fix last change * etc/NEWS: * doc/lispref/frames.texi (Font and Color Parameters): * doc/lispref/display.texi (Displaying Faces, Basic Faces): Improve indexing of faces and wording of the description of the 'margin' face and its implications. --- doc/lispref/display.texi | 25 ++++++++++++++++++++++--- doc/lispref/frames.texi | 3 +-- etc/NEWS | 14 ++++++++------ 3 files changed, 31 insertions(+), 11 deletions(-) diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 263addd5a41..49b09f6583d 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -3527,6 +3527,7 @@ non-selected window, Emacs applies the @code{mode-line-inactive} face. For a header line, Emacs applies the @code{header-line} face. For a tab line, Emacs applies the @code{tab-line} face. +@cindex @code{margin} face, and face merging @item If the text comes from an overlay string via @code{before-string} or @code{after-string} properties (@pxref{Overlay Properties}), or from a @@ -3535,14 +3536,14 @@ contain a @code{face} or @code{mouse-face} property, or these properties leave some face attributes undefined, but the buffer text affected by the overlay/display property does define a face or those attributes, Emacs applies the face attributes of the ``underlying'' -buffer text. This does not apply to strings displayed in the display -margins, which use the @code{margin} face as the base instead +buffer text. However, this does not apply to strings displayed in the +display margins, which use the @code{margin} face as the base instead (@pxref{Display Margins}). @item If the text is to be shown in the display margins, Emacs uses the @code{margin} face as the base, so any attribute not specified by the -string's own face is taken from @code{margin}. +string's own face is taken from the @code{margin} face. @item If any given attribute has not been specified during the preceding @@ -3805,24 +3806,34 @@ The default face, whose attributes are all specified. All other faces implicitly inherit from it: any unspecified attribute defaults to the attribute on this face (@pxref{Face Attributes}). +@vindex mode-line @r{faces} @item mode-line-active @itemx mode-line-inactive @itemx header-line @itemx tab-line Basic faces used for the mode line, header line, and tab line. +@vindex tool-bar @r{face} @item tool-bar +@vindex tab-bar @r{face} @itemx tab-bar +@vindex fringe @r{face} @itemx fringe +@vindex scroll-bar @r{face} @itemx scroll-bar +@vindex window-divider @r{face} @itemx window-divider +@vindex border @r{face} @itemx border +@vindex child-frame-border @r{face} @itemx child-frame-border Basic faces used for the corresponding decorations of GUI frames. +@vindex cursor @r{face} @item cursor The basic face used for the text cursor. +@vindex margin @r{face} @item margin The basic face used for window margins, both on the left and on the right. It is commonly used to customize the background of the empty @@ -3830,6 +3841,7 @@ areas of the margins, and it also provides the base attributes for strings displayed in the margins (@pxref{Display Margins}). It inherits from the @code{default} face. +@vindex mouse @r{face} @item mouse The basic face used for displaying mouse-sensitive text when the mouse pointer is on that text. @@ -3845,6 +3857,7 @@ These have the attributes indicated by their names (e.g., @code{bold} has a bold @code{:weight} attribute), with all other attributes unspecified (and so given by @code{default}). +@vindex shadow @r{face} @item shadow For dimmed-out text. For example, it is used for the ignored part of a filename in the minibuffer (@pxref{Minibuffer File,, @@ -3860,15 +3873,21 @@ For stretches of text that should temporarily stand out. For example, it is commonly assigned to the @code{mouse-face} property for cursor highlighting (@pxref{Special Properties}). +@vindex match @r{face} @item match +@vindex isearch @r{face} @itemx isearch +@vindex lazy-highlight @r{face} @itemx lazy-highlight For text matching (respectively) permanent search matches, interactive search matches, and lazy highlighting other matches than the current interactive one. +@vindex error @r{face} @item error +@vindex warning @r{face} @itemx warning +@vindex success @r{face} @itemx success For text concerning errors, warnings, or successes. For example, these are used for messages in @file{*Compilation*} buffers. diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index c50619a2de0..a3be6cc2bfc 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -2694,10 +2694,9 @@ The color to use for the background of characters. It is equivalent to the @code{:background} attribute of the @code{default} face. @vindex mouse-color@r{, a frame parameter} -@vindex mouse@r{, a face} @item mouse-color The color for the mouse pointer. It is equivalent to the @code{:background} -attribute of the @code{mouse} face. +attribute of the @code{mouse} face (@pxref{Basic Faces}). @vindex cursor-color@r{, a frame parameter} @item cursor-color diff --git a/etc/NEWS b/etc/NEWS index 55b06a1cf93..0aaeb547f06 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -93,13 +93,15 @@ below the line, which allows for vertically centering text. A new basic face 'margin' is used by default for text displayed in the left and right margin areas, which are used by various packages for per-line annotations. Its background defaults to the frame default, so -existing behavior is unchanged for users who do not customize it. +existing behavior is unchanged for users who do not customize this new +face. -Margin strings that do not fully specify their face now inherit the -unspecified attributes from the 'margin' face. If your code relied on -the face of the underlying buffer text to specify the face attributes of -strings displayed in the margin, you must now set their face on the margin -string itself via 'propertize'. +Display strings shown in the margins now inherit the unspecified face +attributes from the 'margin' face, if the string itself does not fully +specify its face. If your code relied on the face of the underlying +buffer text to serve as default for the unspecified face attributes of +strings displayed in the margin, you must now set those face attributes +in the margin string itself via 'propertize'. +++ ** 'prettify-symbols-mode' attempts to ignore undisplayable characters.