@sp 1
Edition @value{edition-number}, @value{update-date}
@sp 1
-Copyright @copyright{} 1990-1995, 1997, 2001-2012 Free Software Foundation, Inc.
+Copyright @copyright{} 1990--1995, 1997, 2001--2013 Free Software
+Foundation, Inc.
@sp 1
@iftex
@item buffer-name
Without an argument, return the name of the buffer, as a string.
-@itemx buffer-file-name
+@item buffer-file-name
Without an argument, return the name of the file the buffer is
visiting.
@findex / @r{(division)}
@cindex Division
The second argument is @code{(/ size 10)}. This expression divides
-the numeric value by ten --- the numeric value of the size of the
+the numeric value by ten---the numeric value of the size of the
accessible portion of the buffer. This produces a number that tells
how many characters make up one tenth of the buffer size. (In Lisp,
@code{/} is used for division, just as @code{*} is used for
system. Since it is very simple, I will digress briefly from Lisp and
describe it here.
-@c GNU Emacs 22 in /usr/local/src/emacs/src/editfns.c
-@c the DEFUN for buffer-substring-no-properties
+@c GNU Emacs 24 in src/editfns.c
+@c the DEFUN for delete-and-extract-region
@need 1500
Like many of the other Emacs primitives,
@smallexample
@group
-DEFUN ("buffer-substring-no-properties", Fbuffer_substring_no_properties,
- Sbuffer_substring_no_properties, 2, 2, 0,
- doc: /* Return the characters of part of the buffer,
-without the text properties.
-The two arguments START and END are character positions;
-they can be in either order. */)
- (start, end)
- Lisp_Object start, end;
+DEFUN ("delete-and-extract-region", Fdelete_and_extract_region,
+ Sdelete_and_extract_region, 2, 2, 0,
+ doc: /* Delete the text between START and END and return it. */)
+ (Lisp_Object start, Lisp_Object end)
@{
- register int b, e;
-
validate_region (&start, &end);
- b = XINT (start);
- e = XINT (end);
-
- return make_buffer_string (b, e, 0);
+ if (XINT (start) == XINT (end))
+ return empty_unibyte_string;
+ return del_range_1 (XINT (start), XINT (end), 1, 1);
@}
@end group
@end smallexample
@item
The seventh part is a documentation string, just like the one for a
-function written in Emacs Lisp, except that every newline must be
-written explicitly as @samp{\n} followed by a backslash and carriage
-return.
-
-@need 1000
-Thus, the first two lines of documentation for @code{goto-char} are
-written like this:
-
-@smallexample
-@group
- "Set point to POSITION, a number or marker.\n\
-Beginning of buffer is position (point-min), end is (point-max)."
-@end group
-@end smallexample
+function written in Emacs Lisp. This is written as a C comment. (When
+you build Emacs, the program @command{lib-src/make-docfile} extracts
+these comments and uses them to make the ``real'' documentation.)
@end itemize
@need 1200
@group
validate_region (&start, &end);
if (XINT (start) == XINT (end))
- return build_string ("");
+ return empty_unibyte_string;
return del_range_1 (XINT (start), XINT (end), 1, 1);
@end group
@end smallexample
-The @code{validate_region} function checks whether the values
+The @code{validate_region} function checks whether the values
passed as the beginning and end of the region are the proper type and
are within range. If the beginning and end positions are the same,
-then return and empty string.
+then return an empty string.
The @code{del_range_1} function actually deletes the text. It is a
complex function we will not look into. It updates the buffer and
For me, the major use of the @code{set-variable} command is to suggest
variables that I might want to set in my @file{.emacs} file. There
-are now more than 700 such variables --- far too many to remember
+are now more than 700 such variables, far too many to remember
readily. Fortunately, you can press @key{TAB} after calling the
@code{M-x set-variable} command to see the list of variables.
(@xref{Examining, , Examining and Setting Variables, emacs,
of the work you have to do when writing a @code{while} expression.
Like a @code{while} loop, a @code{dolist} loops. What is different is
-that it automatically shortens the list each time it loops --- it
-`@sc{cdr}s down the list' on its own --- and it automatically binds
+that it automatically shortens the list each time it loops---it
+`@sc{cdr}s down the list' on its own---and it automatically binds
the @sc{car} of each shorter version of the list to the first of its
arguments.
using the expression @code{(setq arg (1- arg))} as the decrementer.
That expression is not far from the @code{while}, but is hidden in
another Lisp macro, an @code{unless} macro. Unless we are at the end
-of the buffer --- that is what the @code{eobp} function determines; it
-is an abbreviation of @samp{End Of Buffer P} --- we decrease the value
+of the buffer---that is what the @code{eobp} function determines; it
+is an abbreviation of @samp{End Of Buffer P}---we decrease the value
of @code{arg} by one.
(If we are at the end of the buffer, we cannot go forward any more and
The @code{directory-files-and-attributes} function returns a list of
lists. Each of the lists within the main list consists of 13
elements. The first element is a string that contains the name of the
-file -- which, in GNU/Linux, may be a `directory file', that is to
+file---which, in GNU/Linux, may be a `directory file', that is to
say, a file with the special attributes of a directory. The second
element of the list is @code{t} for a directory, a string
for symbolic link (the string is the name linked to), or @code{nil}.
@cindex Customizing your @file{.emacs} file
@cindex Initialization file
-``You don't have to like Emacs to like it'' -- this seemingly
+``You don't have to like Emacs to like it''---this seemingly
paradoxical statement is the secret of GNU Emacs. The plain, `out of
the box' Emacs is a generic tool. Most people who use it, customize
it to suit themselves.
"Normal hook run when entering Text mode and many related modes."
:type 'hook
:options '(turn-on-auto-fill flyspell-mode)
- :group 'data)
+ :group 'wp)
@end group
@end smallexample
@exdent Or nowadays, using an even more sophisticated set of options,
-emacs -Q - D
+emacs -Q -D
@end smallexample
}:
@emph{top} of the window.) @samp{%-} inserts enough dashes to fill
out the line.
-Remember, ``You don't have to like Emacs to like it'' --- your own
+Remember, ``You don't have to like Emacs to like it''---your own
Emacs can have different colors, different commands, and different
keys than a default Emacs.
@sp 2
@noindent
-The largest group of functions contain 10 -- 19 words and symbols each.
+The largest group of functions contain 10--19 words and symbols each.
@node Free Software and Free Manuals
@appendix Free Software and Free Manuals