GNU Info

Info Node: (emacs-lisp-intro.info)zap-to-char

(emacs-lisp-intro.info)zap-to-char


Next: kill-region Prev: Storing Text Up: Cutting & Storing Text
Enter node , (file) or (file)node

`zap-to-char'
=============

   The `zap-to-char' function barely changed between GNU Emacs version
19 and GNU Emacs version 21.  However, `zap-to-char' calls another
function, `kill-region', which enjoyed a major rewrite on the way to
version 21.

   The `kill-region' function in Emacs 19 is complex, but does not use
code that is important at this time.  We will skip it.

   The `kill-region' function in Emacs 21 is easier to read than the
same function in Emacs 19 and introduces a very important concept, that
of error handling.  We will walk through the function.

   But first, let us look at the interactive `zap-to-char' function.

Complete zap-to-char
The complete implementation.
zap-to-char interactive
A three part interactive expression.
zap-to-char body
A short overview.
search-forward
How to search for a string.
progn
The `progn' special form.
Summing up zap-to-char
Using `point' and `search-forward'.

automatically generated by info2www version 1.2.2.9