Function: ispell-comments-and-strings
ispell-comments-and-strings is an autoloaded, interactive and
byte-compiled function defined in ispell.el.gz.
Signature
(ispell-comments-and-strings &optional START END)
Documentation
Check comments and strings in the current buffer for spelling errors.
If called interactively with an active region, check only comments and strings in the region. When called from Lisp, START and END buffer positions can be provided to limit the check.
Probably introduced at or before Emacs version 20.3.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/ispell.el.gz
;;;###autoload
(defun ispell-comments-and-strings (&optional start end)
"Check comments and strings in the current buffer for spelling errors.
If called interactively with an active region, check only comments and
strings in the region.
When called from Lisp, START and END buffer positions can be provided
to limit the check."
(interactive (when (use-region-p) (list (region-beginning) (region-end))))
(unless end (setq end (point-max)))
(goto-char (or start (point-min)))
(let (state done)
(while (not done)
(setq done t)
(setq state (parse-partial-sexp (point) end nil nil state 'syntax-table))
(if (or (nth 3 state) (nth 4 state))
(let ((start (point)))
(setq state (parse-partial-sexp start end
nil nil state 'syntax-table))
(if (or (nth 3 state) (nth 4 state))
(error "Unterminated string or comment"))
(save-excursion
(setq done (not (ispell-region start (point))))))))))