diff options
| author | Tino Calancha | 2020-09-25 13:25:08 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2020-09-25 13:25:14 +0200 |
| commit | 830e876d94a8cfc5a516e7fcd867525754508cf3 (patch) | |
| tree | 07c9fd073e4084c7752e7be50ae145a66609f820 | |
| parent | 8a253a96a0db4dd585ab787345657d952c7babec (diff) | |
| download | emacs-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/NEWS | 7 | ||||
| -rw-r--r-- | lisp/misc.el | 4 |
2 files changed, 10 insertions, 1 deletions
| @@ -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'. | ||
| 1069 | This allows navigating through the history of characters that have | ||
| 1070 | been input. This is mostly useful for characters that have complex | ||
| 1071 | input methods where inputting the character again may involve many | ||
| 1072 | keystrokes. | ||
| 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. |
| 1069 | E.g., 'C-M-s foo-\([0-9]+\)' will now use the 'isearch-group-1' face | 1076 | 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 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." | |||
| 69 | Case is ignored if `case-fold-search' is non-nil in the current buffer. | 69 | Case is ignored if `case-fold-search' is non-nil in the current buffer. |
| 70 | Goes backward if ARG is negative; error if CHAR not found. | 70 | Goes backward if ARG is negative; error if CHAR not found. |
| 71 | Ignores CHAR at point." | 71 | Ignores 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 |