]> git.eshelyaron.com Git - emacs.git/commitdiff
New user option checkdoc-arguments-missing-flag
authorStefan Kangas <stefankangas@gmail.com>
Wed, 5 Mar 2025 23:33:21 +0000 (00:33 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sun, 9 Mar 2025 07:06:06 +0000 (08:06 +0100)
* lisp/emacs-lisp/checkdoc.el
(checkdoc-arguments-missing-flag): New user option.
(checkdoc-this-string-valid-engine): Use above new option.
(checkdoc--argument-missing-flag): Make into obsolete variable alias for
above new option.

(cherry picked from commit 679966b5a091106d37a2e2e769d9e87f3fb92a63)

lisp/emacs-lisp/checkdoc.el

index 0180aee55bf10338f197caf1f6cbdde6cc55a346..0c5713bb37ca47a4216876d17ae131598d1a970b 100644 (file)
@@ -338,19 +338,19 @@ This should be set in an Emacs Lisp file's local variables."
 ;; This is how you can use checkdoc to make mass fixes on the Emacs
 ;; source tree:
 ;;
-;; (setq checkdoc--argument-missing-flag nil)      ; optional
+;; (setq checkdoc-arguments-missing-flag nil)      ; optional
 ;; (setq checkdoc--disambiguate-symbol-flag nil)   ; optional
 ;; (setq checkdoc--interactive-docstring-flag nil) ; optional
 ;; (setq checkdoc-permit-comma-termination-flag t) ; optional
-;; (setq checkdoc-verb-check-experimental-flag nil)
 ;; Then use `M-x find-dired' ("-name '*.el'") and `M-x checkdoc-dired'
 
-(defvar checkdoc--argument-missing-flag t
-  "Non-nil means warn if arguments are missing from docstring.
-This variable is intended for use on Emacs itself, where the
-large number of libraries means it is impractical to fix all
-of these warnings en masse.  In almost any other case, setting
-this to anything but t is likely to be counter-productive.")
+(define-obsolete-variable-alias 'checkdoc--argument-missing-flag
+  'checkdoc-arguments-missing-flag "31.1")
+(defcustom checkdoc-arguments-missing-flag t
+  "Non-nil means warn if function arguments are missing from docstring."
+  :type 'boolean
+  :version "31.1")
+;;;###autoload(put 'checkdoc-arguments-missing-flag 'safe-local-variable 'booleanp)
 
 (defvar checkdoc--disambiguate-symbol-flag t
   "Non-nil means ask to disambiguate Lisp symbol.
@@ -1837,7 +1837,7 @@ function,command,variable,option or symbol." ms1))))))
                                                  (looking-at "[.?!]")))
                             (insert "."))
                         nil)
-                     (when checkdoc--argument-missing-flag
+                     (when checkdoc-arguments-missing-flag
                        (checkdoc-create-error
                         (format-message
                          "Argument `%s' should appear (as %s) in the doc string"