unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#39154: 27.0.60; Use character history in zap-up-to-char
@ 2020-01-16 18:49 Tino Calancha
  2020-01-16 18:56 ` Tino Calancha
       [not found] ` <877e1rexzi.fsf@mail.linkov.net>
  0 siblings, 2 replies; 15+ messages in thread
From: Tino Calancha @ 2020-01-16 18:49 UTC (permalink / raw)
  To: 39154; +Cc: juri linkov

X-Debbugs-Cc: Juri Linkov <juri@linkov.net>
Severity: wishlist

While zapping I saw in the news about recent `zap-to-char' changes...
( I mean Emacs news, I don't watch TV! :-| )

We might want to extend that to cover `zap-up-to-char' as well; as many others,
I weardly use the former, but I often use the latter.

--8<-----------------------------cut here---------------start------------->8---
commit 5436b891aadaf649ae6ab3e204b74c76bfa4e6f8
Author: Tino Calancha <tino.calancha@gmail.com>
Date:   Thu Jan 16 19:30:03 2020 +0100

    Use character history in zap-up-to-char
    
    Extend commit
    'Add CHARS arg to read-char-from-minibuffer compatible with read-char-choice.'
    (04ab67470706f1c66bdf08e4078ea3dffd79b41e)
    to `zap-up-to-char'.
    
    * lisp/misc.el (lisp/misc.el): Use same interactive specification
    as in `zap-to-char'.
    * etc/NEWS (): Mention zap-up-to-char as well.

diff --git a/etc/NEWS b/etc/NEWS
index d6eb5d9e66..08e8907a2c 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -603,10 +603,10 @@ navigation and editing of large files.
 
 +++
 ** 'zap-to-char' now uses the history of characters you used to zap to.
-'zap-to-char' uses the new 'read-char-from-minibuffer' function to allow
-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.
+'zap-to-char' and 'zap-up-to-char' use the new 'read-char-from-minibuffer'
+function to allow 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.
 
 +++
 ** 'save-some-buffers' now has a new action in the prompt: 'C-f' will
diff --git a/lisp/misc.el b/lisp/misc.el
index 05244a6ea2..8b6b7a7e0d 100644
--- a/lisp/misc.el
+++ b/lisp/misc.el
@@ -69,7 +69,9 @@ zap-up-to-char
 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 to char: "
+						nil 'read-char-history)))
   (let ((direction (if (>= arg 0) 1 -1)))
     (kill-region (point)
 		 (progn
--8<-----------------------------cut here---------------end--------------->8---


In GNU Emacs 27.0.60 (build 52, x86_64-pc-linux-gnu, GTK+ Version 3.24.5)
 of 2020-01-16 built on calancha-pc.dy.bbexcite.jp
Repository revision: 52080b5778cbe535c331fa14539aecd88f2be0a0
Repository branch: emacs-27
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux 10 (buster)





^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-09-25 11:28 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-16 18:49 bug#39154: 27.0.60; Use character history in zap-up-to-char Tino Calancha
2020-01-16 18:56 ` Tino Calancha
     [not found] ` <877e1rexzi.fsf@mail.linkov.net>
2020-01-18 14:37   ` Tino Calancha
2020-01-20  0:24     ` Juri Linkov
2020-01-23 13:51       ` Tino Calancha
2020-01-23 18:16         ` Eli Zaretskii
2020-01-25 19:43           ` Tino Calancha
2020-01-28 23:49         ` Juri Linkov
2020-02-02 13:54           ` Tino Calancha
2020-02-05  7:21           ` Tino Calancha
2020-02-05 15:22             ` Drew Adams
2020-02-05 19:46               ` Tino Calancha
2020-02-05 21:10                 ` Drew Adams
2020-02-05 21:56             ` Juri Linkov
2020-09-25 11:28         ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).