Fix register-use-preview behavior with never value

Allow popping up preview when pressing C-h.

Don't exit the minibuffer when the call to
register-read-with-preview-fancy is triggered by C-h.

* lisp/register.el (register-read-with-preview-fancy): Do it.
This commit is contained in:
Thierry Volpiatto 2025-03-05 10:37:03 +01:00
parent 121371a706
commit 42a4c847e2
No known key found for this signature in database
GPG key ID: 08FDB07A7433A7F2

View file

@ -569,7 +569,11 @@ or \\='never."
(setq pat input))))
(if (setq win (get-buffer-window buffer))
(with-selected-window win
(when noconfirm
(when (or (eq noconfirm t) ; Using insist
;; Don't exit when noconfirm == (never)
;; If we are here user has pressed C-h
;; calling `register-preview-1'.
(memq nil noconfirm))
;; Happen only when
;; *-use-preview == insist.
(exit-minibuffer))