@findex dired-mark-extension
Mark all files with a certain extension for use in later commands. A @samp{.}
is not automatically prepended to the string entered, you must type it
-explicitly.
+explicitly. If invoked with a prefix argument, this command asks for
+a character to use as the marker.
When called from Lisp, @var{extension} may also be a list of extensions
and an optional argument @var{marker-char} specifies the marker used.
"Mark all files with a certain EXTENSION for use in later commands.
A `.' is *not* automatically prepended to the string entered.
EXTENSION may also be a list of extensions instead of a single one.
-Optional MARKER-CHAR is marker to use."
- (interactive "sMarking extension: \nP")
+Optional MARKER-CHAR is marker to use.
+Interactively, ask for EXTENSION, and if invoked with a prefix
+argument, for MARKER-CHAR as well."
+ (interactive
+ (list (read-string "Marking extension: ")
+ (and current-prefix-arg
+ (let* ((dflt (char-to-string dired-marker-char))
+ (input (read-string
+ (format
+ "Marker character to use (default %s): " dflt)
+ nil nil dflt)))
+ (aref input 0)))))
(or (listp extension)
(setq extension (list extension)))
(dired-mark-files-regexp