Subject: bug#75804: 31.0.50; Enlarge or disable `ispell-help-timeout'

From: Pip Cet <[email-masked]>
Date: Sun, 26 Jan 2025 14:31:38 +0000

"Stefan Kangas" <[email-masked]> writes:

> 3. We should probably consider this, because a value <1 is rather
>    useless and more likely than not a user mistake:
> diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
> index 761a413baab..7b1f5c8ed7f 100644
> --- a/lisp/textmodes/ispell.el
> +++ b/lisp/textmodes/ispell.el
> @@ -2513,7 +2513,7 @@ 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)
> +	      (sit-for (max ispell-help-timeout 1))
>  	      (kill-buffer "*Ispell Help*"))
>  	  (unwind-protect
>  	      (let ((resize-mini-windows 'grow-only))
> @@ -2523,7 +2523,7 @@ ispell-help
>  		;;(set-minibuffer-window (selected-window))
>  		(enlarge-window 2)
>  		(insert (concat help-1 "\n" help-2 "\n" help-3))
> -		(sit-for ispell-help-timeout))
> +		(sit-for (max ispell-help-timeout 1)))
>  	    (erase-buffer)))))))
>
>  (define-obsolete-function-alias 'lookup-words 'ispell-lookup-words "24.4")

I'm not sure 0 is useful, but what about 0.5?

>> diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
>> index b0f4e416a6e..eca42b63023 100644
>> --- a/lisp/textmodes/ispell.el
>> +++ b/lisp/textmodes/ispell.el
>> @@ -402,7 +402,7 @@ ispell-local-dictionary-alist
>>   			       (const :tag "default" nil))
>>                         (coding-system :tag "Coding System"))))
>>
>> -(defcustom ispell-help-timeout 5
>> +(defcustom ispell-help-timeout 30
>>    "The number of seconds to display the help text."
>>    :type 'number
>>    :version "28.1")
>
> The :type should be 'natnum instead, and the :version tag needs updating
> like Robert pointed out.

It's not immediately obvious to me, from the code, why this cannot be a
float.  Can you explain?

Thanks!

Pip