Mercurial > emacs
comparison lisp/emacs-lisp/checkdoc.el @ 104554:fd66344736c6
Kevin Ryde <user42 at zip.com.au>
(checkdoc-force-history-flag, checkdoc-arguments-in-order-flag):
Add safe-local-variable booleanp.
(checkdoc-symbol-words): Add safe-local-variable for list of strings.
Clarify docstring that the value is strings not symbols.
(checkdoc-list-of-strings-p): New function.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sat, 22 Aug 2009 23:02:14 +0000 |
parents | cce8d50c4566 |
children | f0b66ed6123b |
comparison
equal
deleted
inserted
replaced
104553:86a609c04ee2 | 104554:fd66344736c6 |
---|---|
221 (defcustom checkdoc-force-history-flag t | 221 (defcustom checkdoc-force-history-flag t |
222 "Non-nil means that files should have a History section or ChangeLog file. | 222 "Non-nil means that files should have a History section or ChangeLog file. |
223 This helps document the evolution of, and recent changes to, the package." | 223 This helps document the evolution of, and recent changes to, the package." |
224 :group 'checkdoc | 224 :group 'checkdoc |
225 :type 'boolean) | 225 :type 'boolean) |
226 ;;;###autoload(put 'checkdoc-force-history-flag 'safe-local-variable 'booleanp) | |
226 | 227 |
227 (defcustom checkdoc-permit-comma-termination-flag nil | 228 (defcustom checkdoc-permit-comma-termination-flag nil |
228 "Non-nil means the first line of a docstring may end with a comma. | 229 "Non-nil means the first line of a docstring may end with a comma. |
229 Ordinarily, a full sentence is required. This may be misleading when | 230 Ordinarily, a full sentence is required. This may be misleading when |
230 there is a substantial caveat to the one-line description -- the comma | 231 there is a substantial caveat to the one-line description -- the comma |
268 appear in the proper form in the documentation, not that they are in | 269 appear in the proper form in the documentation, not that they are in |
269 the same order as they appear in the argument list. No mention is | 270 the same order as they appear in the argument list. No mention is |
270 made in the style guide relating to order." | 271 made in the style guide relating to order." |
271 :group 'checkdoc | 272 :group 'checkdoc |
272 :type 'boolean) | 273 :type 'boolean) |
274 ;;;###autoload(put 'checkdoc-arguments-in-order-flag 'safe-local-variable 'booleanp) | |
273 | 275 |
274 (defvar checkdoc-style-hooks nil | 276 (defvar checkdoc-style-hooks nil |
275 "Hooks called after the standard style check is completed. | 277 "Hooks called after the standard style check is completed. |
276 All hooks must return nil or a string representing the error found. | 278 All hooks must return nil or a string representing the error found. |
277 Useful for adding new user implemented commands. | 279 Useful for adding new user implemented commands. |
305 "Non-nil means generate warnings in a buffer for browsing. | 307 "Non-nil means generate warnings in a buffer for browsing. |
306 Do not set this by hand, use a function like `checkdoc-current-buffer' | 308 Do not set this by hand, use a function like `checkdoc-current-buffer' |
307 with a universal argument.") | 309 with a universal argument.") |
308 | 310 |
309 (defcustom checkdoc-symbol-words nil | 311 (defcustom checkdoc-symbol-words nil |
310 "A list of symbols which also happen to make good words. | 312 "A list of symbol names (strings) which also happen to make good words. |
311 These symbol-words are ignored when unquoted symbols are searched for. | 313 These words are ignored when unquoted symbols are searched for. |
312 This should be set in an Emacs Lisp file's local variables." | 314 This should be set in an Emacs Lisp file's local variables." |
313 :group 'checkdoc | 315 :group 'checkdoc |
314 :type '(repeat (symbol :tag "Word"))) | 316 :type '(repeat (symbol :tag "Word"))) |
317 ;;;###autoload(put 'checkdoc-symbol-words 'safe-local-variable 'checkdoc-list-of-strings-p) | |
318 | |
319 ;;;###autoload | |
320 (defun checkdoc-list-of-strings-p (obj) | |
321 ;; this is a function so it might be shared by checkdoc-proper-noun-list | |
322 ;; and/or checkdoc-ispell-lisp-words in the future | |
323 (and (listp obj) | |
324 (not (memq nil (mapcar 'stringp obj))))) | |
315 | 325 |
316 (defvar checkdoc-proper-noun-list | 326 (defvar checkdoc-proper-noun-list |
317 '("ispell" "xemacs" "emacs" "lisp") | 327 '("ispell" "xemacs" "emacs" "lisp") |
318 "List of words (not capitalized) which should be capitalized.") | 328 "List of words (not capitalized) which should be capitalized.") |
319 | 329 |