aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTino Calancha2020-09-25 13:25:08 +0200
committerLars Ingebrigtsen2020-09-25 13:25:14 +0200
commit830e876d94a8cfc5a516e7fcd867525754508cf3 (patch)
tree07c9fd073e4084c7752e7be50ae145a66609f820
parent8a253a96a0db4dd585ab787345657d952c7babec (diff)
downloademacs-830e876d94a8cfc5a516e7fcd867525754508cf3.tar.gz
emacs-830e876d94a8cfc5a516e7fcd867525754508cf3.zip
Use the char history in zap-up-to-char
* lisp/misc.el (zap-up-to-char): Use read-char-from-minibuffer (bug#39154).
-rw-r--r--etc/NEWS7
-rw-r--r--lisp/misc.el4
2 files changed, 10 insertions, 1 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 9cd8aaa41c8..4cd40c3657c 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1064,6 +1064,13 @@ window after starting). This variable defaults to nil.
1064 1064
1065** Miscellaneous 1065** Miscellaneous
1066 1066
1067---
1068*** 'zap-up-to-char' now uses 'read-char-from-minibuffer'.
1069This allows navigating through the history of characters that have
1070been input. This is mostly useful for characters that have complex
1071input methods where inputting the character again may involve many
1072keystrokes.
1073
1067+++ 1074+++
1068*** Interactive regular expression search now uses faces for sub-groups. 1075*** Interactive regular expression search now uses faces for sub-groups.
1069E.g., 'C-M-s foo-\([0-9]+\)' will now use the 'isearch-group-1' face 1076E.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 8c39492784b..be191c50d2f 100644
--- a/lisp/misc.el
+++ b/lisp/misc.el
@@ -69,7 +69,9 @@ The characters copied are inserted in the buffer before point."
69Case is ignored if `case-fold-search' is non-nil in the current buffer. 69Case is ignored if `case-fold-search' is non-nil in the current buffer.
70Goes backward if ARG is negative; error if CHAR not found. 70Goes backward if ARG is negative; error if CHAR not found.
71Ignores CHAR at point." 71Ignores CHAR at point."
72 (interactive "p\ncZap up to char: ") 72 (interactive (list (prefix-numeric-value current-prefix-arg)
73 (read-char-from-minibuffer "Zap up to char: "
74 nil 'read-char-history)))
73 (let ((direction (if (>= arg 0) 1 -1))) 75 (let ((direction (if (>= arg 0) 1 -1)))
74 (kill-region (point) 76 (kill-region (point)
75 (progn 77 (progn