diff options
| author | Mattias EngdegÄrd | 2024-02-19 10:27:02 +0100 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2024-02-19 15:57:05 +0100 |
| commit | ddfba511c190e5bb44e44a50aef5ab8c08e3d798 (patch) | |
| tree | a785fba51c7d2e12179520db63acfff996cbbbbb | |
| parent | 70dc1700562309c2612a71be35f9c71e9e1641b8 (diff) | |
| download | emacs-ddfba511c190e5bb44e44a50aef5ab8c08e3d798.tar.gz emacs-ddfba511c190e5bb44e44a50aef5ab8c08e3d798.zip | |
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.
| -rw-r--r-- | lisp/emacs-lisp/shortdoc.el | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el index a6a49c72f74..cde28985cd0 100644 --- a/lisp/emacs-lisp/shortdoc.el +++ b/lisp/emacs-lisp/shortdoc.el | |||
| @@ -51,6 +51,17 @@ | |||
| 51 | "Face used for a section.") | 51 | "Face used for a section.") |
| 52 | 52 | ||
| 53 | ;;;###autoload | 53 | ;;;###autoload |
| 54 | (defun shortdoc--check (group functions) | ||
| 55 | (let ((keywords '( :no-manual :args :eval :no-eval :no-value :no-eval* | ||
| 56 | :result :result-string :eg-result :eg-result-string :doc))) | ||
| 57 | (dolist (f functions) | ||
| 58 | (when (consp f) | ||
| 59 | (dolist (x f) | ||
| 60 | (when (and (keywordp x) (not (memq x keywords))) | ||
| 61 | (error "Shortdoc %s function `%s': bad keyword `%s'" | ||
| 62 | group (car f) x))))))) | ||
| 63 | |||
| 64 | ;;;###autoload | ||
| 54 | (progn | 65 | (progn |
| 55 | (defvar shortdoc--groups nil) | 66 | (defvar shortdoc--groups nil) |
| 56 | 67 | ||
| @@ -118,6 +129,7 @@ A FUNC form can have any number of `:no-eval' (or `:no-value'), | |||
| 118 | `:no-eval*', `:result', `:result-string', `:eg-result' and | 129 | `:no-eval*', `:result', `:result-string', `:eg-result' and |
| 119 | `:eg-result-string' properties." | 130 | `:eg-result-string' properties." |
| 120 | (declare (indent defun)) | 131 | (declare (indent defun)) |
| 132 | (shortdoc--check group functions) | ||
| 121 | `(progn | 133 | `(progn |
| 122 | (setq shortdoc--groups (delq (assq ',group shortdoc--groups) | 134 | (setq shortdoc--groups (delq (assq ',group shortdoc--groups) |
| 123 | shortdoc--groups)) | 135 | shortdoc--groups)) |
| @@ -715,7 +727,7 @@ A FUNC form can have any number of `:no-eval' (or `:no-value'), | |||
| 715 | :eval (plist-get '(a 1 b 2 c 3) 'b)) | 727 | :eval (plist-get '(a 1 b 2 c 3) 'b)) |
| 716 | (plist-put | 728 | (plist-put |
| 717 | :no-eval (setq plist (plist-put plist 'd 4)) | 729 | :no-eval (setq plist (plist-put plist 'd 4)) |
| 718 | :eq-result (a 1 b 2 c 3 d 4)) | 730 | :eg-result (a 1 b 2 c 3 d 4)) |
| 719 | (plist-member | 731 | (plist-member |
| 720 | :eval (plist-member '(a 1 b 2 c 3) 'b)) | 732 | :eval (plist-member '(a 1 b 2 c 3) 'b)) |
| 721 | "Data About Lists" | 733 | "Data About Lists" |