... form in Lisp that you will need to use in
most function definitions.
22 Chapter 1: List Processing
Buffer Names 23
2 Practicing Evaluation
Before learning how to write a function definition in Emacs ... this:
(buffer-name)"*scratch*"
You cannot do this in Info since Info is read-only and it will not allow you
to change the contents of the buffer. But you can do thi...
... evaluate the (beginning-of-line) expression and move
point to the beginning of the line. Then there is an inner while loop. This
while loop is designed to move the cursor out of the blank space between
paragraphs, ... compiled and installed
when Emacs is built. (etags is not an Emacs Lisp function or a part of
Emacs; it is a C program.)
To create a ‘TAGS’ file, first switch to...
... You can
learn from it and mine it for ideas. Having GNU Emacs is like having a
dragon’s cave of treasures.
In addition to learning about Emacs as an editor and Emacs Lisp as
a programming language, ... as an approachable hill, rather than as a daunting
mountain.
This introduction to Programming in Emacs Lisp has a companion doc-
ument, The GNU Emacs Lisp Refe...
... looks like.
Finally, the last line of the beginning-of-buffer command says to move
point to the beginning of the next line if the command is invoked with an
argument:
(if arg (forward-line 1)))
This ... command is a good function to start with
since you are likely to be familiar with it and it is easy to understand. Used
as an interactive command, beginning-of-buffer moves the c...
... text to the kill ring as the
latest item, and sets the kill-ring-yank-pointer variable to p oint to it.
8.3 delete-and-extract-region: Digressing into C
The zap -to- char command uses the delete-and-extract-region ... ring using the
kill-new function.
zap -to- char 89
8 Cutting and Storing Text
Whenever you cut or clip text out of a buffer with a ‘kill’ command in
GNU Emacs, it is sto...
... yank and yank-
pop functions is:
(insert (car kill-ring-yank-pointer))
To begin to understand how yank and yank-pop work, it is first necessary
to look at the kill-ring-yank-pointer variable and ... the rotate-yank-
pointer function.
10 .2 The kill-ring-yank-pointer Variable
kill-ring-yank-pointer is a variable, just as kill-ring is a variable.
It points to something by being bound t...
... automatically, but it is simpler
to write a list manually. Here it is:
(defvar top-of-ranges
’(10 20 30 40 50
60 70 80 90 100
110 120 130 140 150
160 170 180 190 20 0
21 0 22 0 23 0 24 0 25 0
26 0 27 0 ... defuns-per-range-list))
(setq number-within-range 0) ; Reset count to zero.
;; Move to next range.
(setq top-of-ranges (cdr top-of-ranges))
;; Specify next top of range value...
... contains a good many suggestions as to what to
put into your own ‘ .emacs file, or into a site-wide initialization file.
16 .2 Specifying Variables using defcustom
You can specify variables using ... GNU Emacs, such as versions 20 and 21 , and
use one ‘ .emacs file, you can select which code to evaluate with the following
conditional:
(cond
((string-equal (number -to- string 20 ) (sub...
... rotate-yank-pointer function changes the element in the kill ring
to which kill-ring-yank-pointer points. For example, it can change
kill-ring-yank-pointer from pointing to the second element to point ... expression and typing
C-x C-e. Indeed, 1 is printed in the echo area.)
Using % in rotate-yank-pointer
When the kill-ring-yank-pointer points to the beginning of the kill
ring,...