emacs-diffs
[Top][All Lists]
Advanced

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

master baa9ea7: Document 'zap-up-to-char'


From: Eli Zaretskii
Subject: master baa9ea7: Document 'zap-up-to-char'
Date: Fri, 29 Nov 2019 05:18:09 -0500 (EST)

branch: master
commit baa9ea73953396d93d0455f8ad9ae924d349a6eb
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Document 'zap-up-to-char'
    
    * doc/emacs/killing.texi (Other Kill Commands): Document
    'zap-up-to-char'.
    
    * lisp/simple.el (zap-to-char): Mention 'zap-up-to-char' in
    the doc string.  (Bug#38392)
---
 doc/emacs/killing.texi | 6 ++++++
 lisp/simple.el         | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi
index ce00cb3..f5f715d 100644
--- a/doc/emacs/killing.texi
+++ b/doc/emacs/killing.texi
@@ -219,6 +219,8 @@ Kill to the end of the sentence (@code{kill-sentence}).
 Kill the following balanced expression (@code{kill-sexp}).  @xref{Expressions}.
 @item M-z @var{char}
 Kill through the next occurrence of @var{char} (@code{zap-to-char}).
+@item M-x zap-up-to-char @var{char}
+Kill up to, but not including, the next occurrence of @var{char}.
 @end table
 
 @kindex C-w
@@ -248,6 +250,10 @@ search backward and kill text before point.  A history of 
previously
 used characters is maintained and can be accessed via the
 @kbd{M-p}/@kbd{M-n} keystrokes.  This is mainly useful if the
 character to be used has to be entered via a complicated input method.
+@findex zap-up-to-char
+A similar command @code{zap-up-to-char} kills from point up to, but
+not including the next occurrence of a character, with numeric
+argument acting as a repeat count.
 
 @node Kill Options
 @subsection Options for Killing
diff --git a/lisp/simple.el b/lisp/simple.el
index 2aac557..47ce036 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -5191,7 +5191,8 @@ and KILLP is t if a prefix arg was specified."
 (defun zap-to-char (arg char)
   "Kill up to and including ARGth occurrence of 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."
+Goes backward if ARG is negative; error if CHAR not found.
+See also `zap-up-to-char'."
   (interactive (list (prefix-numeric-value current-prefix-arg)
                     (read-char-from-minibuffer "Zap to char: "
                                                nil 'read-char-history)))



reply via email to

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