From 9bc2ac4a95ed2c1d6d7b56c3a1fd72e5ee1dc5f5 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sat, 25 Sep 2021 04:22:57 +0200 Subject: [PATCH] Add new user option ispell-help-timeout * lisp/textmodes/ispell.el (ispell-help-timeout): New user option. (ispell-help): Use it. --- etc/NEWS | 4 ++++ lisp/textmodes/ispell.el | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 84a6b3f10a1..32982122e28 100644 --- 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 +++ diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index b650ab38711..27a60c376c6 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -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") -- 2.39.2