
Matthew Mundell wrote:
A bit rough perhaps, but it seems to work:
(add-hook 'dired-load-hook #'(lambda () (defun dired-ispell-comments-and-strings () ;; Return nil for success, else offending file name. (let* ((filename (dired-get-filename)) buffer-read-only failure) (condition-case err (with-current-buffer (find-file filename) (save-excursion (ispell-comments-and-strings))) (error (setq failure err))) (when failure (dired-log "ispell-comments-and-strings error for %s:\n%s\n" filename failure) (dired-make-relative filename))))
(defun dired-do-ispell-comments-and-strings (&optional arg) "`ispell-comments-and-strings' marked (or next ARG) files." (interactive "P") (dired-map-over-marks-check (function dired-ispell-comments-and-strings) arg 'ispell-comments-and-strings t)) (define-key dired-mode-map "c" 'dired-do-ispell-comments-and-strings)))
Thanks Matthew! I get an error though:
dired-do-ispell-comments-and-strings: Symbol's function definition is void: dired-map-over-marks-check
Cheers,
Roberto