bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#47566: 28.0.50; diff-hl should use `repeat-mode' ... and not `smartr


From: Juri Linkov
Subject: bug#47566: 28.0.50; diff-hl should use `repeat-mode' ... and not `smartrep'
Date: Thu, 08 Apr 2021 21:57:18 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

> (defun hl-test ()
>   (interactive)
>   (message "OK")
>   (message "result: %s"
>            (y-or-n-p "Yes? ")))
>
> (defvar hl-repeat-map
>   (let ((map (make-sparse-keymap)))
>     (define-key map (kbd "n") 'hl-test) ; Note the changed key binding.
>     map)
>   "Keymap to repeat hl-test.")
>
> (put 'hl-test 'repeat-map 'hl-repeat-map)
>
> To try it:
>
> 1. M-x hl-test.
> 2. Press 'n' a few times.
>
> Expected behavior:
>
> It alternates between the prompt "Yes? " and message "result: nil".
>
> Actual behavior:
>
> It enters some sort of recursive state, only showing the prompt. I have to
> press 'y' a bunch of times to get out of it.

Thanks for the detailed test case.  Now it's fixed in 580c4c6510.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]