]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/dired.el (dired-mark-if): Evaluate MSG once to avoid warning.
authorMattias Engdegård <mattiase@acm.org>
Tue, 16 Aug 2022 18:37:02 +0000 (20:37 +0200)
committerMattias Engdegård <mattiase@acm.org>
Tue, 16 Aug 2022 18:44:50 +0000 (20:44 +0200)
lisp/dired.el

index f261f9f477ac5ded47ae598a7d5bd247ae0eae91..10813e56dff1bae029ccc27a731f0f732db82006 100644 (file)
@@ -775,19 +775,20 @@ of the region if `dired-mark-region' is non-nil.  Otherwise, operate
 on the whole buffer.
 
 Return value is the number of files marked, or nil if none were marked."
-  `(let ((inhibit-read-only t) count
+  `(let ((msg ,msg)
+         (inhibit-read-only t) count
          (use-region-p (dired-mark--region-use-p))
          (beg (dired-mark--region-beginning))
          (end (dired-mark--region-end)))
     (save-excursion
       (setq count 0)
-      (when ,msg
+      (when msg
        (message "%s %ss%s%s..."
                 (cond ((eq dired-marker-char ?\s) "Unmarking")
                       ((eq dired-del-marker dired-marker-char)
                        "Flagging")
                       (t "Marking"))
-                ,msg
+                msg
                 (if (eq dired-del-marker dired-marker-char)
                     " for deletion"
                   "")
@@ -802,9 +803,9 @@ Return value is the number of files marked, or nil if none were marked."
             (insert dired-marker-char)
             (setq count (1+ count))))
         (forward-line 1))
-      (when ,msg (message "%s %s%s %s%s%s"
+      (when msg (message "%s %s%s %s%s%s"
                         count
-                        ,msg
+                        msg
                         (dired-plural-s count)
                         (if (eq dired-marker-char ?\s) "un" "")
                         (if (eq dired-marker-char dired-del-marker)