diff --git a/doc/lispref/symbols.texi b/doc/lispref/symbols.texi index 37fb3b49e43..6cddd50c920 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 diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index cfcc8039165..239aa43703f 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 diff --git a/etc/NEWS.30 b/etc/NEWS.30 index fbfb9086430..ec14e447859 100644 --- a/etc/NEWS.30 +++ b/etc/NEWS.30 @@ -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 option 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/bookmark.el b/lisp/bookmark.el index c86101217d6..e8ad0cee31d 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -1586,6 +1586,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) diff --git a/lisp/files.el b/lisp/files.el index 5ff40c335d7..e5fde17513f 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -721,11 +721,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/eglot.el b/lisp/progmodes/eglot.el index 76648f310e6..4114f21bc75 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -325,6 +325,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) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 078563a123c..d61cf4684f9 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -1340,8 +1340,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 d3005c69b0c..e1c0dd4a092 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -11249,7 +11249,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 () diff --git a/lisp/subr.el b/lisp/subr.el index 65b50dc5598..12f4ec38b78 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3547,13 +3547,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: