]> git.eshelyaron.com Git - emacs.git/commitdiff
Add new user option ispell-help-timeout
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 25 Sep 2021 02:22:57 +0000 (04:22 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 25 Sep 2021 02:56:28 +0000 (04:56 +0200)
* lisp/textmodes/ispell.el (ispell-help-timeout): New user option.
(ispell-help): Use it.

etc/NEWS
lisp/textmodes/ispell.el

index 84a6b3f10a1f7b1259010c6850f73988b43255c8..32982122e28ea9b3e6cc6bc7d988691e24a48e54 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1256,6 +1256,10 @@ These arguments default to active region when used interactively.
 +++
 *** New command 'ispell-comment-or-string-at-point'.
 
+---
+*** New user option 'ispell-help-timeout'.
+This controls how long the ispell help (on the '?' key) is displayed.
+
 ** Flyspell mode
 
 +++
index b650ab38711ee32a55d8e3c25ede74ec203a9c93..27a60c376c67fea4df8df87dbc4a625b86ba4bed 100644 (file)
@@ -398,6 +398,10 @@ 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
@@ -2460,7 +2464,7 @@ SPC:   Accept word this time.
              (with-current-buffer buffer
                (insert (concat help-1 "\n" help-2 "\n" help-3)))
              (ispell-display-buffer buffer)
-             (sit-for 5)
+             (sit-for ispell-help-timeout)
              (kill-buffer "*Ispell Help*"))
          (unwind-protect
              (let ((resize-mini-windows 'grow-only))
@@ -2470,7 +2474,7 @@ SPC:   Accept word this time.
                ;;(set-minibuffer-window (selected-window))
                (enlarge-window 2)
                (insert (concat help-1 "\n" help-2 "\n" help-3))
-               (sit-for 5))
+               (sit-for ispell-help-timeout))
            (erase-buffer)))))))
 
 (define-obsolete-function-alias 'lookup-words 'ispell-lookup-words "24.4")