From 86e32aed4a3506151c9a06df7f4dcdd2c4bbeca1 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 16 Jul 2025 11:20:08 +0100 Subject: [PATCH 1/6] ; define-globalized-minor-mode: Fix capitalization. --- lisp/emacs-lisp/easy-mmode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 1d8493793e8..a58b6533917 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -458,7 +458,7 @@ switch on the minor mode in all major modes), nil (meaning don't switch on in any major mode), a list of modes (meaning switch on only in those modes and their descendants), or a list (not MODES...), meaning switch on in any major mode except MODES. The value can also -mix all of these forms, see the info node `(elisp)Defining Minor Modes' +mix all of these forms, see the Info node `(elisp)Defining Minor Modes' for details. The :predicate key causes the macro to create a user option named the same as MODE, but ending with \"-modes\" instead of \"-mode\". That user option can then be used to customize in which modes this From fe3ac1575a0103ac3f2030fe4a464a50f935abff Mon Sep 17 00:00:00 2001 From: Ken Mankoff Date: Wed, 16 Jul 2025 05:44:47 -0400 Subject: [PATCH 2/6] Fix :box attribute of faces in Leuven themes. * etc/themes/leuven-dark-theme.el: * etc/themes/leuven-theme.el: Fix 'lui-highlight-face' face. (Bug#79029) --- etc/themes/leuven-dark-theme.el | 2 +- etc/themes/leuven-theme.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/themes/leuven-dark-theme.el b/etc/themes/leuven-dark-theme.el index 017cc08110c..ea9b4169f84 100644 --- a/etc/themes/leuven-dark-theme.el +++ b/etc/themes/leuven-dark-theme.el @@ -683,7 +683,7 @@ more..." `(lsp-ui-doc-background ((,class (:background "#2d2058")))) `(lsp-ui-sideline-code-action ((,class (:foreground "#ffffff" :background "#2526c0")))) `(lui-button-face ((,class ,link))) - `(lui-highlight-face ((,class (:box '(:line-width 1 :color "#38ffff") :foreground "#38ffff" :background "#06017f")))) ; my nickname + `(lui-highlight-face ((,class (:box (:line-width 1 :color "#38ffff") :foreground "#38ffff" :background "#06017f")))) ; my nickname `(lui-time-stamp-face ((,class (:foreground "#64df19")))) `(magit-blame-header ((,class (:inherit magit-diff-file-header)))) `(magit-blame-heading ((,class (:overline "#5d5862" :foreground "#06ffff" :background "#3c3741")))) diff --git a/etc/themes/leuven-theme.el b/etc/themes/leuven-theme.el index 5d38c7071f1..946dfcdc305 100644 --- a/etc/themes/leuven-theme.el +++ b/etc/themes/leuven-theme.el @@ -737,7 +737,7 @@ more..." `(lsp-ui-doc-background ((,class (:background "#F6FECD")))) `(lsp-ui-sideline-code-action ((,class (:foreground "#000000" :background "#FFF68F")))) `(lui-button-face ((,class ,link))) - `(lui-highlight-face ((,class (:box '(:line-width 1 :color "#CC0000") :foreground "#CC0000" :background "#FFFF88")))) ; my nickname + `(lui-highlight-face ((,class (:box (:line-width 1 :color "#CC0000") :foreground "#CC0000" :background "#FFFF88")))) ; my nickname `(lui-time-stamp-face ((,class (:foreground "purple")))) `(magit-blame-header ((,class (:inherit magit-diff-file-header)))) `(magit-blame-heading ((,class (:overline "#A7A7A7" :foreground "red" :background "#E6E6E6")))) From a05be41af713bd02a28659078ba1acc82ba66ae4 Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Thu, 17 Jul 2025 14:22:26 +0200 Subject: [PATCH 3/6] ; * lisp/battery.el (battery-bsd-apm): Explain a FIXME (bug#79040). --- lisp/battery.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/battery.el b/lisp/battery.el index 846cf22829f..ee32fb74450 100644 --- a/lisp/battery.el +++ b/lisp/battery.el @@ -951,7 +951,10 @@ The following %-sequences are provided: %h Remaining time (to charge or discharge) in hours %t Remaining time (to charge or discharge) in the form `h:min'" (let* ((os-name (car (split-string - ;; FIXME: Can't we use something like `system-type'? + ;; We cannot use `system-type' because some BSD + ;; systems fall under the 'berkley-unix umbrella + ;; and we're trying to make the distinction + ;; among them here. (battery--call-process-to-string "uname")))) (apm-flag (pcase os-name ("OpenBSD" "mP") From e675d5ba64bc25921cb17ad348103090e7c50a3f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 19 Jul 2025 12:50:43 +0300 Subject: [PATCH 4/6] ; Update doc strings of Dired functions due to 'marked' value of ARG * lisp/dired-aux.el (dired-do-compress, dired-do-byte-compile) (dired-do-load, dired-do-redisplay): * lisp/dired.el (dired-map-over-marks, dired-get-marked-files) (dired-mouse-drag, dired-do-delete): Doc fixes (bug#79042). --- lisp/dired-aux.el | 20 ++++++++++++++++---- lisp/dired.el | 42 +++++++++++++++++++++++------------------- 2 files changed, 39 insertions(+), 23 deletions(-) diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index bd3ab188ffa..a20246f7ab3 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1921,7 +1921,10 @@ If invoked on a directory, compress all of the files in the directory and all of its subdirectories, recursively, into a .tar.gz archive. If invoked on a .tar.gz or a .tgz or a .zip or a .7z archive, -uncompress and unpack all the files in the archive." +uncompress and unpack all the files in the archive. + +When called from Lisp, if ARG is the symbol `marked', compress +only the marked files, or none if no files are marked." (interactive "P" dired-mode) (dired-map-over-marks-check #'dired-compress arg 'compress t)) @@ -1950,7 +1953,10 @@ uncompress and unpack all the files in the archive." ;;;###autoload (defun dired-do-byte-compile (&optional arg) - "Byte compile marked (or next ARG) Emacs Lisp files." + "Byte compile marked (or next ARG) Emacs Lisp files. + +When called from Lisp, if ARG is the symbol `marked', byte-compile +only the marked files, or none if no files are marked." (interactive "P" dired-mode) (dired-map-over-marks-check #'dired-byte-compile arg 'byte-compile t)) @@ -1967,7 +1973,10 @@ uncompress and unpack all the files in the archive." ;;;###autoload (defun dired-do-load (&optional arg) - "Load the marked (or next ARG) Emacs Lisp files." + "Load the marked (or next ARG) Emacs Lisp files. + +When called from Lisp, if ARG is the symbol `marked', load +only the marked files, or none if no files are marked." (interactive "P" dired-mode) (dired-map-over-marks-check #'dired-load arg 'load t)) @@ -1983,7 +1992,10 @@ or delete subdirectories can bypass this machinery. Hence, you sometimes may have to reset some subdirectory switches after a `dired-undo'. You can reset all subdirectory switches to the default using \\\\[dired-reset-subdir-switches]. -See Info node `(emacs)Subdir switches' for more details." +See Info node `(emacs)Subdir switches' for more details. + +When called from Lisp, if ARG is the symbol `marked', redisplay +only the marked files, or none if no files are marked." ;; Moves point if the next ARG files are redisplayed. (interactive "P\np" dired-mode) (if (and test-for-subdir (dired-get-subdir)) diff --git a/lisp/dired.el b/lisp/dired.el index cbccc7537da..5ad41752d8f 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -931,18 +931,17 @@ Return value is the number of files marked, or nil if none were marked." (defmacro dired-map-over-marks (body arg &optional show-progress distinguish-one-marked) "Eval BODY with point on each marked line. Return a list of BODY's results. -If no marked file could be found, execute BODY on the current -line. ARG, if non-nil, specifies the files to use instead of the +If no marked file could be found and ARG is nil, execute BODY on the current +line. If ARG is non-nil, it specifies the files to use instead of the marked files. -If ARG is an integer, use the next ARG (or previous -ARG, if -ARG<0) files. In that case, point is dragged along. This is so -that commands on the next ARG (instead of the marked) files can -be chained easily. -For any other non-nil value of ARG, use the current file. - -If ARG is `marked', don't return the current file if nothing else -is marked. + If ARG is an integer, use the next ARG (or previous -ARG, if ARG<0) + files. In that case, point is dragged along. This is so that + commands on the next ARG (instead of the marked) files can be + chained easily. + If ARG is the symbol `marked', use only marked files; if none are + marked, don't eval BODY and return nil. + For any other non-nil value of ARG, use the current file. If optional third arg SHOW-PROGRESS evaluates to non-nil, redisplay the Dired buffer after each file is processed. @@ -951,14 +950,16 @@ No guarantee is made about the position on the marked line. BODY must ensure this itself if it depends on this. Search starts at the beginning of the buffer, thus the car of the -list corresponds to the line nearest to the buffer's bottom. +returnede list corresponds to the line nearest to the buffer's bottom. This is also true for (positive and negative) integer values of ARG. BODY should not be too long as it is expanded four times. If DISTINGUISH-ONE-MARKED is non-nil, then if we find just one -marked file, return (t FILENAME) instead of (FILENAME)." +marked file, return (t BODY-RESULT) instead of (BODY-RESULT), +where BODY-RESULT is the result of evaluating BODY with point +on the single marked file's line." ;; ;;Warning: BODY must not add new lines before point - this may cause an ;;endless loop. @@ -1009,18 +1010,21 @@ marked file, return (t FILENAME) instead of (FILENAME)." (defun dired-get-marked-files (&optional localp arg filter distinguish-one-marked error) "Return the marked files' names as list of strings. -The list is in the same order as the buffer, that is, the car is the - first marked file. +The list is in the same order as the Dired buffer text, that is, the car + is the first marked file. Values returned are normally absolute file names. -Optional arg LOCALP as in `dired-get-filename'. +Optional arg LOCALP is as in `dired-get-filename'. Optional second argument ARG, if non-nil, specifies files near - point instead of marked files. It usually comes from the prefix - argument. - If ARG is an integer, use the next ARG files. + point to return instead of marked files. It usually comes from the + prefix argument of the caller. + If ARG is an integer, return the next ARG files (previous if ARG is + negative). + If ARG is the symbol `marked', return only marked files; return nil + if none are marked If ARG is any other non-nil value, return the current file name. If no files are marked, and ARG is nil, also return the current file name. Optional third argument FILTER, if non-nil, is a function to select - some of the files--those for which (funcall FILTER FILENAME) is non-nil. + some of the files--those for which (funcall FILTER FILENAME) is non-nil. If DISTINGUISH-ONE-MARKED is non-nil, then if we find just one marked file, return (t FILENAME) instead of (FILENAME). From 740138b113ab420a90b70865ac6dfffcbbc444ee Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 19 Jul 2025 13:04:29 +0300 Subject: [PATCH 5/6] ; Fix last change * lisp/image/image-dired-dired.el (image-dired-dired-toggle-marked-thumbs): Doc fix (bug#79042), --- lisp/image/image-dired-dired.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/image/image-dired-dired.el b/lisp/image/image-dired-dired.el index c7994cd4096..0616f9f43a2 100644 --- a/lisp/image/image-dired-dired.el +++ b/lisp/image/image-dired-dired.el @@ -62,8 +62,9 @@ Dired and you might want to turn it off." If no file is marked, toggle display of thumbnail on the current file's line. ARG, if non-nil (interactively, the prefix argument), specifies the files whose thumbnail display to toggle instead of the marked files: if ARG is an -integer, use the next ARG (or previous -ARG, if ARG<0) files; any other -value of ARG means toggle thumbnail display of the current line's file." +integer, use the next ARG (or previous -ARG, if ARG<0) files; if ARG is +the symbol `marked', use only the marked files, if any; any other value of +ARG means toggle thumbnail display of the current line's file." (interactive "P" dired-mode) (setq image-dired--generate-thumbs-start (current-time)) (dired-map-over-marks From 3b2bfdfef63f051a36f4043c32596458ccae605f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 19 Jul 2025 13:05:05 +0300 Subject: [PATCH 6/6] ; Fix last change (bug#79042) --- lisp/dired.el | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/lisp/dired.el b/lisp/dired.el index 5ad41752d8f..0a07339e146 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1870,8 +1870,8 @@ see `dired-use-ls-dired' for more details.") (defun dired-mouse-drag (event) "Begin a drag-and-drop operation for the file at EVENT. -If there are marked files and that file is marked, drag every -other marked file as well. Otherwise, unmark all files." +If there are marked files and the file at EVENT is marked, drag all the +other marked files as well. Otherwise, unmark all files." (interactive "e" dired-mode) (when mark-active (deactivate-mark)) @@ -1907,19 +1907,24 @@ other marked file as well. Otherwise, unmark all files." ;; We can get an error if there's by some chance no file ;; name at point. (condition-case error - (let ((filename (with-selected-window (posn-window - (event-end event)) - (let ((marked-files (dired-map-over-marks (dired-get-filename - nil 'no-error-if-not-filep) - 'marked)) - (file-name (dired-get-filename nil 'no-error-if-not-filep))) - (if (and marked-files - (member file-name marked-files)) - marked-files - (when marked-files - (dired-map-over-marks (dired-unmark nil) - 'marked)) - file-name))))) + (let ((filename + (with-selected-window (posn-window + (event-end event)) + (let ((marked-files + (dired-map-over-marks (dired-get-filename + nil + 'no-error-if-not-filep) + 'marked)) + (file-name + (dired-get-filename nil + 'no-error-if-not-filep))) + (if (and marked-files + (member file-name marked-files)) + marked-files + (when marked-files + (dired-map-over-marks (dired-unmark nil) + 'marked)) + file-name))))) (when filename (if (and (consp filename) (cdr filename)) @@ -3984,7 +3989,10 @@ non-empty directories is allowed." (defun dired-do-delete (&optional arg) "Delete all marked (or next ARG) files. `dired-recursive-deletes' controls whether deletion of -non-empty directories is allowed." +non-empty directories is allowed. + +When called from Lisp, if ARG is the symbol `marked', delete +only the marked files, or none if no files are marked." ;; This is more consistent with the file marking feature than ;; dired-do-flagged-delete. (interactive "P" dired-mode)