From 3f7576025f35f7a5eac02d09103b2a42ada9b464 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Mon, 31 Mar 2025 10:22:51 +0200 Subject: [PATCH] Remove 'checkdoc-minor-mode' --- lisp/emacs-lisp/checkdoc.el | 86 +------------------------------------ 1 file changed, 2 insertions(+), 84 deletions(-) diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 1d01acf32a5..821a0fcb485 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -29,7 +29,7 @@ ;; to forget. The main checkdoc engine will perform the stylistic ;; checks needed to make sure these styles are remembered. ;; -;; There are four ways to use checkdoc: +;; There are three ways to use checkdoc: ;; ;; 1) Use `flymake-mode'. Type `M-x flymake-mode' in any Emacs Lisp ;; buffer; the checkdoc back-end is enabled by default. @@ -38,13 +38,7 @@ ;; The `checkdoc' command is a more interactive version of ;; `checkdoc-current-buffer'. ;; -;; 3) Use `checkdoc-minor-mode' to automatically check your -;; documentation whenever you evaluate Lisp code with C-M-x -;; or [menu-bar emacs-lisp eval-buffer]. Additional key-bindings -;; are also provided under C-c ? KEY -;; (add-hook 'emacs-lisp-mode-hook 'checkdoc-minor-mode) -;; -;; 4) Use `checkdoc-ispell' to spellcheck docstrings interactively. +;; 3) Use `checkdoc-ispell' to spellcheck docstrings interactively. ;; ;; Using `checkdoc': ;; @@ -187,11 +181,6 @@ :link '(emacs-commentary-link "checkdoc.el") :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)) - :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 @@ -1276,75 +1265,6 @@ which see." nil) (checkdoc--create-error text start end fix))) -;;; Minor Mode specification -;; - -(defvar-keymap checkdoc-minor-mode-map - :doc "Keymap used to override evaluation key-bindings for documentation checking." - ;; Override some bindings - "C-M-x" #'checkdoc-eval-defun - "C-x `" #'checkdoc-continue - " " #'checkdoc-eval-current-buffer - - ;; Add some new bindings under C-c ? - "C-c ? x" #'checkdoc-defun - "C-c ? X" #'checkdoc-ispell-defun - "C-c ? `" #'checkdoc-continue - "C-c ? ~" #'checkdoc-ispell-continue - "C-c ? s" #'checkdoc-start - "C-c ? S" #'checkdoc-ispell-start - "C-c ? d" #'checkdoc - "C-c ? D" #'checkdoc-ispell - "C-c ? b" #'checkdoc-current-buffer - "C-c ? B" #'checkdoc-ispell-current-buffer - "C-c ? e" #'checkdoc-eval-current-buffer - "C-c ? m" #'checkdoc-message-text - "C-c ? M" #'checkdoc-ispell-message-text - "C-c ? c" #'checkdoc-comments - "C-c ? C" #'checkdoc-ispell-comments - "C-c ? SPC" #'checkdoc-rogue-spaces) - -(easy-menu-define nil checkdoc-minor-mode-map - "Checkdoc Minor Mode Menu." - '("CheckDoc" - ["Interactive Buffer Style Check" checkdoc t] - ["Interactive Buffer Style and Spelling Check" checkdoc-ispell t] - ["Check Buffer" checkdoc-current-buffer t] - ["Check and Spell Buffer" checkdoc-ispell-current-buffer t] - "---" - ["Interactive Style Check" checkdoc-interactive t] - ["Interactive Style and Spelling Check" checkdoc-ispell-interactive t] - ["Find First Style Error" checkdoc-start t] - ["Find First Style or Spelling Error" checkdoc-ispell-start t] - ["Next Style Error" checkdoc-continue t] - ["Next Style or Spelling Error" checkdoc-ispell-continue t] - ["Interactive Message Text Style Check" checkdoc-message-interactive t] - ["Interactive Message Text Style and Spelling Check" - checkdoc-ispell-message-interactive t] - ["Check Message Text" checkdoc-message-text t] - ["Check and Spell Message Text" checkdoc-ispell-message-text t] - ["Check Comment Style" checkdoc-comments buffer-file-name] - ["Check Comment Style and Spelling" checkdoc-ispell-comments - buffer-file-name] - ["Check for Rogue Spaces" checkdoc-rogue-spaces t] - "---" - ["Check Defun" checkdoc-defun t] - ["Check and Spell Defun" checkdoc-ispell-defun t] - ["Check and Evaluate Defun" checkdoc-eval-defun t] - ["Check and Evaluate Buffer" checkdoc-eval-current-buffer t])) - -;;;###autoload -(define-minor-mode checkdoc-minor-mode - "Toggle automatic docstring checking (Checkdoc minor mode). - -In Checkdoc minor mode, the usual bindings for `eval-defun' which is -bound to \\\\[checkdoc-eval-defun] and `checkdoc-eval-current-buffer' are overridden to include -checking of documentation strings. - -\\{checkdoc-minor-mode-map}" - :lighter checkdoc-minor-mode-string - :group 'checkdoc) - ;;; Subst utils ;; @@ -2843,8 +2763,6 @@ function called to create the messages." (when (re-search-forward "^;; Keywords: \\(.*\\)$" nil t) (split-string (match-string-no-properties 1) ", " t)))) -(custom-add-option 'emacs-lisp-mode-hook 'checkdoc-minor-mode) - (define-obsolete-function-alias 'checkdoc-run-hooks #'run-hook-with-args-until-success "28.1") (defvar checkdoc-version "0.6.2" -- 2.39.5