From b5158bd191422e46273c4d9412f2bf097e2da2e0 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 10 Dec 2024 16:26:31 -0500 Subject: [PATCH 01/22] elisp-mode.el: Disable Flymake byte-compile backend in untrusted files To address serious security issues (CVE-2024-53920), disable `elisp-flymake-byte-compile` except in those files explicitly specified as "trusted". For that introduce a new custom var `trusted-files` and new function `trusted-content-p`. While at it, similarly skip the implicit macroexpansion done during completion if the current file is not trusted. * lisp/files.el (trusted-files): New variable. (trusted-content-p): New function. * lisp/progmodes/elisp-mode.el (elisp--safe-macroexpand-all): New function, extracted from `elisp--local-variables`. Use `trusted-content-p`. (elisp--local-variables): Use it. (elisp-flymake-byte-compile): Disable according to `trusted-content-p`. --- etc/NEWS | 14 +++++++++ lisp/files.el | 49 ++++++++++++++++++++++++++++++++ lisp/progmodes/elisp-mode.el | 55 +++++++++++++++++++++++++----------- 3 files changed, 101 insertions(+), 17 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 3d691cfac40..a9c8f6c4801 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -199,6 +199,14 @@ see the variable 'url-request-extra-headers'. * Changes in Emacs 30.1 +** New variable 'trusted-files' to allow potentially dangerous features. +This variable lists those files and directories whose content Emacs should +consider as sufficiently trusted to run any part of the code contained +therein even without any explicit user request. +For example, Flymake's backend for Emacs Lisp consults this variable +and disables itself with an "untrusted content" warning if the file +is not listed. + --- ** Emacs now supports Unicode Standard version 15.1. @@ -1859,6 +1867,12 @@ In the past they included a terminating newline in most cases but not all. ** Emacs Lisp mode +*** 'elisp-flymake-byte-compile' is disabled for untrusted files. +For security reasons, this backend can be used only in those files +specified as trusted according to 'trusted-files' and emits an +"untrusted content" warning otherwise. +This fixes CVE-2024-53920. + --- *** ',@' now has 'prefix' syntax. Previously, the '@' character, which normally has 'symbol' syntax, diff --git a/lisp/files.el b/lisp/files.el index 63a08ce5b22..5d9e6440f5b 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -714,6 +714,55 @@ buffer contents as untrusted. This variable might be subject to change without notice.") (put 'untrusted-content 'permanent-local t) +(defcustom trusted-files nil + "List of files and directories whose content we trust. +Be extra careful here since trusting means that Emacs might execute the +code contained within those files and directories without an explicit +request by the user. +One important case when this might happen is when `flymake-mode' is +enabled (for example, when it is added to a mode hook). +Each element of the list should be a string: +- If it ends in \"/\", it is considered as a directory name and means that + Emacs should trust all the files whose name has this directory as a prefix. +- else it is considered as a file name. +Use abbreviated file names. For example, an entry \"~/mycode\" means +that Emacs will trust all the files in your directory \"mycode\". +This variable can also be set to `:all', in which case Emacs will trust +all files, which opens a gaping security hole." + :type '(choice (repeat :tag "List" file) + (const :tag "Trust everything (DANGEROUS!)" :all)) + :version "30.1") +(put 'trusted-files 'risky-local-variable t) + +(defun trusted-content-p () + "Return non-nil if we trust the contents of the current buffer. +Here, \"trust\" means that we are willing to run code found inside of it. +See also `trusted-files'." + ;; We compare with `buffer-file-truename' i.s.o `buffer-file-name' + ;; to try and avoid marking as trusted a file that's merely accessed + ;; via a symlink that happens to be inside a trusted dir. + (and (not untrusted-content) + buffer-file-truename + (with-demoted-errors "trusted-content-p: %S" + (let ((exists (file-exists-p buffer-file-truename))) + (or + (eq trusted-files :all) + ;; We can't avoid trusting the user's init file. + (if (and exists user-init-file) + (file-equal-p buffer-file-truename user-init-file) + (equal buffer-file-truename user-init-file)) + (let ((file (abbreviate-file-name buffer-file-truename)) + (trusted nil)) + (dolist (tf trusted-files) + (when (or (if exists (file-equal-p tf file) (equal tf file)) + ;; We don't use `file-in-directory-p' here, because + ;; we want to err on the conservative side: "guilty + ;; until proven innocent". + (and (string-suffix-p "/" tf) + (string-prefix-p tf file))) + (setq trusted t))) + trusted)))))) + ;; This is an odd variable IMO. ;; You might wonder why it is needed, when we could just do: ;; (setq-local enable-local-variables nil) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 9bf6f9217c8..ab79082d1b2 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -448,6 +448,34 @@ be used instead. This is used to try and avoid the most egregious problems linked to the use of `macroexpand-all' as a way to find the \"underlying raw code\".") +(defvar elisp--macroexpand-untrusted-warning t) + +(defun elisp--safe-macroexpand-all (sexp) + (if (not (trusted-content-p)) + ;; FIXME: We should try and do better here, either using a notion + ;; of "safe" macros, or with `bwrap', or ... + (progn + (when elisp--macroexpand-untrusted-warning + (setq-local elisp--macroexpand-untrusted-warning nil) ;Don't spam! + (message "Completion of local vars is disabled in %s (untrusted content)" + (buffer-name))) + sexp) + (let ((macroexpand-advice + (lambda (expander form &rest args) + (condition-case err + (apply expander form args) + (error + (message "Ignoring macroexpansion error: %S" err) form))))) + (unwind-protect + ;; Silence any macro expansion errors when + ;; attempting completion at point (bug#58148). + (let ((inhibit-message t) + (macroexp-inhibit-compiler-macros t) + (warning-minimum-log-level :emergency)) + (advice-add 'macroexpand-1 :around macroexpand-advice) + (macroexpand-all sexp elisp--local-macroenv)) + (advice-remove 'macroexpand-1 macroexpand-advice))))) + (defun elisp--local-variables () "Return a list of locally let-bound variables at point." (save-excursion @@ -463,23 +491,8 @@ use of `macroexpand-all' as a way to find the \"underlying raw code\".") (car (read-from-string (concat txt "elisp--witness--lisp" closer))) ((invalid-read-syntax end-of-file) nil))) - (macroexpand-advice - (lambda (expander form &rest args) - (condition-case err - (apply expander form args) - (error - (message "Ignoring macroexpansion error: %S" err) form)))) - (sexp - (unwind-protect - ;; Silence any macro expansion errors when - ;; attempting completion at point (bug#58148). - (let ((inhibit-message t) - (macroexp-inhibit-compiler-macros t) - (warning-minimum-log-level :emergency)) - (advice-add 'macroexpand-1 :around macroexpand-advice) - (macroexpand-all sexp elisp--local-macroenv)) - (advice-remove 'macroexpand-1 macroexpand-advice))) - (vars (elisp--local-variables-1 nil sexp))) + (vars (elisp--local-variables-1 + nil (elisp--safe-macroexpand-all sexp)))) (delq nil (mapcar (lambda (var) (and (symbolp var) @@ -2188,6 +2201,14 @@ directory of the buffer being compiled, and nothing else.") "A Flymake backend for elisp byte compilation. Spawn an Emacs process that byte-compiles a file representing the current buffer state and calls REPORT-FN when done." + (unless (trusted-content-p) + ;; FIXME: Use `bwrap' and friends to compile untrusted content. + ;; FIXME: We emit a message *and* signal an error, because by default + ;; Flymake doesn't display the warning it puts into "*flmake log*". + (message "Disabling elisp-flymake-byte-compile in %s (untrusted content)" + (buffer-name)) + (error "Disabling elisp-flymake-byte-compile in %s (untrusted content)" + (buffer-name))) (when elisp-flymake--byte-compile-process (when (process-live-p elisp-flymake--byte-compile-process) (kill-process elisp-flymake--byte-compile-process))) From 4c68846223b91e50e4a15fbc59d2238605ce2a57 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 15 Dec 2024 07:52:40 +0200 Subject: [PATCH 02/22] Update documentation of 'etags' regexps * doc/emacs/maintaining.texi (Etags Regexps): * doc/man/etags.1: Say that shy groups are not supported (bug#74861). --- doc/emacs/maintaining.texi | 3 ++- doc/man/etags.1 | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index a632ffda4ab..adda923af7c 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -3094,7 +3094,8 @@ and all the C character escape sequences are supported: @samp{\a} for bell, @samp{\b} for back space, @samp{\e} for escape, @samp{\f} for formfeed, @samp{\n} for newline, @samp{\r} for carriage return, @samp{\t} for tab, and @samp{\v} for vertical tab. In addition, -@samp{\d} stands for the @code{DEL} character. +@samp{\d} stands for the @code{DEL} character. Shy groups are not +supported by @command{etags}. Ideally, @var{tagregexp} should not match more characters than are needed to recognize what you want to tag. If the syntax requires you diff --git a/doc/man/etags.1 b/doc/man/etags.1 index 9b8df50a6bb..12c2afc88b2 100644 --- a/doc/man/etags.1 +++ b/doc/man/etags.1 @@ -1,5 +1,5 @@ .\" See section COPYING for copyright and redistribution information. -.TH ETAGS 1 "2022-06-10" "GNU Tools" "GNU" +.TH ETAGS 1 "2024-12-15" "GNU Tools" "GNU" .de BP .sp .ti -.2i @@ -185,10 +185,10 @@ useless characters. If the match is such that more characters than needed are unavoidably matched by \fItagregexp\fP, it may be useful to add a \fInameregexp\fP, to narrow down the tag scope. \fBctags\fP ignores regexps without a \fInameregexp\fP. The syntax of regexps is -the same as in emacs. The following character escape sequences are -supported: \\a, \\b, \\d, \\e, \\f, \\n, \\r, \\t, \\v, which -respectively stand for the ASCII characters BEL, BS, DEL, ESC, FF, NL, -CR, TAB, VT. +the same as in emacs, except that shy groups are not supported. +The following character escape sequences are supported: +\\a, \\b, \\d, \\e, \\f, \\n, \\r, \\t, \\v, which respectively +stand for the ASCII characters BEL, BS, DEL, ESC, FF, NL, CR, TAB, VT. .br The \fImodifiers\fP are a sequence of 0 or more characters among \fIi\fP, which means to ignore case when matching; \fIm\fP, which means From 856a58e28279139cfd6503917954fd75fcdd7e78 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 15 Dec 2024 00:16:10 -0700 Subject: [PATCH 03/22] Update documentation of 'etags' regexps some more * doc/emacs/maintaining.texi (Etags Regexps): * doc/man/etags.1: Give more details about what's not supported. --- doc/emacs/maintaining.texi | 8 ++++++-- doc/man/etags.1 | 5 ++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index adda923af7c..bc7a47482a8 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -3094,8 +3094,12 @@ and all the C character escape sequences are supported: @samp{\a} for bell, @samp{\b} for back space, @samp{\e} for escape, @samp{\f} for formfeed, @samp{\n} for newline, @samp{\r} for carriage return, @samp{\t} for tab, and @samp{\v} for vertical tab. In addition, -@samp{\d} stands for the @code{DEL} character. Shy groups are not -supported by @command{etags}. +@samp{\d} stands for the @code{DEL} character. Otherwise, +the regular expression syntax is the same as Emacs +except that backslash escapes are the same +as GNU grep (which means, for example, that shy groups are not supported), +and @samp{[:ascii:]}, @samp{[:multibyte:]}, @samp{[:nonascii:]}, +@samp{[:word:]}, and @samp{[:unibyte:]} are not supported. Ideally, @var{tagregexp} should not match more characters than are needed to recognize what you want to tag. If the syntax requires you diff --git a/doc/man/etags.1 b/doc/man/etags.1 index 12c2afc88b2..d26e2445e44 100644 --- a/doc/man/etags.1 +++ b/doc/man/etags.1 @@ -185,7 +185,10 @@ useless characters. If the match is such that more characters than needed are unavoidably matched by \fItagregexp\fP, it may be useful to add a \fInameregexp\fP, to narrow down the tag scope. \fBctags\fP ignores regexps without a \fInameregexp\fP. The syntax of regexps is -the same as in emacs, except that shy groups are not supported. +the same as in Emacs, except that backslash escapes are the same +as GNU grep (which means, for example, that shy groups are not supported), +and \fB[:ascii:]\fP, \fB[:multibyte:]\fP, \fB[:nonascii:]\fP, +\fB[:word:]\fP, and \fB[:unibyte:]\fP are not supported. The following character escape sequences are supported: \\a, \\b, \\d, \\e, \\f, \\n, \\r, \\t, \\v, which respectively stand for the ASCII characters BEL, BS, DEL, ESC, FF, NL, CR, TAB, VT. From 5c6dbc65f3642b98d3e1ff3a901c1580353783df Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 15 Dec 2024 09:45:58 +0200 Subject: [PATCH 04/22] ; * doc/lispref/frames.texi (Multiple Terminals): Add indexing. --- doc/lispref/frames.texi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 996399fb19a..52ab8371f71 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -380,6 +380,9 @@ than one physical monitor. You can use the functions @code{display-monitor-attributes-list} and @code{frame-monitor-attributes} to obtain information about such setups. +@cindex display geometry +@cindex monitor geometry +@cindex geometry of display monitor @defun display-monitor-attributes-list &optional display This function returns a list of physical monitor attributes on @var{display}, which can be a display name (a string), a terminal, or From 69b16e5c63840479270d32f58daea923fe725b90 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 15 Dec 2024 09:24:40 +0100 Subject: [PATCH 05/22] ; * etc/NEWS: Fix typos. --- etc/NEWS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index a9c8f6c4801..c5f1123ebc1 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -199,11 +199,11 @@ see the variable 'url-request-extra-headers'. * Changes in Emacs 30.1 -** New variable 'trusted-files' to allow potentially dangerous features. +** New user option 'trusted-files' to allow potentially dangerous features. This variable lists those files and directories whose content Emacs should consider as sufficiently trusted to run any part of the code contained therein even without any explicit user request. -For example, Flymake's backend for Emacs Lisp consults this variable +For example, Flymake's backend for Emacs Lisp consults this option and disables itself with an "untrusted content" warning if the file is not listed. From 8b6c6cffd1f772301e89353de5e057835af18a30 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 15 Dec 2024 17:05:55 -0500 Subject: [PATCH 06/22] trusted-content: Adjust the last patch based on preliminary feedback * lisp/files.el (trusted-content): Rename from `trusted-files`. Update all references. * lisp/progmodes/elisp-mode.el (lisp-interaction-mode): * lisp/ielm.el (inferior-emacs-lisp-mode): * lisp/simple.el (read--expression): Set `trusted-content` since these buffers contain code that the user presumably intends to run anyway. (elisp--safe-macroexpand-all): Make the warning more discreet. --- etc/NEWS | 4 ++-- lisp/files.el | 10 +++++----- lisp/ielm.el | 1 + lisp/progmodes/elisp-mode.el | 8 +++++--- lisp/simple.el | 1 + 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index c5f1123ebc1..8e92cef2bcb 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -199,7 +199,7 @@ see the variable 'url-request-extra-headers'. * Changes in Emacs 30.1 -** New user option 'trusted-files' to allow potentially dangerous features. +** New user option 'trusted-content' to allow potentially dangerous features. This variable lists those files and directories whose content Emacs should consider as sufficiently trusted to run any part of the code contained therein even without any explicit user request. @@ -1869,7 +1869,7 @@ In the past they included a terminating newline in most cases but not all. *** 'elisp-flymake-byte-compile' is disabled for untrusted files. For security reasons, this backend can be used only in those files -specified as trusted according to 'trusted-files' and emits an +specified as trusted according to 'trusted-content' and emits an "untrusted content" warning otherwise. This fixes CVE-2024-53920. diff --git a/lisp/files.el b/lisp/files.el index 5d9e6440f5b..e7399ba7cda 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -714,7 +714,7 @@ buffer contents as untrusted. This variable might be subject to change without notice.") (put 'untrusted-content 'permanent-local t) -(defcustom trusted-files nil +(defcustom trusted-content nil "List of files and directories whose content we trust. Be extra careful here since trusting means that Emacs might execute the code contained within those files and directories without an explicit @@ -732,12 +732,12 @@ all files, which opens a gaping security hole." :type '(choice (repeat :tag "List" file) (const :tag "Trust everything (DANGEROUS!)" :all)) :version "30.1") -(put 'trusted-files 'risky-local-variable t) +(put 'trusted-content 'risky-local-variable t) (defun trusted-content-p () "Return non-nil if we trust the contents of the current buffer. Here, \"trust\" means that we are willing to run code found inside of it. -See also `trusted-files'." +See also `trusted-content'." ;; We compare with `buffer-file-truename' i.s.o `buffer-file-name' ;; to try and avoid marking as trusted a file that's merely accessed ;; via a symlink that happens to be inside a trusted dir. @@ -746,14 +746,14 @@ See also `trusted-files'." (with-demoted-errors "trusted-content-p: %S" (let ((exists (file-exists-p buffer-file-truename))) (or - (eq trusted-files :all) + (eq trusted-content :all) ;; We can't avoid trusting the user's init file. (if (and exists user-init-file) (file-equal-p buffer-file-truename user-init-file) (equal buffer-file-truename user-init-file)) (let ((file (abbreviate-file-name buffer-file-truename)) (trusted nil)) - (dolist (tf trusted-files) + (dolist (tf trusted-content) (when (or (if exists (file-equal-p tf file) (equal tf file)) ;; We don't use `file-in-directory-p' here, because ;; we want to err on the conservative side: "guilty diff --git a/lisp/ielm.el b/lisp/ielm.el index e583e0fe32c..7511d4b02ae 100644 --- a/lisp/ielm.el +++ b/lisp/ielm.el @@ -580,6 +580,7 @@ Customized bindings may be defined in `ielm-map', which currently contains: ielm-fontify-input-enable (comint-fontify-input-mode)) + (setq-local trusted-content :all) (setq comint-prompt-regexp (concat "^" (regexp-quote ielm-prompt))) (setq-local paragraph-separate "\\'") (setq-local paragraph-start comint-prompt-regexp) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index ab79082d1b2..17606352c4a 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -457,8 +457,9 @@ use of `macroexpand-all' as a way to find the \"underlying raw code\".") (progn (when elisp--macroexpand-untrusted-warning (setq-local elisp--macroexpand-untrusted-warning nil) ;Don't spam! - (message "Completion of local vars is disabled in %s (untrusted content)" - (buffer-name))) + (let ((inhibit-message t)) ;Only log. + (message "Completion of local vars is disabled in %s (untrusted content)" + (buffer-name)))) sexp) (let ((macroexpand-advice (lambda (expander form &rest args) @@ -1336,7 +1337,8 @@ Semicolons start comments. \\{lisp-interaction-mode-map}" :abbrev-table nil - (setq-local lexical-binding t)) + (setq-local lexical-binding t) + (setq-local trusted-content :all)) ;;; Emacs Lisp Byte-Code mode diff --git a/lisp/simple.el b/lisp/simple.el index 3054c8ab6a7..088678ba857 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2033,6 +2033,7 @@ function `read-from-minibuffer'." (set-syntax-table emacs-lisp-mode-syntax-table) (add-hook 'completion-at-point-functions #'elisp-completion-at-point nil t) + (setq-local trusted-content :all) (run-hooks 'eval-expression-minibuffer-setup-hook)) (read-from-minibuffer prompt initial-contents read--expression-map t From 55303a6bc0a06d32ec757b6291d40e8f28565946 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 15 Dec 2024 17:08:25 -0500 Subject: [PATCH 07/22] * lisp/org/ox-texinfo.el (org-texinfo-template): Fix Info format (bug#74844) --- lisp/org/ox-texinfo.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org/ox-texinfo.el b/lisp/org/ox-texinfo.el index 6adee9fca3f..8bb07feb81e 100644 --- a/lisp/org/ox-texinfo.el +++ b/lisp/org/ox-texinfo.el @@ -826,9 +826,9 @@ holding export options." ;; `dn' is presumed to be just the DIRNAME part, so generate ;; either `* DIRNAME: (FILENAME).' or `* FILENAME.', whichever ;; is shortest. - ((and dn (not (equal dn file))) + (dn (format "* %s: (%s)." dn (or file dn))) - (t (format "* %s." file))))) + (t (format "* (%s)." file))))) (concat "@dircategory " dircat "\n" "@direntry\n" (let ((dirdesc From 10f976300d03a8cb9a12a5d2548d1b275ac3edcc Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Sun, 15 Dec 2024 21:40:49 -0800 Subject: [PATCH 08/22] ; Add some tree-sitter thing content to the manual * doc/lispref/parsing.texi (User-defined Things): List "builtin" things. --- doc/lispref/parsing.texi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/lispref/parsing.texi b/doc/lispref/parsing.texi index f8bf0b20a7c..fbecbc69276 100644 --- a/doc/lispref/parsing.texi +++ b/doc/lispref/parsing.texi @@ -1590,6 +1590,16 @@ Note that this example is modified for didactic purposes, and isn't exactly how C and C@t{++} modes define things. @end defvar +Emacs builtin functions already make use some thing definitions. +Command @code{treesit-forward-sexp} uses the @code{sexp} definition if +major mode defines it; @code{treesit-forward-sentence} uses the +@code{sentence} definition. Defun movement functions like +@code{treesit-end-of-defun} uses the @code{defun} definition +(@code{defun} definition is overridden by +@var{treesit-defun-type-regexp} for backward compatibility). Major +modes can also define @code{comment}, @code{string}, @code{text} +(generally comments and strings). + The rest of this section lists a few functions that take advantage of the thing definitions. Besides the functions below, some other functions listed elsewhere also utilize the thing feature, e.g., From c14c489571988f4fede84c69254804a89b314d26 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Mon, 16 Dec 2024 13:25:24 +0100 Subject: [PATCH 09/22] ; * lisp/net/nsm.el (nsm-trust-local-network): Fix typo. --- lisp/net/nsm.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/net/nsm.el b/lisp/net/nsm.el index ab655dbb13b..3d0eacf4eb2 100644 --- a/lisp/net/nsm.el +++ b/lisp/net/nsm.el @@ -65,10 +65,10 @@ checked and warned against." The default suite of TLS checks in NSM is designed to follow the most current security best practices. Under some situations, -such as attempting to connect to an email server that do not +such as attempting to connect to an email server that does not follow these practices inside a school or corporate network, NSM may produce warnings for such occasions. Setting this option to -a non-nil value, or a zero-argument function that returns non-nil +a non-nil value, or a zero-argument function that returns non-nil, tells NSM to skip checking for potential TLS vulnerabilities when connecting to hosts on a local network. From 4b685bc4fcd060aab287704c2b00ab9feac4abb3 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Mon, 16 Dec 2024 13:35:28 +0100 Subject: [PATCH 10/22] ; * src/process.c (Fnetwork_interface_list): Fix typo. --- src/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/process.c b/src/process.c index 58ce0f3e6ed..b10020bdae4 100644 --- a/src/process.c +++ b/src/process.c @@ -4605,7 +4605,7 @@ network_interface_info (Lisp_Object ifname) DEFUN ("network-interface-list", Fnetwork_interface_list, Snetwork_interface_list, 0, 2, 0, doc: /* Return an alist of all network interfaces and their network address. -Each element is cons of the form (IFNAME . IP) where IFNAME is a +Each element is a cons of the form (IFNAME . IP) where IFNAME is a string containing the interface name, and IP is the network address in internal format; see the description of ADDRESS in `make-network-process'. The interface name is not guaranteed to be From b9dc337ea7416ee7ee4d873a91f6d6d9f109c04c Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 16 Dec 2024 09:27:01 -0500 Subject: [PATCH 11/22] * lisp/files.el (trusted-content-p): Make `:all` work in non-file buffers --- lisp/files.el | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index e7399ba7cda..0bc787aca31 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -742,26 +742,28 @@ See also `trusted-content'." ;; to try and avoid marking as trusted a file that's merely accessed ;; via a symlink that happens to be inside a trusted dir. (and (not untrusted-content) - buffer-file-truename - (with-demoted-errors "trusted-content-p: %S" - (let ((exists (file-exists-p buffer-file-truename))) - (or - (eq trusted-content :all) - ;; We can't avoid trusting the user's init file. - (if (and exists user-init-file) - (file-equal-p buffer-file-truename user-init-file) - (equal buffer-file-truename user-init-file)) - (let ((file (abbreviate-file-name buffer-file-truename)) - (trusted nil)) - (dolist (tf trusted-content) - (when (or (if exists (file-equal-p tf file) (equal tf file)) - ;; We don't use `file-in-directory-p' here, because - ;; we want to err on the conservative side: "guilty - ;; until proven innocent". - (and (string-suffix-p "/" tf) - (string-prefix-p tf file))) - (setq trusted t))) - trusted)))))) + (or + (eq trusted-content :all) + (and + buffer-file-truename + (with-demoted-errors "trusted-content-p: %S" + (let ((exists (file-exists-p buffer-file-truename))) + (or + ;; We can't avoid trusting the user's init file. + (if (and exists user-init-file) + (file-equal-p buffer-file-truename user-init-file) + (equal buffer-file-truename user-init-file)) + (let ((file (abbreviate-file-name buffer-file-truename)) + (trusted nil)) + (dolist (tf trusted-content) + (when (or (if exists (file-equal-p tf file) (equal tf file)) + ;; We don't use `file-in-directory-p' here, because + ;; we want to err on the conservative side: "guilty + ;; until proven innocent". + (and (string-suffix-p "/" tf) + (string-prefix-p tf file))) + (setq trusted t))) + trusted)))))))) ;; This is an odd variable IMO. ;; You might wonder why it is needed, when we could just do: From 9fd96e2ab95d19bb7df7fb698a497d56f3cdb3af Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 16 Dec 2024 22:17:36 +0100 Subject: [PATCH 12/22] Improve reb-change-syntax docstring * lisp/emacs-lisp/re-builder.el (reb-change-syntax): Improve docstring. --- lisp/emacs-lisp/re-builder.el | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el index c5307f70d08..1fc6c872332 100644 --- a/lisp/emacs-lisp/re-builder.el +++ b/lisp/emacs-lisp/re-builder.el @@ -485,7 +485,22 @@ If the optional PAUSE is non-nil then pause at the end in any case." (defun reb-change-syntax (&optional syntax) "Change the syntax used by the RE Builder. -Optional argument SYNTAX must be specified if called non-interactively." +Interactively, prompt for SYNTAX. + +Re-Builder currently understands three different forms of input, namely +`read', `string', and `rx' syntax: + + 1. The `string' syntax is the same one used by functions such as + `query-replace-regexp' (\\[query-replace-regexp]). There is no need to escape + backslashes and double quotes. + + 2. The `read' syntax is the same syntax used as when specifying the + regexp as a string in a Lisp program. + + 3. Finally, the `rx' syntax allows editing of symbolic regular + expressions supported by the package of the same name. + +When called from Lisp, SYNTAX must be specified." (interactive (list (intern (completing-read From 92041e15f4ad99ebebc40b082e40367a3aada7ba Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Tue, 17 Dec 2024 03:10:42 +0100 Subject: [PATCH 13/22] Minor doc fix for url-handler-regexp * lisp/url/url-handlers.el (url-handler-regexp): Remove mention of obsolete internal protocol "about" (i.e. url-about.el). Reflow. --- lisp/url/url-handlers.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el index 9edc7865a74..863863c3696 100644 --- a/lisp/url/url-handlers.el +++ b/lisp/url/url-handlers.el @@ -1,6 +1,6 @@ ;;; url-handlers.el --- file-name-handler stuff for URL loading -*- lexical-binding:t -*- -;; Copyright (C) 1996-1999, 2004-2024 Free Software Foundation, Inc. +;; Copyright (C) 1996-2024 Free Software Foundation, Inc. ;; Keywords: comm, data, processes, hypermedia @@ -124,13 +124,13 @@ that URL in a buffer." (defcustom url-handler-regexp "\\`\\(?:https?\\|ftp\\|file\\|nfs\\|ssh\\|scp\\|rsync\\|telnet\\)://" "Regular expression for URLs handled by `url-handler-mode'. -When URL Handler mode is enabled, this regular expression is -added to `file-name-handler-alist'. +When URL Handler mode is enabled, this regular expression is added to +`file-name-handler-alist'. -Some valid URL protocols just do not make sense to visit -interactively (about, data, info, irc, mailto, etc.). This -regular expression avoids conflicts with local files that look -like URLs (Gnus is particularly bad at this)." +Some valid URL protocols just do not make sense to visit interactively +(data, info, irc, mailto, etc.). This regular expression avoids +conflicts with local files that look like URLs (Gnus is particularly bad +at this)." :group 'url :type 'regexp :version "25.1" From 5686bb5b428c4a30a8b6d485f364adc7ccf31e73 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Tue, 17 Dec 2024 04:38:18 +0100 Subject: [PATCH 14/22] Improve browse-url-android-share docstring * lisp/net/browse-url.el (browse-url-android-share): Clarify that the option only applies to Android systems. --- lisp/net/browse-url.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 1a51d2bdaac..bd40dcb7727 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -1320,7 +1320,7 @@ Default to the URL around or before point." 'browse-url-browser-kind 'external) (defcustom browse-url-android-share nil - "If non-nil, share URLs instead of opening them. + "If non-nil, share URLs on Android systems instead of opening them. When non-nil, `browse-url-default-android-browser' will try to share the URL being browsed through programs such as mail clients and instant messengers instead of opening it in a web browser." From cde22c020119fd16ddd77c5c4121054c1a9424c5 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Tue, 17 Dec 2024 04:46:36 +0100 Subject: [PATCH 15/22] Move NEWS items from unreleased 28.3 to released 29.1 * etc/NEWS.28: Remove empty sections for 28.3. Move single pertinent item from here... * etc/NEWS.29: ...to here. --- etc/NEWS.28 | 35 ----------------------------------- etc/NEWS.29 | 8 ++++++++ 2 files changed, 8 insertions(+), 35 deletions(-) diff --git a/etc/NEWS.28 b/etc/NEWS.28 index ac65eaa986f..b6bed01ddce 100644 --- a/etc/NEWS.28 +++ b/etc/NEWS.28 @@ -15,41 +15,6 @@ in older Emacs versions. You can narrow news to a specific version by calling 'view-emacs-news' with a prefix argument or by typing 'C-u C-h C-n'. - -* Installation Changes in Emacs 28.3 - - -* Startup Changes in Emacs 28.3 - - -* Changes in Emacs 28.3 - - -* Editing Changes in Emacs 28.3 - - -* Changes in Specialized Modes and Packages in Emacs 28.3 - -** 'native-comp-driver-options' on macOS. -The value of 'native-comp-driver-options' has been changed to contain -"-Wl,-w" to suppress warnings of the form - - ld: warning: -undefined dynamic_lookup may not work with chained fixups - -emitted during native compilation on macOS 12.6 with Xcode 14. - - -* New Modes and Packages in Emacs 28.3 - - -* Incompatible Lisp Changes in Emacs 28.3 - - -* Lisp Changes in Emacs 28.3 - - -* Changes in Emacs 28.3 on Non-Free Operating Systems - * Installation Changes in Emacs 28.2 diff --git a/etc/NEWS.29 b/etc/NEWS.29 index d213c4b8010..52a00ef699a 100644 --- a/etc/NEWS.29 +++ b/etc/NEWS.29 @@ -4361,6 +4361,14 @@ two buttons: "Yes" and "No". *** The 'ns-popup-font-panel' command has been removed. Use the general command 'M-x menu-set-font' instead. +*** 'native-comp-driver-options' on macOS. +The value of 'native-comp-driver-options' has been changed to contain +"-Wl,-w" to suppress warnings of the form + + ld: warning: -undefined dynamic_lookup may not work with chained fixups + +emitted during native compilation on macOS 12.6 with Xcode 14. + ---------------------------------------------------------------------- This file is part of GNU Emacs. From a7905145f70bce9681559ec37fbbe54afd52d913 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 18 Dec 2024 16:22:21 +0200 Subject: [PATCH 16/22] ; * lisp/emacs-lisp/re-builder.el (reb-change-syntax): Fix typo. --- lisp/emacs-lisp/re-builder.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el index 1fc6c872332..92f22e335f7 100644 --- a/lisp/emacs-lisp/re-builder.el +++ b/lisp/emacs-lisp/re-builder.el @@ -494,7 +494,7 @@ Re-Builder currently understands three different forms of input, namely `query-replace-regexp' (\\[query-replace-regexp]). There is no need to escape backslashes and double quotes. - 2. The `read' syntax is the same syntax used as when specifying the + 2. The `read' syntax is the syntax used when specifying the regexp as a string in a Lisp program. 3. Finally, the `rx' syntax allows editing of symbolic regular From c6ce11b2a48a0e6e1a62ae51f30570f3392ee55d Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Wed, 18 Dec 2024 16:00:55 +0100 Subject: [PATCH 17/22] Mention network-interface-list in network-interface-info docstring * src/process.c (Fnetwork_interface_info): Reference 'network-interface-list'. --- src/process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/process.c b/src/process.c index b10020bdae4..64a62b5f016 100644 --- a/src/process.c +++ b/src/process.c @@ -4656,7 +4656,8 @@ where ADDR is the layer 3 address, BCAST is the layer 3 broadcast address, NETMASK is the layer 3 network mask, HWADDR is the layer 2 address, and FLAGS is the current flags of the interface. -Data that is unavailable is returned as nil. */) +Data that is unavailable is returned as nil. Only returns IPv4 layer 3 +addresses, for IPv6 use `network-interface-list'. */) (Lisp_Object ifname) { #if ((defined HAVE_NET_IF_H \ From 8a0c9c234f15a7398d43da154f3463c92f69f9f5 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 18 Dec 2024 19:57:13 +0200 Subject: [PATCH 18/22] Document 'trusted-content * doc/emacs/misc.texi (Host Security): Document 'trusted-content'. * lisp/files.el (trusted-content): Doc fix. * etc/NEWS: Mark its entry as "documented". --- doc/emacs/misc.texi | 33 +++++++++++++++++++++++++++++++++ etc/NEWS | 1 + lisp/files.el | 2 +- 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index d1e8217f579..97a82747bfc 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -277,6 +277,39 @@ trusted and the default checking for these variables is irritating, you can set @code{enable-local-variables} to @code{:all}. @xref{Safe File Variables}. +@cindex trusted files and directories +Loading a file of Emacs Lisp code with @code{load-file} or +@code{load-library} (@pxref{Lisp Libraries}) can execute some of the +Lisp code in the file being loaded, so you should only load Lisp files +whose source you trust. However, some Emacs features can in certain +situations execute Lisp code even without your explicit command or +request. For example, Flymake, the on-the-fly syntax checker for Emacs +(@pxref{Top,,, flymake, GNU Flymake}), if it is enabled, can +automatically execute some of the code in a Lisp file you visit as part +of its syntax-checking job. Similarly, some completion commands +(@pxref{Completion}) in buffers visiting Lisp files sometimes need to +expand Lisp macros for best results. In these cases, just visiting a +Lisp file and performing some editing in it could trigger execution of +Lisp code. If the visited file came from an untrusted source, it could +include dangerous or even malicious code that Emacs would execute in +those situations. + +To protect against this, Emacs disables execution of Lisp code by +Flymake, completion, and some other features, unless the visited file is +@dfn{trusted}. It is up to you to specify which files on your system +should be trusted, by customizing the user option +@code{trusted-content}. + +@defopt trusted-content +The value of this option is @code{nil} by default, which means no file +is trusted. You can customize the variable to be a list of one or more +names of trusted files and directories. A file name that ends in a +slash @file{/} is interpreted as a directory, which means all its files +and subdirectories are also trusted. A special value @code{:all} means +@emph{all} the files and directories on your system should be trusted; +@strong{this is not recommended}, as it opens a gaping security hole. +@end defopt + @xref{Security Considerations,,, elisp, The Emacs Lisp Reference Manual}, for more information about security considerations when using Emacs as part of a larger application. diff --git a/etc/NEWS b/etc/NEWS index 8e92cef2bcb..2c3b78a4e2b 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -199,6 +199,7 @@ see the variable 'url-request-extra-headers'. * Changes in Emacs 30.1 ++++ ** New user option 'trusted-content' to allow potentially dangerous features. This variable lists those files and directories whose content Emacs should consider as sufficiently trusted to run any part of the code contained diff --git a/lisp/files.el b/lisp/files.el index 0bc787aca31..86eff296459 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -725,7 +725,7 @@ Each element of the list should be a string: - If it ends in \"/\", it is considered as a directory name and means that Emacs should trust all the files whose name has this directory as a prefix. - else it is considered as a file name. -Use abbreviated file names. For example, an entry \"~/mycode\" means +Use abbreviated file names. For example, an entry \"~/mycode/\" means that Emacs will trust all the files in your directory \"mycode\". This variable can also be set to `:all', in which case Emacs will trust all files, which opens a gaping security hole." From 5c0f3f5826e5f2e7c6bc29f5407ec984beb43527 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 18 Dec 2024 20:37:37 +0200 Subject: [PATCH 19/22] ; * etc/NEWS: Mark unmarked entries. --- etc/NEWS | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 2c3b78a4e2b..61cb66387bb 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1868,6 +1868,7 @@ In the past they included a terminating newline in most cases but not all. ** Emacs Lisp mode ++++ *** 'elisp-flymake-byte-compile' is disabled for untrusted files. For security reasons, this backend can be used only in those files specified as trusted according to 'trusted-content' and emits an @@ -2039,6 +2040,7 @@ By default it retains the previous behavior: read the contents of Gemfile and act accordingly. But you can also set it to t or nil to skip checking the Gemfile. +--- *** New user option 'ruby-bracketed-args-indent'. When it is set to nil, multiple consecutive open braces/brackets/parens result in only one additional indentation level. Default is t. @@ -2386,6 +2388,7 @@ These hooks were named incorrectly, and so they never actually ran when unloading the corresponding feature. Instead, you should use hooks named after the feature name, like 'esh-mode-unload-hook'. +--- ** User options 'eshell-process-wait-{seconds,milliseconds}' are now obsolete. Instead, use 'eshell-process-wait-time', which supports floating-point values. @@ -2642,6 +2645,7 @@ The new function 'haiku-notifications-notify' provides a subset of the capabilities of the 'notifications-notify' function in a manner analogous to 'w32-notification-notify'. +--- ** New Haiku specific variable 'haiku-pass-control-tab-to-system'. This sets whether Emacs should pass 'C-TAB' on to the system instead of handling it, fixing a problem where window switching would not activate @@ -3088,6 +3092,7 @@ inside 'treesit-language-source-alist', so that calling It may be useful, for example, for the purposes of bisecting a treesitter grammar. ++++ ** New buffer-local variable 'tabulated-list-groups'. It controls display and separate sorting of groups of entries. By default no grouping or sorting is done. @@ -3123,6 +3128,7 @@ this case, would mean repeating the object in the argument list.) When replacing an object with a different one, passing both the new and old objects is still necessary. ++++ ** 'vtable-insert-object' can insert "before" or at an index. The signature of 'vtable-insert-object' has changed and is now: From 1381c6f9591f2851896a41e178a5ccc1a32e7471 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Thu, 19 Dec 2024 00:16:20 +0100 Subject: [PATCH 20/22] * Update authors.el * admin/authors.el (authors-aliases, authors-valid-file-names) (authors-renamed-files-alist): Add entry. --- admin/authors.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/admin/authors.el b/admin/authors.el index 50f3d1ae68d..6142dc6c566 100644 --- a/admin/authors.el +++ b/admin/authors.el @@ -311,7 +311,7 @@ files.") ("Lin Zhou" "georgealbert@qq\\.com") (nil "yan@metatem\\.net") (nil "gnu_lists@halloleo\\.hailmail\\.net") - ) + (nil "^Chu$" "maedaqu@gmail.com")) "Alist of author aliases. Each entry is of the form (REALNAME REGEXP...). @@ -1151,7 +1151,7 @@ AUTHORS file. There are also some more recent manual additions.") "admin/notes/tree-sitter/build-module/batch.sh" "doc/misc/gnus-coding.texi" "gnus-coding.texi" - ) + "doc/misc/org.texi") "File names which are valid, but no longer exist (or cannot be found) in the repository.") @@ -1711,7 +1711,8 @@ in the repository.") ("lisp/emacs-lisp/tcover-unsafep.el" . "test/lisp/emacs-lisp/unsafep-tests.el") ("lisp/vt100-led.el" . "lisp/obsolete/vt100-led.el") ("lisp/mail/metamail.el" . "lisp/obsolete/metamail.el") - ("lisp/sb-image.el" . "lisp/obsolete/sb-image.el")) + ("lisp/sb-image.el" . "lisp/obsolete/sb-image.el") + ("lisp/cedet/semantic/grammar-wy.el" . "lisp/cedet/semantic/grm-wy-boot.el")) "Alist of files which have been renamed during their lifetime. Elements are (OLDNAME . NEWNAME).") From 49adcf30b01a973ef2fb63d01e8142393fc6d926 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Thu, 19 Dec 2024 00:42:28 +0100 Subject: [PATCH 21/22] ; * etc/AUTHORS: Update. --- etc/AUTHORS | 62 +++++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/etc/AUTHORS b/etc/AUTHORS index 3f62ddb8834..03f6b15a1a2 100644 --- a/etc/AUTHORS +++ b/etc/AUTHORS @@ -1737,8 +1737,8 @@ Eli Zaretskii: wrote [bidirectional display in xdisp.c] 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 emacs.c configure.ac text.texi w32term.c - dispnew.c frames.texi w32proc.c files.texi xfaces.c window.c - dispextern.h lisp.h and 1398 other files + dispnew.c frames.texi files.texi w32proc.c xfaces.c window.c + dispextern.h lisp.h and 1400 other files Eliza Velasquez: changed server.el simple.el @@ -1888,9 +1888,10 @@ E Sabof: changed hi-lock.el image-dired.el Eshel Yaron: wrote completion-preview.el and changed eglot.el emoji.el eww.el help-fns.el info.el programs.texi - text-mode.el window.c xdisp.c bookmark.el completion-preview-tests.el - dictionary.el easy-mmode.el eldoc.el emacs.texi eww.texi fixit.texi - frames.texi help-mode.el help.el indent.texi and 14 other files + text-mode.el window.c xdisp.c xref.el bookmark.el + completion-preview-tests.el dictionary.el easy-mmode.el eldoc.el + emacs.texi eww.texi fixit.texi frames.texi help-mode.el help.el + and 14 other files Espen Skoglund: wrote pascal.el @@ -3134,8 +3135,8 @@ Jon K Hellan: wrote utf7.el Joost Diepenmaat: changed org.el -Joost Kremers: changed reftex-toc.el vtable-tests.el vtable.el - vtable.texi +Joost Kremers: changed control.texi reftex-toc.el vtable-tests.el + vtable.el vtable.texi Joram Schrijver: changed eglot.el @@ -3175,7 +3176,7 @@ and changed xterm.c xfns.c keyboard.c screen.c dispnew.c xdisp.c window.c Joseph M. Kelsey: changed fileio.c skeleton.el -Joseph Turner: changed package-vc.el minibuffer.el image.el subr.el +Joseph Turner: changed package-vc.el minibuffer.el subr.el image.el display.texi image-tests.el info.el ispell.el lists.texi package.el package.texi records.texi shortdoc.el shorthands.el subr-tests.el @@ -3654,7 +3655,7 @@ Lasse Rasinen: changed gnus-start.el Lassi Kortela: changed dns-mode.el -Laurence Warne: changed proced.el proced-tests.el progmodes/python.el +Laurence Warne: changed proced-tests.el proced.el progmodes/python.el python-tests.el Laurent Martelli: changed mm-decode.el @@ -3812,10 +3813,10 @@ Malcolm Purvis: changed spam-stat.el Manoj Srivastava: wrote manoj-dark-theme.el -Manuel Giraud: changed image-dired.el xdisp.c vc.el ox-html.el +Manuel Giraud: changed image-dired.el xdisp.c vc.el image.c ox-html.el bookmark.el doc-view.el find-dired.el image-dired-util.el keyboard.c longlines.el ox-publish.el dired.el dispextern.h gdb-mi.el gnus.el - image.c paragraphs.el simple.el androidterm.c basic.texi battery.el + paragraphs.el simple.el androidterm.c basic.texi battery.el and 29 other files Manuel Gómez: changed speedbar.el @@ -4358,7 +4359,7 @@ Mike Kazantsev: changed erc-dcc.el Mike Kupfer: changed mh-comp.el mh-e.el mh-mime.el mh-utils.el files.el ftcrfont.c mh-compat.el mh-funcs.el mh-utils-tests.el emacs-mime.texi files.texi gnus-mh.el gnus.texi mh-acros.el mh-e.texi mh-identity.el - mh-scan.el xftfont.c + mh-scan.el variables.texi xftfont.c Mike Lamb: changed em-unix.el esh-util.el pcmpl-unix.el @@ -4447,7 +4448,7 @@ Murata Shuuichirou: changed coding.c M Visuwesh: changed dired-aux.el image.el ind-util.el quail/indian.el delsel.el doc-view.el eww.el find-dired.el mailcap.el mouse.el shr.el arc-mode.el comint.el dired-x.el dired.el easy-mmode.el emacsbug.el - ffap.el files.el files.texi gnus-group.el and 18 other files + ffap.el files.el files.texi gnus-group.el and 19 other files Myles English: changed org-clock.el @@ -4770,7 +4771,7 @@ and co-wrote cal-dst.el and changed lisp.h configure.ac alloc.c fileio.c process.c editfns.c sysdep.c xdisp.c fns.c image.c data.c emacs.c keyboard.c lread.c xterm.c eval.c gnulib-comp.m4 merge-gnulib callproc.c Makefile.in - buffer.c and 1886 other files + buffer.c and 1887 other files Paul Fisher: changed fns.c @@ -5300,10 +5301,11 @@ Roberto Rodríguez: changed glossary.texi widget.texi Robert P. Goldman: changed org.texi ob-exp.el org.el ox-latex.el Robert Pluim: wrote nsm-tests.el -and changed configure.ac process.c keymap.el blocks.awk custom.texi - font.c network-stream-tests.el processes.texi emoji-zwj.awk ftfont.c +and changed configure.ac process.c keymap.el blocks.awk processes.texi + custom.texi font.c network-stream-tests.el emoji-zwj.awk ftfont.c gtkutil.c process-tests.el unicode vc-git.el display.texi files.texi - nsterm.m terminal.c char-fold.el gnutls.el help.el and 215 other files + network-stream.el nsterm.m terminal.c char-fold.el gnutls.el + and 217 other files Robert Thorpe: changed cus-start.el indent.el rmail.texi @@ -5528,10 +5530,10 @@ Sean O'Rourke: changed complete.el comint.el dabbrev.el find-func.el Sean Sieger: changed emacs-lisp-intro.texi Sean Whitton: wrote em-elecslash.el em-extpipe-tests.el em-extpipe.el -and changed vc-git.el project.el bindings.el server.el simple.el +and changed vc-git.el project.el bindings.el server.el simple.el subr.el vc-dispatcher.el vc.el window.el eshell-tests.el eshell.texi subr-x.el - subr.el .dir-locals.el cl-macs.el eshell-tests-helpers.el files.texi - ftfont.c remember.el startup.el term.el INSTALL and 34 other files + .dir-locals.el cl-macs.el eshell-tests-helpers.el files.texi ftfont.c + remember.el startup.el term.el INSTALL and 34 other files Sebastian Fieber: changed gnus-art.el mm-decode.el mm-view.el @@ -5750,8 +5752,8 @@ Stefan Kangas: wrote bookmark-tests.el cal-julian-tests.el underline-tests.el uudecode-tests.el wallpaper.el warnings-tests.el and co-wrote help-tests.el keymap-tests.el and changed image-dired.el efaq.texi package.el cperl-mode.el checkdoc.el - subr.el help.el simple.el bookmark.el dired.el files.el dired-x.el - gnus.texi browse-url.el erc.el keymap.c image-mode.el ediff-util.el + subr.el help.el simple.el bookmark.el dired.el files.el gnus.texi + dired-x.el browse-url.el erc.el keymap.c image-mode.el ediff-util.el speedbar.el woman.el eglot.el and 1801 other files Stefan Merten: co-wrote rst.el @@ -5766,8 +5768,8 @@ Stefan Monnier: wrote bibtex-style.el bytecomp-tests.el pcvs-util.el radix-tree.el regexp-opt-tests.el reveal.el smerge-mode.el smie.el subword-tests.el track-changes.el vc-mtn.el and co-wrote font-lock.el gitmerge.el pcvs.el visual-wrap.el -and changed subr.el simple.el cl-macs.el bytecomp.el keyboard.c lisp.h - files.el vc.el eval.c xdisp.c alloc.c buffer.c sh-script.el help-fns.el +and changed subr.el simple.el cl-macs.el bytecomp.el keyboard.c files.el + lisp.h vc.el eval.c xdisp.c alloc.c buffer.c sh-script.el help-fns.el progmodes/compile.el tex-mode.el lread.c keymap.c package.el window.c edebug.el and 1724 other files @@ -5803,10 +5805,10 @@ Stephen A. Wood: changed fortran.el Stephen Berman: wrote todo-mode-tests.el and co-wrote todo-mode.el visual-wrap.el and changed wid-edit.el wdired.el todo-mode.texi wdired-tests.el - diary-lib.el dired.el dired-tests.el doc-view.el files.el info.el - minibuffer.el outline.el todo-test-1.todo widget.texi allout.el eww.el - find-dired.el frames.texi hl-line.el ibuffer.el menu-bar.el - and 71 other files + dabbrev-tests.el diary-lib.el dired.el dired-tests.el doc-view.el + files.el info.el minibuffer.el outline.el todo-test-1.todo widget.texi + allout.el dabbrev.el eww.el find-dired.el frames.texi hl-line.el + and 75 other files Stephen C. Gilardi: changed configure.ac @@ -6135,7 +6137,7 @@ Timo Taipalus: changed display.texi image.c image.el Timothee Denizou: changed tetris.el Tim Ruffing: changed keyboard.c calc-prog.el emacs.service keyboard.h - macros.c dbus.el macros.h process.c subr.el term.c + macros.c dbus.el ftcrfont.c macros.h process.c subr.el term.c Tim Van Holder: changed emacsclient.c Makefile.in configure.ac progmodes/compile.el which-func.el @@ -6652,7 +6654,7 @@ Yuan Fu: changed treesit.el treesit.c c-ts-mode.el parsing.texi treesit-tests.el progmodes/python.el modes.texi js.el indent.erts treesit.h typescript-ts-mode.el c-ts-common.el css-mode.el java-ts-mode.el rust-ts-mode.el print.c sh-script.el configure.ac - go-ts-mode.el csharp-mode.el gdb-mi.el and 78 other files + go-ts-mode.el csharp-mode.el gdb-mi.el and 79 other files Yuanle Song: changed rng-xsd.el From 8f8da2d78545ea74853fd9b8d2156f4f93a2324a Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Thu, 19 Dec 2024 00:43:27 +0100 Subject: [PATCH 22/22] ; * ChangeLog.4: Update. --- ChangeLog.4 | 854 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 853 insertions(+), 1 deletion(-) diff --git a/ChangeLog.4 b/ChangeLog.4 index 7cfdbd13184..280d59a5ff1 100644 --- a/ChangeLog.4 +++ b/ChangeLog.4 @@ -1,3 +1,855 @@ +2024-12-19 Andrea Corallo + + * Update authors.el + + * admin/authors.el (authors-aliases, authors-valid-file-names) + (authors-renamed-files-alist): Add entry. + +2024-12-18 Eli Zaretskii + + Document 'trusted-content + + * doc/emacs/misc.texi (Host Security): Document 'trusted-content'. + + * lisp/files.el (trusted-content): Doc fix. + + * etc/NEWS: Mark its entry as "documented". + +2024-12-18 Robert Pluim + + Mention network-interface-list in network-interface-info docstring + + * src/process.c (Fnetwork_interface_info): Reference + 'network-interface-list'. + +2024-12-17 Stefan Kangas + + Move NEWS items from unreleased 28.3 to released 29.1 + + * etc/NEWS.28: Remove empty sections for 28.3. + Move single pertinent item from here... + * etc/NEWS.29: ...to here. + +2024-12-17 Stefan Kangas + + Improve browse-url-android-share docstring + + * lisp/net/browse-url.el (browse-url-android-share): Clarify that + the option only applies to Android systems. + +2024-12-17 Stefan Kangas + + Minor doc fix for url-handler-regexp + + * lisp/url/url-handlers.el (url-handler-regexp): Remove mention of + obsolete internal protocol "about" (i.e. url-about.el). Reflow. + +2024-12-16 Stefan Kangas + + Improve reb-change-syntax docstring + + * lisp/emacs-lisp/re-builder.el (reb-change-syntax): Improve docstring. + +2024-12-16 Stefan Monnier + + * lisp/files.el (trusted-content-p): Make `:all` work in non-file buffers + +2024-12-15 Stefan Monnier + + * lisp/org/ox-texinfo.el (org-texinfo-template): Fix Info format (bug#74844) + +2024-12-15 Stefan Monnier + + trusted-content: Adjust the last patch based on preliminary feedback + + * lisp/files.el (trusted-content): Rename from `trusted-files`. + Update all references. + + * lisp/progmodes/elisp-mode.el (lisp-interaction-mode): + * lisp/ielm.el (inferior-emacs-lisp-mode): + * lisp/simple.el (read--expression): Set `trusted-content` since + these buffers contain code that the user presumably intends to run anyway. + (elisp--safe-macroexpand-all): Make the warning more discreet. + +2024-12-15 Paul Eggert + + Update documentation of 'etags' regexps some more + + * doc/emacs/maintaining.texi (Etags Regexps): + * doc/man/etags.1: Give more details about what's not supported. + +2024-12-15 Eli Zaretskii + + Update documentation of 'etags' regexps + + * doc/emacs/maintaining.texi (Etags Regexps): + * doc/man/etags.1: Say that shy groups are not supported (bug#74861). + +2024-12-14 Stefan Monnier + + elisp-mode.el: Disable Flymake byte-compile backend in untrusted files + + To address serious security issues (CVE-2024-53920), disable + `elisp-flymake-byte-compile` except in those files explicitly + specified as "trusted". + + For that introduce a new custom var `trusted-files` and new + function `trusted-content-p`. + + While at it, similarly skip the implicit macroexpansion done during + completion if the current file is not trusted. + + * lisp/files.el (trusted-files): New variable. + (trusted-content-p): New function. + + * lisp/progmodes/elisp-mode.el (elisp--safe-macroexpand-all): + New function, extracted from `elisp--local-variables`. + Use `trusted-content-p`. + (elisp--local-variables): Use it. + (elisp-flymake-byte-compile): Disable according to `trusted-content-p`. + +2024-12-13 Stephen Gildea + + * lisp/time-stamp.el: Limit field width to two digits. + +2024-12-10 Philip Kaludercic + + Revert "Attempt to install package first when upgrading" + + This reverts commit 3d8e49c41a66a7f05cb96f84e2a10f0f308ac9ca. + +2024-12-10 Robert Pluim + + Fix 'gnus-select-method' custom type + + * lisp/gnus/gnus.el (gnus-redefine-select-method-widget): Cater + for the 'gnus-search-engine' configuration variable, which takes + 2 args instead of 1. (Bug#74759) + +2024-12-10 Chu (tiny change) + + Fix typo in maps.texi + + * doc/lispref/maps.texi (Standard Keymaps): Fix typo. (Bug#74761) + +2024-12-09 Michael Albinus + + * doc/misc/tramp.texi (FUSE-based methods): Fix sshfs reference. + +2024-12-08 Stefan Kangas + + Improve gnus.texi indexing + + * doc/misc/gnus.texi (Common Variables): Improve indexing. + +2024-12-07 Philip Kaludercic + + Attempt to install package first when upgrading + + * lisp/emacs-lisp/package.el (package-upgrade): Swap the + 'package-install' and the 'package-delete' invocations. + (Bug#74556) + +2024-12-07 john muhl + + Don't restrict 'lua-ts-send-file' to 'lua-ts-mode' + + * lisp/progmodes/lua-ts-mode.el (lua-ts-send-file): Remove + restriction on interactive use. Unlike related send-* commands + it can be useful to send a file to the Lua interpreter outside of + a 'lua-ts-mode' buffer. (Bug#74705) + +2024-12-07 Vincenzo Pupillo + + Remove unnecessary function call from 'php-ts-mode' + + * lisp/progmodes/php-ts-mode.el (php-ts-mode): Remove + unnecessary function call 'treesit-font-lock-recompute-features'. + (Bug#74688) + + (cherry picked from commit c87c5b95e1309b59b6cb07d07a20234a74a73f35) + +2024-12-04 Robert Pluim + + Add tags to 'compilation-transform-file-match-alist' custom type + + * lisp/progmodes/compile.el (compilation-filter-start): Add some + more meaningful tags, and switch to using 'radio' instead of + 'choice'. + +2024-12-04 Robert Pluim + + Improve 'compilation-transform-file-match-alist' documentation + + * doc/emacs/building.texi (Compilation Mode): Document + 'compilation-transform-file-match-alist'. + * lisp/progmodes/compile.el + (compilation-transform-file-match-alist): + Expand docstring and add some examples. + +2024-12-04 Robert Pluim + + Improve 'compilation-hidden-output' docstring + + * lisp/progmodes/compile.el (compilation-hidden-output): Escape + the newline so the example value is more suitable for copying. + +2024-12-04 Robert Pluim + + Improve docstrings of functions for moving to message headers + + * lisp/gnus/message.el (message-goto-to, message-goto-from, + message-goto-subject, message-goto-cc, message-goto-bcc, + message-goto-fcc, message-goto-reply-to, + message-goto-newsgroups, message-goto-distribution, + message-goto-followup-to, message-goto-mail-followup-to, + message-goto-keywords, message-goto-summary): Mention that these + will insert an empty header if the header is not found. + (message-position-on-field): Explain that this inserts an empty + header if the header is missing, and that insertion is done + after the headers mentioned in AFTERS. + + (cherry picked from commit 9f266e2d7cde41f5872304bae0b6d2415655f1c8) + +2024-12-03 Stephen Berman + + Fix the latest dabbrev-expand test fix + + * test/lisp/dabbrev-tests.el (dabbrev-expand-after-killing-buffer): + In batch runs of this file, the user-error message contains curved + quotes, but grave quotes when running `make check' (so here was + evidently not passed to `substitute-command-keys'), so use grave + quotes so the test succeeds in both modes of execution. + +2024-12-02 Michael Albinus + + Fix password prompt in comint (don't merge) + + * lisp/comint.el (comint-watch-for-password-prompt): Use whole + string for setting the prompt. (Bug#74626) + +2024-12-02 Manuel Giraud + + Fix the version of librsvg API change + + * src/image.c (init_svg_functions, svg_load_image): The first + official version that introduces + 'rsvg_handle_get_pixbuf_and_error' is 2.59.0 not 2.58.0. + (Bug#74606) + +2024-12-02 Stephen Berman + + Fix latest test for dabbrev-expand + + * test/lisp/dabbrev-tests.el (dabbrev-expand-after-killing-buffer): + Fix typo in a 'should' test, use part of return value of 'should-error' + test, and remove mistaken and unfounded FIXME comment. + +2024-12-01 Yuan Fu + + Allow passing nil to treesit-node-match-p (bug#74612) + + * src/treesit.c (Ftreesit_node_match_p): Return nil if NODE is nil. + +2024-12-01 Manuel Giraud + + Update to version 2.58 of librsvg API (bug#74606) + + * src/image.c (init_svg_functions): Declare new function. + (svg_load_image): Use it. + +2024-12-01 Visuwesh + + Fix decoding of non-ASCII email attachments + + * lisp/mail/rfc2231.el (rfc2231-parse-string): Fix logic when a + non-ASCII file name is split between two filename*N* parts. + (Bug#74624) + +2024-11-30 Stephen Berman + + Prevent "Selecting deleted buffer" error with dabbrev-expand + + * lisp/dabbrev.el (dabbrev-expand): Use the buffer where the last + expansion was found only if it is still a live buffer (bug#74090). + + * test/lisp/dabbrev-tests.el (dabbrev-expand-test-minibuffer-3): + Fix typo in doc string. + (dabbrev-expand-after-killing-buffer): New test. + +2024-11-30 Yuan Fu + + Fix docstring of c-ts-mode-indent-style + + * lisp/progmodes/c-ts-mode.el (c-ts-mode-indent-style): Make the + docstring reflect what's expected by the code. + +2024-11-29 Vincenzo Pupillo + + Support PHP 8.4 and more reliable indentation (bug#74525) + + Added support for PHP 8.4 property hook. More reliable CSS and + Javascript syntax indentation when there are attributes in +