summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/checkdoc.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/checkdoc.el')
-rw-r--r--lisp/emacs-lisp/checkdoc.el37
1 files changed, 14 insertions, 23 deletions
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index bc79df485b6..b2979693f6c 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -175,21 +175,6 @@
(defvar checkdoc-version "0.6.1"
"Release version of checkdoc you are currently running.")
-;; From custom web page for compatibility between versions of custom:
-(eval-and-compile
- (condition-case ()
- (require 'custom)
- (error nil))
- (if (and (featurep 'custom) (fboundp 'custom-declare-variable))
- nil ;; We've got what we needed
- ;; We have the old custom-library, hack around it!
- (defmacro defgroup (&rest args)
- nil)
- (defmacro custom-add-option (&rest args)
- nil)
- (defmacro defcustom (var value doc &rest args)
- `(defvar ,var ,value ,doc))))
-
(defvar compilation-error-regexp-alist)
(defvar compilation-mode-font-lock-keywords)
@@ -199,6 +184,12 @@
:group 'lisp
:version "20.3")
+(defcustom checkdoc-minor-mode-string " CDoc"
+ "*String to display in mode line when Checkdoc mode is enabled; nil for none."
+ :type '(choice string (const :tag "None" nil))
+ :group 'checkdoc
+ :version "23.1")
+
(defcustom checkdoc-autofix-flag 'semiautomatic
"Non-nil means attempt auto-fixing of doc strings.
If this value is the symbol `query', then the user is queried before
@@ -227,7 +218,7 @@ and that it's good but not required practice to make non user visible items
have doc strings."
:group 'checkdoc
:type 'boolean)
-(put 'checkdoc-force-docstrings-flag 'safe-local-variable 'booleanp)
+;;;###autoload(put 'checkdoc-force-docstrings-flag 'safe-local-variable 'booleanp)
(defcustom checkdoc-force-history-flag t
"Non-nil means that files should have a History section or ChangeLog file.
@@ -243,7 +234,7 @@ should be used when the first part could stand alone as a sentence, but
it indicates that a modifying clause follows."
:group 'checkdoc
:type 'boolean)
-(put 'checkdoc-permit-comma-termination-flag 'safe-local-variable 'booleanp)
+;;;###autoload(put 'checkdoc-permit-comma-termination-flag 'safe-local-variable 'booleanp)
(defcustom checkdoc-spellcheck-documentation-flag nil
"Non-nil means run Ispell on text based on value.
@@ -972,7 +963,7 @@ Optional argument INTERACT permits more interactive fixing."
(if (not (interactive-p))
e
(if e
- (message (checkdoc-error-text e))
+ (message "%s" (checkdoc-error-text e))
(checkdoc-show-diagnostics)
(message "Space Check: done.")))))
@@ -1032,15 +1023,15 @@ space at the end of each line."
(end (save-excursion (end-of-defun) (point)))
(msg (checkdoc-this-string-valid)))
(if msg (if no-error
- (message (checkdoc-error-text msg))
+ (message "%s" (checkdoc-error-text msg))
(error "%s" (checkdoc-error-text msg)))
(setq msg (checkdoc-message-text-search beg end))
(if msg (if no-error
- (message (checkdoc-error-text msg))
+ (message "%s" (checkdoc-error-text msg))
(error "%s" (checkdoc-error-text msg)))
(setq msg (checkdoc-rogue-space-check-engine beg end))
(if msg (if no-error
- (message (checkdoc-error-text msg))
+ (message "%s" (checkdoc-error-text msg))
(error "%s" (checkdoc-error-text msg))))))
(if (interactive-p) (message "Checkdoc: done."))))))
@@ -1176,7 +1167,7 @@ generating a buffered list of errors."
;; Override some bindings
(define-key map "\C-\M-x" 'checkdoc-eval-defun)
(define-key map "\C-x`" 'checkdoc-continue)
- (if (not (string-match "XEmacs" emacs-version))
+ (if (not (featurep 'xemacs))
(define-key map [menu-bar emacs-lisp eval-buffer]
'checkdoc-eval-current-buffer))
;; Add some new bindings under C-c ?
@@ -1251,7 +1242,7 @@ bound to \\<checkdoc-minor-mode-map>\\[checkdoc-eval-defun] and `checkdoc-eval-c
checking of documentation strings.
\\{checkdoc-minor-mode-map}"
- nil " CDoc" nil
+ nil checkdoc-minor-mode-string nil
:group 'checkdoc)
;;; Subst utils