X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/9d42ffaa3cb02d03f709a205a99be6231033ee3f..1c145ce1bdebd80dbfab1071ea9dc3823d35ff2d:/lispref/text.texi diff --git a/lispref/text.texi b/lispref/text.texi index cddeeb8fbd..1fa68fce91 100644 --- a/lispref/text.texi +++ b/lispref/text.texi @@ -1,8 +1,7 @@ @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 @@ -192,12 +191,11 @@ This is the contents of buffer foo @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 @@ -258,8 +256,7 @@ This is the contents of buffer foo ---------- 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 @@ -398,8 +395,8 @@ overlay. @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 @@ -1203,8 +1200,8 @@ text in the buffer automatically add elements to the front of the undo 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: @@ -1497,10 +1494,10 @@ of justification. It can be @code{left}, @code{right}, @code{full}, 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. @@ -1727,12 +1724,11 @@ Adaptive Fill mode matches this regular expression against the text 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 @@ -1772,8 +1768,8 @@ justify existing text, see @ref{Filling}. 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. @@ -2969,7 +2965,8 @@ A cons cell of the form @code{(foreground-color . @var{color-name})} or 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 @@ -3152,6 +3149,10 @@ particular modification hook function appears on several characters 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)} @@ -3529,7 +3530,7 @@ buffer. 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 @@ -3561,9 +3562,9 @@ The action code is always @code{t}. 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 @@ -3574,11 +3575,11 @@ action code. 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