Subject: bug#8523: 24.0.50; `dired-mark-if': wrong message if unmarking or unflagging

From: "Drew Adams" <[email-masked]>
Date: Tue, 19 Apr 2011 12:46:26 -0700

`dired-mark-if' is used for marking, flagging (for deletion), and
unflagging.  The particular behavior depends on the value of
`dired-marker-char'.
 
The final message reflects this variation correctly, by testing
`dired-marker-char'.  But the initial message does not.  It always says
"Marking <blah blah>...".  That's strictly true, since marking with a
space char amounts to unmarking.  Still, the message could be more
user-friendly.
 
Here's a fix.  Change the code: (if ,msg "Marking %ss..." ,msg)
to this:
 
(when ,msg
  (message "%s %ss%s..."
           ,(cond ((eq ?\040 dired-marker-char) "Unmarking")
                  ((eq dired-del-marker dired-marker-char)
                   "Flagging")
                  (t "Marking"))
           ,msg
           ,(if (eq dired-del-marker dired-marker-char)
                " for deletion"
              "")))

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-04-18 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.5) --no-opt --cflags
-Ic:/imagesupport/include'