Function: dired-mark-suffix

dired-mark-suffix is an interactive and byte-compiled function defined in dired-x.el.gz.

Signature

(dired-mark-suffix SUFFIX &optional MARKER-CHAR)

Documentation

Mark all files with a certain SUFFIX for use in later commands.

A . is *not* automatically prepended to the string entered; see
also dired-mark-extension, which is similar but automatically prepends . when not present. SUFFIX may also be a list of suffixes instead of a single one. Optional MARKER-CHAR is marker to use. Interactively, ask for SUFFIX. Prefixed with one C-u (universal-argument), unmark files instead. Prefixed with two C-u (universal-argument)'s, prompt for MARKER-CHAR and mark files with it.

Probably introduced at or before Emacs version 26.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/dired-x.el.gz
;; Mark files ending with some suffix.
(defun dired-mark-suffix (suffix &optional marker-char)
  "Mark all files with a certain SUFFIX for use in later commands.
A `.' is *not* automatically prepended to the string entered;  see
also `dired-mark-extension', which is similar but automatically
prepends `.' when not present.
SUFFIX may also be a list of suffixes instead of a single one.
Optional MARKER-CHAR is marker to use.
Interactively, ask for SUFFIX.
Prefixed with one \\[universal-argument], unmark files instead.
Prefixed with two \\[universal-argument]'s, prompt for MARKER-CHAR and mark files with it."
  (interactive (dired--mark-suffix-interactive-spec) dired-mode)
  (setq suffix (ensure-list suffix))
  (dired-mark-files-regexp
   (concat ".";; don't match names with nothing but an extension
           "\\("
           (mapconcat 'regexp-quote suffix "\\|")
           "\\)$")
   marker-char))