@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999,
-@c 2000, 2001, 2004, 2005
-@c Free Software Foundation, Inc.
+@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001,
+@c 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@setfilename ../info/text
@node Text, Non-ASCII Characters, Markers, Top
@group
(buffer-substring 1 10)
-@result{} "This is t"
+ @result{} "This is t"
@end group
@group
(buffer-substring (point-max) 10)
-@result{} "he contents of buffer foo
-"
+ @result{} "he contents of buffer foo\n"
@end group
@end example
@end defun
---------- Buffer: foo ----------
(buffer-string)
- @result{} "This is the contents of buffer foo
-"
+ @result{} "This is the contents of buffer foo\n"
@end group
@end example
@end defun
@defun insert-char character count &optional inherit
This function inserts @var{count} instances of @var{character} into the
-current buffer before point. The argument @var{count} should be a
-number, and @var{character} must be a character. The value is @code{nil}.
+current buffer before point. The argument @var{count} should be an
+integer, and @var{character} must be a character. The value is @code{nil}.
This function does not convert unibyte character codes 128 through 255
to multibyte characters, not even if the current buffer is a multibyte
list, which is in the variable @code{buffer-undo-list}.
@defvar buffer-undo-list
-This variable's value is the undo list of the current buffer.
-A value of @code{t} disables the recording of undo information.
+This buffer-local variable's value is the undo list of the current
+buffer. A value of @code{t} disables the recording of undo information.
@end defvar
Here are the kinds of elements an undo list can have:
follow specified justification style (see @code{current-justification},
below). @code{nil} means to do full justification.
-If @var{eop} is non-@code{nil}, that means do left-justification if
-@code{current-justification} specifies full justification. This is used
-for the last line of a paragraph; even if the paragraph as a whole is
-fully justified, the last line should not be.
+If @var{eop} is non-@code{nil}, that means do only left-justification
+if @code{current-justification} specifies full justification. This is
+used for the last line of a paragraph; even if the paragraph as a
+whole is fully justified, the last line should not be.
If @var{nosqueeze} is non-@code{nil}, that means do not change interior
whitespace.
starting after the left margin whitespace (if any) on a line; the
characters it matches are that line's candidate for the fill prefix.
-The default value of this variable is
-@w{@samp{"[ \t]*\\([-|#;>*]+[ \t]*\\|(?[0-9]+[.)][ \t]*\\)*"}}. This
-matches a number enclosed in parentheses or followed by a period,
-or certain punctuation characters, or any sequence of these
-intermingled with whitespace. In particular, it matches a sequence of
-whitespace, possibly empty.
+@w{@samp{"[ \t]*\\([-|#;>*]+[ \t]*\\|(?[0-9]+[.)][ \t]*\\)*"}} is the
+default value. This matches a number enclosed in parentheses or
+followed by a period, or certain punctuation characters, or any
+sequence of these intermingled with whitespace. In particular, it
+matches a sequence of whitespace, possibly empty.
@end defopt
@defopt adaptive-fill-first-line-regexp
justification style to refill portions of the text. @xref{Margins}.
@defvar auto-fill-function
-The value of this variable should be a function (of no arguments) to be
-called after self-inserting a character from the table
+The value of this buffer-local variable should be a function (of no
+arguments) to be called after self-inserting a character from the table
@code{auto-fill-chars}. It may be @code{nil}, in which case nothing
special is done in that case.
just the foreground color or just the background color.
@code{(foreground-color . @var{color-name})} is equivalent to
-@code{(:foreground @var{color-name})}, and likewise for the background.
+specifying @code{(:foreground @var{color-name})}, and likewise for the
+background.
@end itemize
You can use Font Lock Mode (@pxref{Font Lock Mode}), to dynamically
being modified by a single primitive, you can't predict how many times
the function will be called.
+If these functions modify the buffer, they should bind
+@code{inhibit-modification-hooks} to @code{t} around doing so, to
+avoid confusing the internal mechanism that calls these hooks.
+
@item insert-in-front-hooks
@itemx insert-behind-hooks
@kindex insert-in-front-hooks @r{(text property)}
graphical applications use @key{Mouse-1} for following links. For
compatibility, @key{Mouse-1} follows links in Emacs too, when you
click on a link quickly without moving the mouse. The user can
-customize this behaviour through the variable
+customize this behavior through the variable
@code{mouse-1-click-follows-link}.
To define text as a link at the Lisp level, you should bind the
For example, here is how Info mode handles @key{Mouse-1}:
-@example
+@smallexample
(define-key Info-mode-map [follow-link] 'mouse-face)
-@end example
+@end smallexample
@item a function
If the condition is a valid function, @var{func}, then a position
For example, here is how pcvs enables @key{Mouse-1} to follow links on
file names only:
-@example
+@smallexample
(define-key map [follow-link]
(lambda (pos)
- (if (eq (get-char-property pos 'face) 'cvs-filename-face) t)))
-@end example
+ (eq (get-char-property pos 'face) 'cvs-filename-face)))
+@end smallexample
@item anything else
If the condition value is anything else, then the position is inside a