emacs-diffs
[Top][All Lists]
Advanced

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

master 830e876: Use the char history in zap-up-to-char


From: Lars Ingebrigtsen
Subject: master 830e876: Use the char history in zap-up-to-char
Date: Fri, 25 Sep 2020 07:25:20 -0400 (EDT)

branch: master
commit 830e876d94a8cfc5a516e7fcd867525754508cf3
Author: Tino Calancha <tino.calancha@gmail.com>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Use the char history in zap-up-to-char
    
    * lisp/misc.el (zap-up-to-char): Use read-char-from-minibuffer
    (bug#39154).
---
 etc/NEWS     | 7 +++++++
 lisp/misc.el | 4 +++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/etc/NEWS b/etc/NEWS
index 9cd8aaa..4cd40c3 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -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
diff --git a/lisp/misc.el b/lisp/misc.el
index 8c39492..be191c5 100644
--- a/lisp/misc.el
+++ b/lisp/misc.el
@@ -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



reply via email to

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