1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-30 08:09:04 +00:00

Use the char history in zap-up-to-char

* lisp/misc.el (zap-up-to-char): Use read-char-from-minibuffer
(bug#39154).
This commit is contained in:
Tino Calancha 2020-09-25 13:25:08 +02:00 committed by Lars Ingebrigtsen
parent 8a253a96a0
commit 830e876d94
2 changed files with 10 additions and 1 deletions

View File

@ -1064,6 +1064,13 @@ window after starting). This variable defaults to nil.
** Miscellaneous
---
*** 'zap-up-to-char' now uses 'read-char-from-minibuffer'.
This allows navigating through the history of characters that have
been input. This is mostly useful for characters that have complex
input methods where inputting the character again may involve many
keystrokes.
+++
*** Interactive regular expression search now uses faces for sub-groups.
E.g., 'C-M-s foo-\([0-9]+\)' will now use the 'isearch-group-1' face

View File

@ -69,7 +69,9 @@ The characters copied are inserted in the buffer before point."
Case is ignored if `case-fold-search' is non-nil in the current buffer.
Goes backward if ARG is negative; error if CHAR not found.
Ignores CHAR at point."
(interactive "p\ncZap up to char: ")
(interactive (list (prefix-numeric-value current-prefix-arg)
(read-char-from-minibuffer "Zap up to char: "
nil 'read-char-history)))
(let ((direction (if (>= arg 0) 1 -1)))
(kill-region (point)
(progn