commit c6c4e746036c5ba714bfce565de13d713f3cb8b5 (HEAD, refs/remotes/origin/master) Author: Gabriel do Nascimento Ribeiro Date: Sun Dec 13 15:35:46 2020 -0300 New option tab-bar-history-buttons-show * lisp/tab-bar.el (tab-bar-history-buttons-show): If true, show back and forward buttons when tab-bar-history-mode is enabled. (Bug#45227) Copyright-paperwork-exempt: yes diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index 3a705aa015..9506b1b22e 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -296,6 +296,16 @@ If nil, don't show it at all." (defvar tab-bar-forward-button " > " "Button for going forward in tab history.") +(defcustom tab-bar-history-buttons-show t + "Show back and forward buttons when `tab-bar-history-mode' is enabled." + :type 'boolean + :initialize 'custom-initialize-default + :set (lambda (sym val) + (set-default sym val) + (force-mode-line-update)) + :group 'tab-bar + :version "28.1") + (defcustom tab-bar-tab-hints nil "Show absolute numbers on tabs in the tab bar before the tab name. This helps to select the tab by its number using `tab-bar-select-tab' @@ -415,7 +425,7 @@ Return its existing value or a new value." (tabs (funcall tab-bar-tabs-function))) (append '(keymap (mouse-1 . tab-bar-handle-mouse)) - (when tab-bar-history-mode + (when (and tab-bar-history-mode tab-bar-history-buttons-show) `((sep-history-back menu-item ,separator ignore) (history-back menu-item ,tab-bar-back-button tab-bar-history-back commit e948cdbfa8508c7fc98a39caaf5e46798e6a3939 Author: Juri Linkov Date: Mon Dec 14 10:52:05 2020 +0200 Allow creating a new tab for tab-switcher from the minibuffer (bug#45072) * lisp/tab-bar.el (tab-switcher): Simplify by let-binding tab-bar-new-tab-choice to t before calling tab-bar-new-tab that handles the case when it's called in the active minibuffer. diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index 1327bde908..3a705aa015 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -762,6 +762,7 @@ After the tab is created, the hooks in (from-tab (tab-bar--tab))) (when tab-bar-new-tab-choice + ;; Handle the case when it's called in the active minibuffer. (when (minibuffer-selected-window) (select-window (minibuffer-selected-window))) (delete-other-windows) @@ -1200,18 +1201,11 @@ Type q to remove the list of window configurations from the display. The first column shows `D' for a window configuration you have marked for deletion." (interactive) - (let ((dir default-directory) - (minibuf (minibuffer-selected-window))) - (let ((tab-bar-show nil)) ; don't enable tab-bar-mode if it's disabled + (let ((dir default-directory)) + (let ((tab-bar-new-tab-choice t) + ;; Don't enable tab-bar-mode if it's disabled + (tab-bar-show nil)) (tab-bar-new-tab)) - ;; Handle the case when it's called in the active minibuffer. - (when minibuf (select-window (minibuffer-selected-window))) - (delete-other-windows) - ;; Create a new window to replace the existing one, to not break the - ;; window parameters (e.g. prev/next buffers) of the window just saved - ;; to the window configuration. So when a saved window is restored, - ;; its parameters left intact. - (split-window) (delete-window) (let ((switch-to-buffer-preserve-window-point nil)) (switch-to-buffer (tab-switcher-noselect))) (setq default-directory dir)) commit dc6e616dfea1a740248b8f73b35851f7b167ec16 Author: Juri Linkov Date: Mon Dec 14 10:44:04 2020 +0200 Don't show matches with no input for nil icomplete-show-matches-on-no-input * lisp/icomplete.el (icomplete-show-matches-on-no-input): Fix docstring. (icomplete--initial-input): New internal variable. (icomplete-minibuffer-setup): Set buffer-local icomplete--initial-input to icomplete--field-string. (icomplete-ret, icomplete-force-complete-and-exit) (icomplete--sorted-completions, icomplete-exhibit): Compare icomplete--initial-input with icomplete--field-string to detect no input. (Bug#19031) etc/NEWS: Remove duplicate entry. diff --git a/etc/NEWS b/etc/NEWS index 909473f4e7..02edabfc27 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1553,12 +1553,6 @@ both modes are on). This works like 'report-emacs-bug', but is more geared towards sending patches to the Emacs issue tracker. ---- -*** 'icomplete-show-matches-on-no-input' behavior change. -Previously, choosing a different completion with commands like 'C-.' -and then hitting 'RET' would choose the default completion. Doing -this will now choose the completion under point. - +++ *** The user can now customize how "default" values are prompted for. The new utility function 'format-prompt' has been added which uses the @@ -1609,7 +1603,9 @@ horizontally and vertically, respectively. *** Change in meaning of 'icomplete-show-matches-on-no-input'. Previously, choosing a different completion with commands like 'C-.' and then hitting 'RET' would choose the default completion. Doing this -will now choose the completion under point instead. +will now choose the completion under point instead. Also when this option +is nil, completions are not shown when the minibuffer reads a file name +with initial input as the default directory. --- *** The width of the buffer-name column in 'list-buffers' is now dynamic. diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 0fdacd0a3c..6627fd15f6 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -75,7 +75,9 @@ everything preceding the ~/ is discarded so the interactive selection process starts again from the user's $HOME.") (defcustom icomplete-show-matches-on-no-input nil - "When non-nil, show completions when the minibuffer is empty. + "When non-nil, show completions when first prompting for input. +This means to show completions even when the current minibuffer contents +is the same as was the initial input after minibuffer activation. This also means that if you traverse the list of completions with commands like `C-.' and just hit RET without typing any characters, the match under point will be chosen instead of the @@ -146,6 +148,10 @@ icompletion is occurring." (defvar icomplete-overlay (make-overlay (point-min) (point-min) nil t t) "Overlay used to display the list of completions.") +(defvar icomplete--initial-input nil + "Initial input in the minibuffer when icomplete-mode was activated. +Used to implement the option `icomplete-show-matches-on-no-input'.") + (defun icomplete-pre-command-hook () (let ((non-essential t)) (icomplete-tidy))) @@ -169,7 +175,7 @@ icompletion is occurring." (interactive) (if (and icomplete-show-matches-on-no-input (car completion-all-sorted-completions) - (eql (icomplete--field-end) (icomplete--field-beg))) + (equal (icomplete--field-string) icomplete--initial-input)) (icomplete-force-complete-and-exit) (minibuffer-complete-and-exit))) @@ -189,7 +195,7 @@ the default otherwise." (if (or ;; there's some input, meaning the default in off the table by ;; definition; OR - (> (icomplete--field-end) (icomplete--field-beg)) + (not (equal (icomplete--field-string) icomplete--initial-input)) ;; there's no input, but there's also no minibuffer default ;; (and the user really wants to see completions on no input, ;; meaning he expects a "force" to be at least attempted); OR @@ -441,6 +447,7 @@ Conditions are: "Run in minibuffer on activation to establish incremental completion. Usually run by inclusion in `minibuffer-setup-hook'." (when (and icomplete-mode (icomplete-simple-completing-p)) + (setq-local icomplete--initial-input (icomplete--field-string)) (setq-local completion-show-inline-help nil) (use-local-map (make-composed-keymap icomplete-minibuffer-map (current-local-map))) @@ -486,7 +493,7 @@ Usually run by inclusion in `minibuffer-setup-hook'." ;; `completing-read' invocations, described below: for fn in (cond ((and minibuffer-default (stringp minibuffer-default) ; bug#38992 - (= (icomplete--field-end) (icomplete--field-beg))) + (equal (icomplete--field-string) icomplete--initial-input)) ;; Here, we have a non-nil string default and ;; no input whatsoever. We want to make sure ;; that the default is bubbled to the top so @@ -579,7 +586,8 @@ See `icomplete-mode' and `minibuffer-setup-hook'." (goto-char (point-max)) ; Insert the match-status information: (when (and (or icomplete-show-matches-on-no-input - (> (icomplete--field-end) (icomplete--field-beg))) + (not (equal (icomplete--field-string) + icomplete--initial-input))) (or ;; Don't bother with delay after certain number of chars: (> (- (point) (icomplete--field-beg)) @@ -602,7 +610,7 @@ See `icomplete-mode' and `minibuffer-setup-hook'." (or (>= (- (point) (overlay-end rfn-eshadow-overlay)) 2) (eq ?/ (char-before (- (point) 2))))) (delete-region (overlay-start rfn-eshadow-overlay) - (overlay-end rfn-eshadow-overlay)) ) + (overlay-end rfn-eshadow-overlay))) (let* ((field-string (icomplete--field-string)) ;; Not sure why, but such requests seem to come ;; every once in a while. It's not fully commit 755a9f2a8b1118e2493af4c16126da8241aae397 Author: João Távora Date: Sun Dec 13 23:08:42 2020 +0000 Inhibit quit in ElDoc timer functions (bug#45117) The point of un-inhibiting it was to make ElDoc backends interruptible with any input (as in while-no-input), since that should in principle invalidate the need of the current ElDoc processing. But that strategy is dangerous for backends that perform complex synchronization with external processes. Better let each backend decide for itself it needs this eager interruptive behavior, like is presumably the case with the Octave backend. This reverts a part of commit 12e922156c86a26fa4bb2cb9e7d2b3fd639e4707 Author: Stefan Monnier Date: Tue Dec 4 18:15:44 2018 -0500 * lisp/emacs-lisp/eldoc.el (eldoc-print-current-symbol-info): * lisp/progmodes/octave.el (octave-eldoc-function-signatures): Use while-no-input. diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 6a97684103..c9d5521e50 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -867,11 +867,7 @@ the docstrings eventually produced, using eldoc--last-request-state)) (let ((non-essential t)) (setq eldoc--last-request-state token) - ;; Only keep looking for the info as long as the user hasn't - ;; requested our attention. This also locally disables - ;; inhibit-quit. - (while-no-input - (eldoc--invoke-strategy nil))))))) + (eldoc--invoke-strategy nil)))))) ;; This section only affects ElDoc output to the echo area, as in diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index c313ad1179..bda4e60c55 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el @@ -1605,8 +1605,9 @@ code line." (defun octave-eldoc-function-signatures (fn) (unless (equal fn (car octave-eldoc-cache)) - (inferior-octave-send-list-and-digest - (list (format "print_usage ('%s');\n" fn))) + (while-no-input + (inferior-octave-send-list-and-digest + (list (format "print_usage ('%s');\n" fn)))) (let (result) (dolist (line inferior-octave-output-list) ;; The help output has changed a few times in GNU Octave. commit 51698f77dd6356049fcacdb01ebe80cfe4c67272 Author: Dmitry Gutov Date: Sun Dec 13 22:50:46 2020 +0200 Remove the duplication from project-switch-commands's config Based on an older patch by Philip K (https://debbugs.gnu.org/41890#127). * lisp/progmodes/project.el: (project-switch-commands): Change to 'defcustom', alter the value format, add :type. (project-switch-use-entire-map): New option. (project--keymap-prompt, project-switch-project): Update accordingly, while keeping compatibility with user-defined values in the previous format (for some transition period). Co-authored-by: Philip K. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 0ed5f1f907..d4c0e46c85 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -1250,27 +1250,55 @@ It's also possible to enter an arbitrary directory not in the list." ;;; Project switching ;;;###autoload -(defvar project-switch-commands - '((?f "Find file" project-find-file) - (?g "Find regexp" project-find-regexp) - (?d "Dired" project-dired) - (?v "VC-Dir" project-vc-dir) - (?e "Eshell" project-eshell)) - "Alist mapping keys to project switching menu entries. +(defcustom project-switch-commands + '((project-find-file "Find file") + (project-find-regexp "Find regexp") + (project-dired "Dired") + (project-vc-dir "VC-Dir") + (project-eshell "Eshell")) + "Alist mapping commands to descriptions. Used by `project-switch-project' to construct a dispatch menu of commands available upon \"switching\" to another project. -Each element is of the form (KEY LABEL COMMAND), where COMMAND is the -command to run when KEY is pressed. LABEL is used to distinguish -the menu entries in the dispatch menu.") +Each element is of the form (COMMAND LABEL &optional KEY) where +COMMAND is the command to run when KEY is pressed. LABEL is used +to distinguish the menu entries in the dispatch menu. If KEY is +absent, COMMAND must be bound in `project-prefix-map', and the +key is looked up in that map." + :version "28.1" + :package-version '(project . "0.6.0") + :type '(repeat + (list + (symbol :tag "Command") + (string :tag "Label") + (choice :tag "Key to press" + (const :tag "Infer from the keymap" nil) + (character :tag "Explicit key"))))) + +(defcustom project-switch-use-entire-map nil + "Make `project-switch-project' use entire `project-prefix-map'. +If nil, `project-switch-project' will only recognize commands +listed in `project-switch-commands' and signal an error when +others are invoked. Otherwise, all keys in `project-prefix-map' +are legal even if they aren't listed in the dispatch menu." + :type 'bool + :version "28.1") (defun project--keymap-prompt () "Return a prompt for the project switching dispatch menu." (mapconcat - (pcase-lambda (`(,key ,label)) - (format "[%s] %s" - (propertize (key-description `(,key)) 'face 'bold) - label)) + (pcase-lambda (`(,cmd ,label ,key)) + (when (characterp cmd) ; Old format, apparently user-customized. + (let ((tmp cmd)) + ;; TODO: Add a deprecation warning, probably. + (setq cmd key + key tmp))) + (let ((key (if key + (vector key) + (where-is-internal cmd project-prefix-map t)))) + (format "[%s] %s" + (propertize (key-description key) 'face 'bold) + label))) project-switch-commands " ")) @@ -1283,13 +1311,31 @@ made from `project-switch-commands'. When called in a program, it will use the project corresponding to directory DIR." (interactive (list (project-prompt-project-dir))) - (let ((choice nil)) - (while (not choice) - (setq choice (assq (read-event (project--keymap-prompt)) - project-switch-commands))) + (let ((commands-menu + (mapcar + (lambda (row) + (if (characterp (car row)) + ;; Deprecated format. + ;; XXX: Add a warning about it? + (reverse row) + row)) + project-switch-commands)) + command) + (while (not command) + (let ((choice (read-event (project--keymap-prompt)))) + (when (setq command + (or (car + (seq-find (lambda (row) (equal choice (nth 2 row))) + commands-menu)) + (lookup-key project-prefix-map (vector choice)))) + (unless (or project-switch-use-entire-map + (assq command commands-menu)) + ;; TODO: Add some hint to the prompt, like "key not + ;; recognized" or something. + (setq command nil))))) (let ((default-directory dir) (project-current-inhibit-prompt t)) - (call-interactively (nth 2 choice))))) + (call-interactively command)))) (provide 'project) ;;; project.el ends here commit fe50a8b9ba79b4ac14a3a352d8bf84eaee4f2122 Author: Philipp Stephani Date: Sun Dec 13 17:13:50 2020 +0100 Byte compilation: handle case where the output file is a mountpoint. See Bug#44631. While testing for a readonly output directory has slightly different semantics, in practice they should cover cases where Emacs is sandboxed and can only write to the destination file, not its directory. * lisp/emacs-lisp/bytecomp.el (byte-compile-file): Handle the case where the output directory is not writable. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--not-writable-directory) (bytecomp-tests--dest-mountpoint): New unit tests. diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 51accc0865..e23bb9f5e6 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1963,7 +1963,11 @@ See also `emacs-lisp-byte-compile-and-load'." (insert "\n") ; aaah, unix. (cond ((null target-file) nil) ;We only wanted the warnings! - ((file-writable-p target-file) + ((and (file-writable-p target-file) + ;; We attempt to create a temporary file in the + ;; target directory, so the target directory must be + ;; writable. + (file-writable-p (file-name-directory target-file))) ;; We must disable any code conversion here. (let* ((coding-system-for-write 'no-conversion) ;; Write to a tempfile so that if another Emacs @@ -1992,6 +1996,14 @@ See also `emacs-lisp-byte-compile-and-load'." ;; deleting target-file before writing it. (rename-file tempfile target-file t)) (or noninteractive (message "Wrote %s" target-file))) + ((file-writable-p target-file) + ;; In case the target directory isn't writable (see e.g. Bug#44631), + ;; try writing to the output file directly. We must disable any + ;; code conversion here. + (let ((coding-system-for-write 'no-conversion)) + (with-file-modes (logand (default-file-modes) #o666) + (write-region (point-min) (point-max) target-file nil 1))) + (or noninteractive (message "Wrote %s" target-file))) (t ;; This is just to give a better error message than write-region (let ((exists (file-exists-p target-file))) diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index 8fa4d278f1..c2a3e3ba11 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -947,6 +947,75 @@ literals (Bug#20852)." '((suspicious set-buffer)) "Warning: Use .with-current-buffer. rather than")) +(ert-deftest bytecomp-tests--not-writable-directory () + "Test that byte compilation works if the output directory isn't +writable (Bug#44631)." + (let ((directory (make-temp-file "bytecomp-tests-" :directory))) + (unwind-protect + (let* ((input-file (expand-file-name "test.el" directory)) + (output-file (expand-file-name "test.elc" directory)) + (byte-compile-dest-file-function + (lambda (_) output-file)) + (byte-compile-error-on-warn t)) + (write-region "" nil input-file nil nil nil 'excl) + (write-region "" nil output-file nil nil nil 'excl) + (set-file-modes input-file #o400) + (set-file-modes output-file #o200) + (set-file-modes directory #o500) + (should (byte-compile-file input-file)) + (should (file-regular-p output-file)) + (should (cl-plusp (file-attribute-size + (file-attributes output-file))))) + (with-demoted-errors "Error cleaning up directory: %s" + (set-file-modes directory #o700) + (delete-directory directory :recursive))))) + +(ert-deftest bytecomp-tests--dest-mountpoint () + "Test that byte compilation works if the destination file is a +mountpoint (Bug#44631)." + (let ((bwrap (executable-find "bwrap")) + (emacs (expand-file-name invocation-name invocation-directory))) + (skip-unless bwrap) + (skip-unless (file-executable-p bwrap)) + (skip-unless (not (file-remote-p bwrap))) + (skip-unless (file-executable-p emacs)) + (skip-unless (not (file-remote-p emacs))) + (let ((directory (make-temp-file "bytecomp-tests-" :directory))) + (unwind-protect + (let* ((input-file (expand-file-name "test.el" directory)) + (output-file (expand-file-name "test.elc" directory)) + (unquoted-file (file-name-unquote output-file)) + (byte-compile-dest-file-function + (lambda (_) output-file)) + (byte-compile-error-on-warn t)) + (should-not (file-remote-p input-file)) + (should-not (file-remote-p output-file)) + (write-region "" nil input-file nil nil nil 'excl) + (write-region "" nil output-file nil nil nil 'excl) + (set-file-modes input-file #o400) + (set-file-modes output-file #o200) + (set-file-modes directory #o500) + (with-temp-buffer + (let ((status (call-process + bwrap nil t nil + "--ro-bind" "/" "/" + "--bind" unquoted-file unquoted-file + emacs "--quick" "--batch" "--load=bytecomp" + (format "--eval=%S" + `(setq byte-compile-dest-file-function + (lambda (_) ,output-file) + byte-compile-error-on-warn t)) + "--funcall=batch-byte-compile" input-file))) + (unless (eql status 0) + (ert-fail `((status . ,status) + (output . ,(buffer-string))))))) + (should (file-regular-p output-file)) + (should (cl-plusp (file-attribute-size + (file-attributes output-file))))) + (with-demoted-errors "Error cleaning up directory: %s" + (set-file-modes directory #o700) + (delete-directory directory :recursive)))))) + ;; Local Variables: ;; no-byte-compile: t ;; End: commit 897b8561cdc856fb40b2a3c6f29230849aaf4a34 Author: Mauro Aranda Date: Sun Dec 13 10:44:30 2020 -0300 Stop dropping the tag when creating the custom-variable widget * lisp/cus-edit.el (custom-variable-value-create): Obey the specified tag format when creating the variable tag, but stop dropping the tag format for the variable's type widget, since the tag can be used to give useful information to the user about the variable. (Bug#35133) diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 3a36cb0237..041f13b420 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -2734,11 +2734,15 @@ try matching its doc string against `custom-guess-doc-alist'." buttons) (insert " ") (let* ((format (widget-get type :format)) - tag-format value-format) - (unless (string-match ":" format) + tag-format) + ;; We used to drop the widget tag when creating TYPE, passing + ;; everything after the colon (including whitespace characters + ;; after it) as the :format for TYPE. We don't drop the tag + ;; anymore, but we should keep an immediate whitespace character, + ;; if present, and it's easier to do it here. + (unless (string-match ":\\s-?" format) (error "Bad format")) (setq tag-format (substring format 0 (match-end 0))) - (setq value-format (substring format (match-end 0))) (push (widget-create-child-and-convert widget 'item :format tag-format @@ -2753,7 +2757,6 @@ try matching its doc string against `custom-guess-doc-alist'." buttons) (push (widget-create-child-and-convert widget type - :format value-format :value value) children)))) (unless (eq custom-buffer-style 'tree) commit f7133be7ae4eda5b3688728f19cac39de7e862a3 Author: Lars Ingebrigtsen Date: Sun Dec 13 14:17:55 2020 +0100 Make dired-toggle-read-only query on read-only directories * lisp/dired.el (dired-toggle-read-only): Query instead of erroring out immediately (bug#29412). diff --git a/lisp/dired.el b/lisp/dired.el index baf99da7b4..c68c4a52bd 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -2419,8 +2419,10 @@ If the current buffer can be edited with Wdired, (i.e. the major mode is `dired-mode'), call `wdired-change-to-wdired-mode'. Otherwise, toggle `read-only-mode'." (interactive) - (unless (file-writable-p default-directory) - (user-error "Directory %s isn't writeable" default-directory)) + (when (and (not (file-writable-p default-directory)) + (not (y-or-n-p + "Directory isn't writable; edit anyway? "))) + (user-error "Directory %s isn't writable" default-directory)) (if (derived-mode-p 'dired-mode) (wdired-change-to-wdired-mode) (read-only-mode 'toggle))) commit 1c115e404e38d04b179a00c2ed1bbd48ff070984 Author: Lars Ingebrigtsen Date: Sun Dec 13 13:49:25 2020 +0100 Clarify Extended Menu Items a bit more * doc/lispref/keymaps.texi (Extended Menu Items): Expand a bit more on how submenus are formed (bug#26428). diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index 130ff0d867..6635f50960 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi @@ -2167,9 +2167,10 @@ string. Thus, the string need not be a constant. The third element, @var{real-binding}, can be the command to execute (in which case you get a normal menu item). It can also be a keymap, -which will result in a submenu. Finally, it can be @code{nil}, in -which case you will get a non-selectable menu item. This is mostly -useful when creating separator lines and the like. +which will result in a submenu, and @var{item-name} is used as the +submenu name. Finally, it can be @code{nil}, in which case you will +get a non-selectable menu item. This is mostly useful when creating +separator lines and the like. The tail of the list, @var{item-property-list}, has the form of a property list which contains other information. commit 831659b3b88d42ea5e4adab2be3316cfffa2efd1 Author: Andrea Corallo Date: Sun Dec 13 01:11:56 2020 +0100 * Fix `memory-report' for '--without-x' builds * lisp/emacs-lisp/memory-report.el (memory-report--image-cache): Don't call `image-cache-size' if unbound. diff --git a/lisp/emacs-lisp/memory-report.el b/lisp/emacs-lisp/memory-report.el index c88d9f2768..04ae87d9ea 100644 --- a/lisp/emacs-lisp/memory-report.el +++ b/lisp/emacs-lisp/memory-report.el @@ -294,7 +294,9 @@ by counted more than once." (overlay-lists))))) (defun memory-report--image-cache () - (list (cons "Total Image Cache Size" (image-cache-size)))) + (list (cons "Total Image Cache Size" (if (fboundp 'image-cache-size) + (image-cache-size) + 0)))) (provide 'memory-report)