Function: checkdoc-dired
checkdoc-dired is an autoloaded, interactive and byte-compiled
function defined in checkdoc.el.gz.
Signature
(checkdoc-dired FILES)
Documentation
In Dired, run checkdoc on marked files.
Skip anything that doesn't have the Emacs Lisp library file extension (".el"). When called from Lisp, FILES is a list of filenames.
Probably introduced at or before Emacs version 28.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/checkdoc.el.gz
;;;###autoload
(defun checkdoc-dired (files)
"In Dired, run `checkdoc' on marked files.
Skip anything that doesn't have the Emacs Lisp library file
extension (\".el\").
When called from Lisp, FILES is a list of filenames."
(interactive
(progn
;; These Dired functions must be defined since we're in a Dired buffer.
(declare-function dired-get-filename "dired"
(&optional localp no-error-if-not-filep))
;; These functions are used by the expansion of `dired-map-over-marks'.
(declare-function dired-move-to-filename "dired"
(&optional raise-error eol))
(declare-function dired-marker-regexp "dired" ())
(list
(delq nil
(mapcar
;; skip anything that doesn't look like an Emacs Lisp library
(lambda (f) (if (equal (file-name-extension f) "el") f nil))
(nreverse (dired-map-over-marks (dired-get-filename) nil))))))
dired-mode)
(if (null files)
(error "No files to run checkdoc on")
(save-window-excursion
(dolist (fil files)
(find-file fil)
(unless (and
(goto-char (point-min))
(re-search-forward checkdoc--dired-skip-lines-re nil t))
(checkdoc)))))
(message "checkdoc-dired: Successfully checked %d files" (length files)))