diff options
| author | Eli Zaretskii | 2016-09-24 18:10:42 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2016-09-24 18:10:42 +0300 |
| commit | 5ee56c4613e9380dbbe4bbaa97b29dd377e2134c (patch) | |
| tree | f6e73dd63278de7976a029673c6f7060208bd0bc /lisp | |
| parent | 6ddcb0f10fb2b3c6c6a31733b28f7fbb30637ac2 (diff) | |
| download | emacs-5ee56c4613e9380dbbe4bbaa97b29dd377e2134c.tar.gz emacs-5ee56c4613e9380dbbe4bbaa97b29dd377e2134c.zip | |
Fix 'dired-mark-extension' with prefix argument
* lisp/dired-x.el (dired-mark-extension): Allow to specify
MARKER-CHAR interactively as a string, not as a character's
codepoint. (Bug#24518)
* doc/misc/dired-x.texi (Advanced Mark Commands): Document the
behavior when invoked with a prefix arg.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/dired-x.el | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lisp/dired-x.el b/lisp/dired-x.el index 41c2256ec6f..7d73c42befb 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el | |||
| @@ -333,8 +333,18 @@ See also the functions: | |||
| 333 | "Mark all files with a certain EXTENSION for use in later commands. | 333 | "Mark all files with a certain EXTENSION for use in later commands. |
| 334 | A `.' is *not* automatically prepended to the string entered. | 334 | A `.' is *not* automatically prepended to the string entered. |
| 335 | EXTENSION may also be a list of extensions instead of a single one. | 335 | EXTENSION may also be a list of extensions instead of a single one. |
| 336 | Optional MARKER-CHAR is marker to use." | 336 | Optional MARKER-CHAR is marker to use. |
| 337 | (interactive "sMarking extension: \nP") | 337 | Interactively, ask for EXTENSION, and if invoked with a prefix |
| 338 | argument, for MARKER-CHAR as well." | ||
| 339 | (interactive | ||
| 340 | (list (read-string "Marking extension: ") | ||
| 341 | (and current-prefix-arg | ||
| 342 | (let* ((dflt (char-to-string dired-marker-char)) | ||
| 343 | (input (read-string | ||
| 344 | (format | ||
| 345 | "Marker character to use (default %s): " dflt) | ||
| 346 | nil nil dflt))) | ||
| 347 | (aref input 0))))) | ||
| 338 | (or (listp extension) | 348 | (or (listp extension) |
| 339 | (setq extension (list extension))) | 349 | (setq extension (list extension))) |
| 340 | (dired-mark-files-regexp | 350 | (dired-mark-files-regexp |