mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-11 08:30:45 -08:00
Check shortdoc keywords and fix one mistake
* lisp/emacs-lisp/shortdoc.el (shortdoc--check) (define-short-documentation-group): Check that used keywords exist. * lisp/emacs-lisp/shortdoc.el (list): Fix a typo.
This commit is contained in:
parent
70dc170056
commit
ddfba511c1
1 changed files with 13 additions and 1 deletions
|
|
@ -50,6 +50,17 @@
|
||||||
'((t :inherit variable-pitch))
|
'((t :inherit variable-pitch))
|
||||||
"Face used for a section.")
|
"Face used for a section.")
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun shortdoc--check (group functions)
|
||||||
|
(let ((keywords '( :no-manual :args :eval :no-eval :no-value :no-eval*
|
||||||
|
:result :result-string :eg-result :eg-result-string :doc)))
|
||||||
|
(dolist (f functions)
|
||||||
|
(when (consp f)
|
||||||
|
(dolist (x f)
|
||||||
|
(when (and (keywordp x) (not (memq x keywords)))
|
||||||
|
(error "Shortdoc %s function `%s': bad keyword `%s'"
|
||||||
|
group (car f) x)))))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(progn
|
(progn
|
||||||
(defvar shortdoc--groups nil)
|
(defvar shortdoc--groups nil)
|
||||||
|
|
@ -118,6 +129,7 @@ A FUNC form can have any number of `:no-eval' (or `:no-value'),
|
||||||
`:no-eval*', `:result', `:result-string', `:eg-result' and
|
`:no-eval*', `:result', `:result-string', `:eg-result' and
|
||||||
`:eg-result-string' properties."
|
`:eg-result-string' properties."
|
||||||
(declare (indent defun))
|
(declare (indent defun))
|
||||||
|
(shortdoc--check group functions)
|
||||||
`(progn
|
`(progn
|
||||||
(setq shortdoc--groups (delq (assq ',group shortdoc--groups)
|
(setq shortdoc--groups (delq (assq ',group shortdoc--groups)
|
||||||
shortdoc--groups))
|
shortdoc--groups))
|
||||||
|
|
@ -715,7 +727,7 @@ A FUNC form can have any number of `:no-eval' (or `:no-value'),
|
||||||
:eval (plist-get '(a 1 b 2 c 3) 'b))
|
:eval (plist-get '(a 1 b 2 c 3) 'b))
|
||||||
(plist-put
|
(plist-put
|
||||||
:no-eval (setq plist (plist-put plist 'd 4))
|
:no-eval (setq plist (plist-put plist 'd 4))
|
||||||
:eq-result (a 1 b 2 c 3 d 4))
|
:eg-result (a 1 b 2 c 3 d 4))
|
||||||
(plist-member
|
(plist-member
|
||||||
:eval (plist-member '(a 1 b 2 c 3) 'b))
|
:eval (plist-member '(a 1 b 2 c 3) 'b))
|
||||||
"Data About Lists"
|
"Data About Lists"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue