]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove 'ispell-help'
authorEshel Yaron <me@eshelyaron.com>
Sun, 26 Jan 2025 18:10:31 +0000 (19:10 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sun, 26 Jan 2025 18:10:31 +0000 (19:10 +0100)
lisp/textmodes/ispell.el

index 6fb07092bcf7c967132e84a84dff514f4bc8f8d7..f4642c992b57c923496fab6bd4e8d83f1a609fd5 100644 (file)
 ;;    dictionary entries.
 ;;  Multi-byte characters if not defined by current dictionary may result in the
 ;;    evil "misalignment error" in some versions of Emacs.
-;;  On some versions of Emacs, growing the minibuffer fails.
-;;    see `ispell-help-in-bufferp'.
 ;;  Recursive edits (?C-r or ?R) inside a keyboard text replacement check (?r)
 ;;    can cause misalignment errors.
 
@@ -286,15 +284,6 @@ When nil, Emacs uses pipes."
 Otherwise `ispell-word' checks the preceding word."
   :type 'boolean)
 
-(defcustom ispell-help-in-bufferp nil
-  "Non-nil means display interactive keymap help in a buffer.
-The following values are supported:
-  nil        Expand the minibuffer and display a short help message
-             there for a couple of seconds.
-  t          Pop up a new buffer and display a short help message there
-             for a couple of seconds."
-  :type '(choice (const :tag "off" nil) (const :tag "on" t)))
-
 (defcustom ispell-quietly nil
   "Non-nil means suppress messages in `ispell-word'."
   :type 'boolean)
@@ -400,11 +389,6 @@ re-start Emacs."
                               (const :tag "default" nil))
                        (coding-system :tag "Coding System"))))
 
-(defcustom ispell-help-timeout 5
-  "The number of seconds to display the help text."
-  :type 'number
-  :version "28.1")
-
 (defvar ispell-dictionary-base-alist
   '((nil                                ; default
      ;; The default dictionary.  It may be English.aff, or any other
@@ -1441,11 +1425,6 @@ The variable `ispell-library-directory' defines their location."
       `(menu-item ,(purecopy "Customize...")
                  (lambda () (interactive) (customize-group 'ispell))
                  :help ,(purecopy "Customize spell checking options")))
-    (define-key map [ispell-help]
-      ;; use (x-popup-menu last-nonmenu-event(list "" ispell-help-list)) ?
-      `(menu-item ,(purecopy "Help")
-                 (lambda () (interactive) (describe-function 'ispell-help))
-                 :help ,(purecopy "Show standard Ispell keybindings and commands")))
     (define-key map [flyspell-mode]
       `(menu-item ,(purecopy "Automatic spell checking (Flyspell)")
                  flyspell-mode
@@ -2165,7 +2144,7 @@ Global `ispell-quit' is set to start location to continue spell session."
        (choices miss)
        (window-min-height (min window-min-height
                                ispell-choices-win-default-height))
-       (command-characters '( ?  ?i ?a ?A ?r ?R ?? ?x ?X ?q ?l ?u ?m ))
+       (command-characters '( ?  ?i ?a ?A ?r ?R ?x ?X ?q ?l ?u ?m ))
        (skipped 0)
        char num result textwin)
 
@@ -2296,14 +2275,6 @@ Global `ispell-quit' is set to start location to continue spell session."
                           (ispell-highlight-spelling-error start end nil
                                                            'block))
                      result))
-                  ((or (= char ??) (= char help-char) (= char ?\C-h))
-                   (and (eq 'block ispell-highlight-p)
-                        (ispell-highlight-spelling-error start end nil t))
-                   (ispell-help)
-                   (and (eq 'block ispell-highlight-p)
-                        (ispell-highlight-spelling-error start end nil
-                                                         'block))
-                   t)
                   ;; Quit and move point back.
                   ((= char ?x)
                    (ispell-pdict-save ispell-silently-savep)
@@ -2438,55 +2409,6 @@ Global `ispell-quit' is set to start location to continue spell session."
     (ispell-display-buffer (get-buffer-create ispell-choices-buffer))))
 
 
-;;;###autoload
-(defun ispell-help ()
-  "Display a list of the options available when a misspelling is encountered.
-
-Selections are:
-
-\\`0'..\\`9'  Replace the word with a digit offered in the *Choices* buffer.
-\\`SPC' Accept word this time.
-\\`i'   Accept word and insert into personal dictionary.
-\\`a'   Accept word for this session.
-\\`A'   Accept word and place in `buffer-local dictionary'.
-\\`r'   Replace word with typed-in value.  Rechecked.
-\\`R'   Replace word with typed-in value.  Query-replaced in buffer.  Rechecked.
-\\`?'   Show these commands.
-\\`x'   Exit spelling buffer.  Move cursor to original point.
-\\`X'   Exit spelling buffer.  Leaves cursor at the current point, and permits
-         the aborted check to be completed later.
-\\`q'   Quit spelling session (Kills ispell process).
-\\`l'   Look up typed-in replacement in alternate dictionary.  Wildcards okay.
-\\`u'   Like \\`i', but the word is lower-cased first.
-\\`m'   Place typed-in value in personal dictionary, then recheck current word.
-\\`C-l' Redraw screen.
-\\`C-r' Recursive edit.
-\\`C-z' Suspend Emacs or iconify frame."
-  (let ((help-1 (concat "[r/R]eplace word; [a/A]ccept for this session; "
-                       "[i]nsert into personal dictionary"))
-       (help-2 (concat "[l]ook a word up in alternate dictionary;  "
-                       "e[x/X]it;  [q]uit session"))
-       (help-3 (concat "[u]ncapitalized insert into dict.  "
-                       "Type `x C-h f ispell-help' for more help")))
-    (save-window-excursion
-      (if ispell-help-in-bufferp
-         (let ((buffer (get-buffer-create "*Ispell Help*")))
-           (with-current-buffer buffer
-             (insert (concat help-1 "\n" help-2 "\n" help-3)))
-           (ispell-display-buffer buffer)
-           (sit-for ispell-help-timeout)
-           (kill-buffer "*Ispell Help*"))
-       (unwind-protect
-           (let ((resize-mini-windows 'grow-only))
-             (select-window (minibuffer-window))
-             (erase-buffer)
-             (message nil)
-             ;;(set-minibuffer-window (selected-window))
-             (enlarge-window 2)
-             (insert (concat help-1 "\n" help-2 "\n" help-3))
-             (sit-for ispell-help-timeout))
-         (erase-buffer))))))
-
 (define-obsolete-function-alias 'lookup-words 'ispell-lookup-words "24.4")
 
 (defun ispell-lookup-words (word &optional lookup-dict)