diff options
| author | Eli Zaretskii | 2019-11-29 12:17:14 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2019-11-29 12:17:14 +0200 |
| commit | baa9ea73953396d93d0455f8ad9ae924d349a6eb (patch) | |
| tree | 16abc83250cd1827c60043cce7ffcf441218da0e | |
| parent | 11baa417c56b42441b7cf9e4092acd840440fe47 (diff) | |
| download | emacs-baa9ea73953396d93d0455f8ad9ae924d349a6eb.tar.gz emacs-baa9ea73953396d93d0455f8ad9ae924d349a6eb.zip | |
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)
| -rw-r--r-- | doc/emacs/killing.texi | 6 | ||||
| -rw-r--r-- | lisp/simple.el | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi index ce00cb38a74..f5f715dada4 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}). | |||
| 219 | Kill the following balanced expression (@code{kill-sexp}). @xref{Expressions}. | 219 | Kill the following balanced expression (@code{kill-sexp}). @xref{Expressions}. |
| 220 | @item M-z @var{char} | 220 | @item M-z @var{char} |
| 221 | Kill through the next occurrence of @var{char} (@code{zap-to-char}). | 221 | Kill through the next occurrence of @var{char} (@code{zap-to-char}). |
| 222 | @item M-x zap-up-to-char @var{char} | ||
| 223 | Kill up to, but not including, the next occurrence of @var{char}. | ||
| 222 | @end table | 224 | @end table |
| 223 | 225 | ||
| 224 | @kindex C-w | 226 | @kindex C-w |
| @@ -248,6 +250,10 @@ search backward and kill text before point. A history of previously | |||
| 248 | used characters is maintained and can be accessed via the | 250 | used characters is maintained and can be accessed via the |
| 249 | @kbd{M-p}/@kbd{M-n} keystrokes. This is mainly useful if the | 251 | @kbd{M-p}/@kbd{M-n} keystrokes. This is mainly useful if the |
| 250 | character to be used has to be entered via a complicated input method. | 252 | character to be used has to be entered via a complicated input method. |
| 253 | @findex zap-up-to-char | ||
| 254 | A similar command @code{zap-up-to-char} kills from point up to, but | ||
| 255 | not including the next occurrence of a character, with numeric | ||
| 256 | argument acting as a repeat count. | ||
| 251 | 257 | ||
| 252 | @node Kill Options | 258 | @node Kill Options |
| 253 | @subsection Options for Killing | 259 | @subsection Options for Killing |
diff --git a/lisp/simple.el b/lisp/simple.el index 2aac557154a..47ce0364d14 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -5191,7 +5191,8 @@ and KILLP is t if a prefix arg was specified." | |||
| 5191 | (defun zap-to-char (arg char) | 5191 | (defun zap-to-char (arg char) |
| 5192 | "Kill up to and including ARGth occurrence of CHAR. | 5192 | "Kill up to and including ARGth occurrence of CHAR. |
| 5193 | Case is ignored if `case-fold-search' is non-nil in the current buffer. | 5193 | Case is ignored if `case-fold-search' is non-nil in the current buffer. |
| 5194 | Goes backward if ARG is negative; error if CHAR not found." | 5194 | Goes backward if ARG is negative; error if CHAR not found. |
| 5195 | See also `zap-up-to-char'." | ||
| 5195 | (interactive (list (prefix-numeric-value current-prefix-arg) | 5196 | (interactive (list (prefix-numeric-value current-prefix-arg) |
| 5196 | (read-char-from-minibuffer "Zap to char: " | 5197 | (read-char-from-minibuffer "Zap to char: " |
| 5197 | nil 'read-char-history))) | 5198 | nil 'read-char-history))) |