From d11488fd6fb72acd9f9356b95b2f905c59a1095d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 30 Jan 2025 11:37:40 +0200 Subject: [PATCH 1/7] ; * lisp/subr.el (sit-for): Doc fix. --- lisp/subr.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/subr.el b/lisp/subr.el index 9666cc09a5c..7aca542dab4 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3529,13 +3529,15 @@ causes it to evaluate `help-form' and display the result." char)) (defun sit-for (seconds &optional nodisp) - "Redisplay, then wait for SECONDS seconds. Stop when input is available. + "Redisplay, then wait for SECONDS seconds; stop when input is available. SECONDS may be a floating-point value. \(On operating systems that do not support waiting for fractions of a second, floating-point values are rounded down to the nearest integer.) -If optional arg NODISP is t, don't redisplay, just wait for input. -Redisplay does not happen if input is available before it starts. +If there's pending input, return nil immediately without redisplaying +and without waiting. +If optional arg NODISP is t, don't redisplay, just wait for input (but +still return nil immediately if there's pending input). Value is t if waited the full time with no input arriving, and nil otherwise." ;; This used to be implemented in C until the following discussion: From 5485ea6aef91c65a0ce300347db3c0ac138ad550 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sun, 26 Jan 2025 14:53:49 +0100 Subject: [PATCH 2/7] Do not set `trusted-content` in major modes * lisp/progmodes/elisp-mode.el (lisp-interaction-mode): * lisp/ielm.el (inferior-emacs-lisp-mode): Do not set `trusted-content. * lisp/ielm.el (ielm): * lisp/simple.el (get-scratch-buffer-create): Set `trusted-content` here instead. * lisp/files.el (trusted-content): Doc fix; warn against setting this option to :all in a major or mode mode. Problem reported by Max Nikulin . --- etc/NEWS | 3 +++ lisp/files.el | 5 +++-- lisp/ielm.el | 4 ++-- lisp/progmodes/elisp-mode.el | 3 +-- lisp/simple.el | 4 +++- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index fbfb9086430..da3a1d670e7 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -193,6 +193,9 @@ 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. +Emacs Lisp authors should note that a major or minor mode must never set +this variable to the ':all' value. + This option is used to fix CVE-2024-53920. See below for details. ** Emacs now supports Unicode Standard version 15.1. diff --git a/lisp/files.el b/lisp/files.el index b64935e8d9e..380721f1fe2 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -724,11 +724,12 @@ 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. +- Otherwise, it is considered 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." +all files, which opens a gaping security hole. Emacs Lisp authors +should note that this value must never be set by a major or minor mode." :type '(choice (repeat :tag "List" file) (const :tag "Trust everything (DANGEROUS!)" :all)) :version "30.1") diff --git a/lisp/ielm.el b/lisp/ielm.el index 561185a738a..b3cd02b4dc0 100644 --- a/lisp/ielm.el +++ b/lisp/ielm.el @@ -580,7 +580,6 @@ 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) @@ -684,7 +683,8 @@ See `inferior-emacs-lisp-mode' for details." (unless (comint-check-proc buf-name) (with-current-buffer (get-buffer-create buf-name) (unless (zerop (buffer-size)) (setq old-point (point))) - (inferior-emacs-lisp-mode))) + (inferior-emacs-lisp-mode) + (setq-local trusted-content :all))) (pop-to-buffer-same-window buf-name) (when old-point (push-mark old-point)))) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 59c33c09f0f..a573d9ef864 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -1337,8 +1337,7 @@ Semicolons start comments. \\{lisp-interaction-mode-map}" :abbrev-table nil - (setq-local lexical-binding t) - (setq-local trusted-content :all)) + (setq-local lexical-binding t)) ;;; Emacs Lisp Byte-Code mode diff --git a/lisp/simple.el b/lisp/simple.el index da4d20e4f78..152a8c451ac 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -11154,7 +11154,9 @@ too short to have a dst element. (when initial-scratch-message (insert (substitute-command-keys initial-scratch-message)) (set-buffer-modified-p nil)) - (funcall initial-major-mode)) + (funcall initial-major-mode) + (when (eq initial-major-mode 'lisp-interaction-mode) + (setq-local trusted-content :all))) scratch))) (defun scratch-buffer () From 87be3aa1491d5016da8ddb2e896720c53d153643 Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Thu, 30 Jan 2025 21:44:31 +0100 Subject: [PATCH 3/7] eglot: Allow omnisharp binary to be capitalized "OmniSharp" Some distributors (e.g. nixpkgs) provide a binary "OmniSharp" instead of "omnisharp", which breaks on case-sensitive file-systems. * lisp/progmodes/eglot.el (eglot-server-programs): Add "OmniSharp" as a valid binary name to search for. (Bug#75954) --- lisp/progmodes/eglot.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 9eb28e34faf..45e0e7d16cd 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -327,6 +327,7 @@ automatically)." ((csharp-mode csharp-ts-mode) . ,(eglot-alternatives '(("omnisharp" "-lsp") + ("OmniSharp" "-lsp") ("csharp-ls")))) (purescript-mode . ("purescript-language-server" "--stdio")) ((perl-mode cperl-mode) From 6441b9ea7af143a882fc1222be345b9260d5bbae Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Fri, 31 Jan 2025 19:25:03 +0100 Subject: [PATCH 4/7] Fix typo in Gnus manual * doc/misc/gnus.texi (Comparing Mail Back Ends): Fix a missing verb. (Bug#75974) --- doc/misc/gnus.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 4d278dc3754..1eace0d5b5a 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -17204,7 +17204,7 @@ filename is unrelated to the article number in Gnus. @code{nnmaildir} also stores the equivalent of @code{nnml}'s overview files in one file per article, so it uses about twice as many inodes as @code{nnml}. (Use @code{df -i} to see how plentiful your inode supply is.) If this -slows you down or takes up very much space, a non-block-structured +slows you down or takes up very much space, use a non-block-structured file system. Since maildirs don't require locking for delivery, the maildirs you use From 3bccd04c5c659307231f9e03895d71d26c1d5f8f Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 1 Feb 2025 04:08:43 +0100 Subject: [PATCH 5/7] Improve wording in symbols.texi * doc/lispref/symbols.texi (Symbol Components): Improve wording (Bug#75512). Reported by Matt Trzcinski . --- doc/lispref/symbols.texi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/lispref/symbols.texi b/doc/lispref/symbols.texi index 24b4e892024..2fd3da9812d 100644 --- a/doc/lispref/symbols.texi +++ b/doc/lispref/symbols.texi @@ -106,11 +106,11 @@ reference any object. (This is not the same thing as holding the symbol a value cell that is void results in an error, such as @samp{Symbol's value as variable is void}. - Because each symbol has separate value and function cells, variables -names and function names do not conflict. For example, the symbol -@code{buffer-file-name} has a value (the name of the file being -visited in the current buffer) as well as a function definition (a -primitive function that returns the name of the file): + Because each symbol has separate value and function cells, the names +of variables and functions do not conflict. For example, the symbol +@code{buffer-file-name} has a value (the name of the file being visited +in the current buffer) as well as a function definition (a primitive +function that returns the name of the file): @example buffer-file-name From fdc6842a44e76db35432305455a05f2125962a62 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 1 Feb 2025 11:33:34 +0200 Subject: [PATCH 6/7] Remove bookmark fringe marks when deleting all bookmarks * lisp/bookmark.el (bookmark-delete-all): Remove fringe marks for all the bookmarks. (Bug#75953) --- lisp/bookmark.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/bookmark.el b/lisp/bookmark.el index cd59293e0a4..153646c1fff 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -1584,6 +1584,8 @@ confirmation." (when (or no-confirm (yes-or-no-p "Permanently delete all bookmarks? ")) (bookmark-maybe-load-default-file) + (dolist (bm bookmark-alist) + (bookmark--remove-fringe-mark bm)) (setq bookmark-alist-modification-count (+ bookmark-alist-modification-count (length bookmark-alist))) (setq bookmark-alist nil) From ba2719389515cee54874588d76b9244c17f568d5 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sat, 1 Feb 2025 12:24:27 +0100 Subject: [PATCH 7/7] ; * etc/NEWS: Fix wording. --- etc/NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index da3a1d670e7..ec14e447859 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -194,7 +194,7 @@ and disables itself with an "untrusted content" warning if the file is not listed. Emacs Lisp authors should note that a major or minor mode must never set -this variable to the ':all' value. +this option to the ':all' value. This option is used to fix CVE-2024-53920. See below for details.