]> git.eshelyaron.com Git - emacs.git/commit
Improve register-preview (Fix bug#66394)
authorThierry Volpiatto <thievol@posteo.net>
Sun, 19 Nov 2023 19:42:56 +0000 (20:42 +0100)
committerEli Zaretskii <eliz@gnu.org>
Wed, 29 Nov 2023 13:52:52 +0000 (15:52 +0200)
commit589e6ae1fb983bfba42f20906773555037246e45
tree482a393df7cbf9896bc9fd7eea21d30b56a73d15
parent463cd87f0590970cfd2918ba7028304e0f712001
Improve register-preview (Fix bug#66394)

A minibuffer is used now instead of read-key.
Registers in preview buffer are now filtered according to type of
registers the current command requires.
Navigation with C-n/p or up/down is now provided and update
minibuffer.
Current register is highlighted in preview buffer.

* lisp/register.el: (register-preview-default-keys)
(register-use-preview): New user variables.
(register-preview-info): New structure to store various info for
 preview.
(register-command-info): New generic.
(register-preview-forward-line): New, provide navigation in preview
buffer.
(register-preview-next, register-preview-previous): New, navigation.
(register-type): New, returns register type.
(register--type): Generic fn, new, returns register type according
to value.
(register-of-type-alist): New, filter register-alist according to
type.
(register-preview): Signature changed, use TYPES now.
(register-preview-get-defaults): New generic, compute defauts
according to action.
(register-read-with-preview): Now use read-from-minibuffer and
minibuffer-setup-hook.

* lisp/emacs-lisp/cl-generic.el: Add a call to
'cl--generic-prefill-dispatchers' to fix a build error.
lisp/emacs-lisp/cl-generic.el
lisp/register.el