]> git.eshelyaron.com Git - emacs.git/commit
Optionally ask for confirmation before overwriting registers
authorEshel Yaron <me@eshelyaron.com>
Sun, 3 Dec 2023 19:44:16 +0000 (20:44 +0100)
committerEshel Yaron <me@eshelyaron.com>
Thu, 7 Dec 2023 18:25:36 +0000 (19:25 +0100)
commitc73620198263001b2252ae0a531a9547170b4192
tree54c5439467086fff01a19126a5f873d033198323
parentf42888a945b5d86cfd317cf3a9f8ecd74cc695a0
Optionally ask for confirmation before overwriting registers

Commands can now call 'register-read-with-preview' with optional
argument CONFIRM to ask the user for confirmation if they choose a
register that is already in use, subject to new user option
'register-confirm-overwrite'.  Commands that write to registers are
adapted to make use of this new argument.  When asking for
confirmation, Emacs also highlights the selected register in
the *Register Preview* buffer.

* lisp/register.el (register-confirm-overwrite): New user option.
(register-preview): New optional argument HIGHLIGHT.
(register-read-with-preview): Use them.  New optional arg CONFIRM.
(point-to-register,window-configuration-to-register)
(frame-configuration-to-register,number-to-register)
(copy-to-register,copy-rectangle-to-register)
* lisp/textmodes/picture.el (picture-clear-rectangle-to-register)
* lisp/calc/calc-yank.el (calc-copy-to-register)
* lisp/cedet/semantic/senator.el (senator-copy-tag-to-register)
* lisp/frameset.el (frameset-to-register)
* lisp/kmacro.el (kmacro-to-register)
* lisp/play/gametree.el (gametree-layout-to-register): Use new arg.
* doc/lispref/text.texi (Registers): Update.
* etc/NEWS: Announce.
doc/lispref/text.texi
etc/NEWS
lisp/calc/calc-yank.el
lisp/cedet/semantic/senator.el
lisp/frameset.el
lisp/kmacro.el
lisp/play/gametree.el
lisp/register.el
lisp/textmodes/picture.el