Function: lm-verify
lm-verify is an interactive and byte-compiled function defined in
lisp-mnt.el.gz.
This command is obsolete since 31.1; use checkdoc instead.
Signature
(lm-verify &optional FILE SHOWOK VERBOSE NON-FSF-OK)
Documentation
Check that the current buffer (or FILE if given) is in proper format.
If FILE is a directory, recurse on its files and generate a report in a temporary buffer. In that case, the optional argument SHOWOK says display "OK" in temp buffer for files that have no problems.
Optional argument VERBOSE specifies verbosity level. Optional argument NON-FSF-OK if non-nil means a non-FSF copyright notice is allowed.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/lisp-mnt.el.gz
(defun lm-verify (&optional file showok verbose non-fsf-ok)
"Check that the current buffer (or FILE if given) is in proper format.
If FILE is a directory, recurse on its files and generate a report in a
temporary buffer. In that case, the optional argument SHOWOK
says display \"OK\" in temp buffer for files that have no problems.
Optional argument VERBOSE specifies verbosity level.
Optional argument NON-FSF-OK if non-nil means a non-FSF
copyright notice is allowed."
(declare (obsolete checkdoc "31.1"))
(interactive (list nil nil t))
(let* ((ret (and verbose "Ok"))
name)
(if (and file (file-directory-p file))
(setq ret
(with-temp-buffer
(dolist (f (directory-files file nil "\\.el\\'")
(buffer-string))
(when (file-regular-p f)
(let ((status (lm-verify f)))
(insert f ":")
(if status
(lm-insert-at-column lm-comment-column status
"\n")
(if showok
(lm-insert-at-column lm-comment-column
"OK\n"))))))))
(lm-with-file file
(setq name (lm-get-package-name))
(setq ret
(cond
((null name)
"Can't find package name")
((not (lm-authors))
"`Author:' tag missing")
((not (lm-maintainers))
"`Maintainer:' tag missing")
((not (lm-summary))
"Can't find the one-line summary description")
((not (lm-keywords))
"`Keywords:' tag missing")
((not (lm-keywords-finder-p))
"`Keywords:' has no valid finder keywords (see `finder-known-keywords')")
((not (lm-commentary-start))
"Can't find a `Commentary' section marker")
((not (lm-history-start))
"Can't find a `History' section marker")
((not (lm-code-start))
"Can't find a `Code' section marker")
((progn
(when (lm-package-needs-footer-line)
(goto-char (point-max))
(not
(re-search-backward
(rx bol ";;; " (regexp name) " ends here")
nil t))))
"Can't find the footer line")
((not (and (lm-copyright-mark) (lm-crack-copyright)))
"Can't find a valid copyright notice")
((not (or non-fsf-ok
(string-match "Free Software Foundation"
(car (lm-crack-copyright)))))
"Copyright holder is not the Free Software Foundation")
(t
ret)))))
(if verbose
(message "%s" ret))
ret))