On Mon, 27 Mar 2017, Juri Linkov wrote:
emacs -Q /tmp
(require 'dired-x)
(require 'ert)
;; Evaluate following sexp:
(let ((dirs '("Public" "Music"))
(files '(".bashrc" "bar.c" "foo.c"))
(dir (make-temp-file "Bug25942" 'dir)))
(unwind-protect
(progn
(dolist (d dirs)
(make-directory (expand-file-name d dir)))
(dolist (f files)
(write-region nil nil (expand-file-name f dir)))
(dired dir)
(dired-mark-extension "c")
(should (= 2 (length (dired-get-marked-files)))))
(delete-directory dir 'recursive)))
IMO, in this example looks better if just those files ending with
'.c' are marked i.e., to not mark 'Public' or 'Music'.
Is this a backward-compatible change?
Yes, it is; but it makes a better global picture when we consider
this function together with `file-name-extension' and
`file-name-sans-extension' (More below).