diff options
| author | Eli Zaretskii | 2015-11-28 14:32:04 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2015-11-28 14:32:04 +0200 |
| commit | d4ade2c8fac7d0279a62c71f5a29835b986581e0 (patch) | |
| tree | 482101473e39ee8e0511747502994ca847c9ca21 | |
| parent | c217802b0f1b5b2b3858b1036a71b9570d0b5cbe (diff) | |
| download | emacs-d4ade2c8fac7d0279a62c71f5a29835b986581e0.tar.gz emacs-d4ade2c8fac7d0279a62c71f5a29835b986581e0.zip | |
Document new checkdoc features
* doc/lispref/tips.texi (Tips, Library Headers): Document the
keyword-checking features of checkdoc and the commands
'checkdoc-file' and 'checkdoc-current-buffer'.
* etc/NEWS: Move the checkdoc-related entries to their own
section.
| -rw-r--r-- | doc/lispref/tips.texi | 16 | ||||
| -rw-r--r-- | etc/NEWS | 22 |
2 files changed, 27 insertions, 11 deletions
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi index d9cbf473306..ffce920bf4e 100644 --- a/doc/lispref/tips.texi +++ b/doc/lispref/tips.texi | |||
| @@ -14,11 +14,17 @@ it gives advice on making effective use of the features described in the | |||
| 14 | previous chapters, and describes conventions Emacs Lisp programmers | 14 | previous chapters, and describes conventions Emacs Lisp programmers |
| 15 | should follow. | 15 | should follow. |
| 16 | 16 | ||
| 17 | @findex checkdoc | ||
| 18 | @findex checkdoc-current-buffer | ||
| 19 | @findex checkdoc-file | ||
| 17 | You can automatically check some of the conventions described below by | 20 | You can automatically check some of the conventions described below by |
| 18 | running the command @kbd{M-x checkdoc RET} when visiting a Lisp file. | 21 | running the command @kbd{M-x checkdoc RET} when visiting a Lisp file. |
| 19 | It cannot check all of the conventions, and not all the warnings it | 22 | It cannot check all of the conventions, and not all the warnings it |
| 20 | gives necessarily correspond to problems, but it is worth examining them | 23 | gives necessarily correspond to problems, but it is worth examining them |
| 21 | all. | 24 | all. Alternatively, use the command @kbd{M-x checkdoc-current-buffer RET} |
| 25 | to check the conventions in the current buffer, or @code{checkdoc-file} | ||
| 26 | when you want to check a file in batch mode, e.g., with a command run by | ||
| 27 | @kbd{@w{M-x compile RET}}. | ||
| 22 | 28 | ||
| 23 | @menu | 29 | @menu |
| 24 | * Coding Conventions:: Conventions for clean and robust programs. | 30 | * Coding Conventions:: Conventions for clean and robust programs. |
| @@ -1007,8 +1013,14 @@ of multiple files, we recommend not writing the version in every file, | |||
| 1007 | but only the main one. | 1013 | but only the main one. |
| 1008 | 1014 | ||
| 1009 | @item Keywords | 1015 | @item Keywords |
| 1016 | @vindex checkdoc-package-keywords-flag | ||
| 1017 | @findex checkdoc-package-keywords | ||
| 1010 | This line lists keywords for the @code{finder-by-keyword} help command. | 1018 | This line lists keywords for the @code{finder-by-keyword} help command. |
| 1011 | Please use that command to see a list of the meaningful keywords. | 1019 | Please use that command to see a list of the meaningful keywords. The |
| 1020 | command @kbd{M-x checkdoc-package-keywords RET} will find and display | ||
| 1021 | any keywords that are not in @code{finder-known-keywords}. If you set | ||
| 1022 | the variable @code{checkdoc-package-keywords-flag} non-@code{nil}, | ||
| 1023 | checkdoc commands will include the keyword verification in its checks. | ||
| 1012 | 1024 | ||
| 1013 | This field is how people will find your package when they're looking | 1025 | This field is how people will find your package when they're looking |
| 1014 | for things by topic. To separate the keywords, you can use spaces, | 1026 | for things by topic. To separate the keywords, you can use spaces, |
| @@ -135,15 +135,6 @@ frames. | |||
| 135 | Works for functions, variables, faces, etc. It is bound to `C-h o' by | 135 | Works for functions, variables, faces, etc. It is bound to `C-h o' by |
| 136 | default. | 136 | default. |
| 137 | 137 | ||
| 138 | ** New command `checkdoc-package-keywords' checks if the | ||
| 139 | current package keywords are recognized. Set the new option | ||
| 140 | `checkdoc-package-keywords-flag' to non-nil to make | ||
| 141 | `checkdoc-current-buffer' call this function automatically. | ||
| 142 | |||
| 143 | ** New function `checkdoc-file' checks for style errors. | ||
| 144 | It's meant for use together with `compile': | ||
| 145 | emacs -batch --eval "(checkdoc-file \"subr.el\")" | ||
| 146 | |||
| 147 | ** New command `comment-line' bound to `C-x C-;'. | 138 | ** New command `comment-line' bound to `C-x C-;'. |
| 148 | 139 | ||
| 149 | ** New function `custom-prompt-customize-unsaved-options' checks for | 140 | ** New function `custom-prompt-customize-unsaved-options' checks for |
| @@ -360,6 +351,19 @@ standards. | |||
| 360 | 351 | ||
| 361 | * Changes in Specialized Modes and Packages in Emacs 25.1 | 352 | * Changes in Specialized Modes and Packages in Emacs 25.1 |
| 362 | 353 | ||
| 354 | ** Checkdoc | ||
| 355 | |||
| 356 | +++ | ||
| 357 | *** New command `checkdoc-package-keywords' checks if the | ||
| 358 | current package keywords are recognized. Set the new option | ||
| 359 | `checkdoc-package-keywords-flag' to non-nil to make | ||
| 360 | `checkdoc-current-buffer' call this function automatically. | ||
| 361 | |||
| 362 | +++ | ||
| 363 | *** New function `checkdoc-file' checks for style errors. | ||
| 364 | It's meant for use together with `compile': | ||
| 365 | emacs -batch --eval "(checkdoc-file \"subr.el\")" | ||
| 366 | |||
| 363 | ** New function `bookmark-set-no-overwrite' bound to C-x r M. | 367 | ** New function `bookmark-set-no-overwrite' bound to C-x r M. |
| 364 | It raises an error if a bookmark of that name already exists, | 368 | It raises an error if a bookmark of that name already exists, |
| 365 | unlike `bookmark-set' which silently updates an existing bookmark. | 369 | unlike `bookmark-set' which silently updates an existing bookmark. |