1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-02 20:16:25 +00:00

Add file name and its extension to suggestions in dired-mark-files-regexp

* lisp/dired.el (dired-mark-files-regexp): Add file name
and its extension to the list of suggested defaults.  (Bug#25578)
This commit is contained in:
Juri Linkov 2017-02-28 00:45:21 +02:00
parent 50a2ccd87e
commit 3bf717b05b

View File

@ -3361,7 +3361,14 @@ object files--just `.o' will mark more than you might think."
(interactive
(list (read-regexp (concat (if current-prefix-arg "Unmark" "Mark")
" files (regexp): ")
nil 'dired-regexp-history)
;; Add more suggestions into the default list
(cons nil (list (dired-get-filename t t)
(and (dired-get-filename nil t)
(concat (regexp-quote
(file-name-extension
(dired-get-filename nil t) t))
"\\'"))))
'dired-regexp-history)
(if current-prefix-arg ?\040)))
(let ((dired-marker-char (or marker-char dired-marker-char)))
(dired-mark-if