From 342fd6cd64f3199cc46a08b28c1b7b15abcc168e Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 18 Jun 2005 13:57:17 +0000 Subject: [PATCH] Fix formatting ugliness. --- lispref/compile.texi | 2 +- lispref/customize.texi | 3 ++- lispref/debugging.texi | 12 ++++++------ lispref/display.texi | 31 +++++++++++++++-------------- lispref/edebug.texi | 27 +++++++++++++------------- lispref/errors.texi | 2 +- lispref/files.texi | 10 +++++----- lispref/frames.texi | 18 ++++++++--------- lispref/functions.texi | 23 ++++++++-------------- lispref/help.texi | 2 +- lispref/keymaps.texi | 8 ++++---- lispref/modes.texi | 11 +++++------ lispref/nonascii.texi | 16 +++++++-------- lispref/os.texi | 15 +++++++------- lispref/processes.texi | 44 +++++++++++++++++++++++------------------- lispref/searching.texi | 26 ++++++++++++------------- lispref/strings.texi | 7 ++++--- lispref/text.texi | 32 +++++++++++++++--------------- 18 files changed, 145 insertions(+), 144 deletions(-) diff --git a/lispref/compile.texi b/lispref/compile.texi index 91c0661a99e..951a090e0da 100644 --- a/lispref/compile.texi +++ b/lispref/compile.texi @@ -426,7 +426,7 @@ to what @code{eval-when-compile} does. @section Compiler Errors @cindex compiler errors - Byte compilation writes errors and warnings into the buffer + Byte compilation outputs all errors and warnings into the buffer @samp{*Compile-Log*}. The messages include file names and line numbers that identify the location of the problem. The usual Emacs commands for operating on compiler diagnostics work properly on diff --git a/lispref/customize.texi b/lispref/customize.texi index 53c9fa92c32..baaceae47f0 100644 --- a/lispref/customize.texi +++ b/lispref/customize.texi @@ -658,7 +658,8 @@ means you should always list the most specific types first, and the most general last. Here's an example of proper usage: @example -(choice (const :tag "Off" nil) symbol (sexp :tag "Other")) +(choice (const :tag "Off" nil) + symbol (sexp :tag "Other")) @end example @noindent diff --git a/lispref/debugging.texi b/lispref/debugging.texi index 0af1f16127d..66663aad131 100644 --- a/lispref/debugging.texi +++ b/lispref/debugging.texi @@ -471,15 +471,15 @@ entered--entering a function:} as a line of text at the top of the buffer. @item debug -@code{debug} as first argument indicates a call to @code{debug} -because of entry to a function that was set to debug on entry. The -debugger displays @samp{Debugger entered--entering a function:}, just -as in the @code{lambda} case. It also marks the stack frame for that -function so that it will invoke the debugger when exited. +@code{debug} as first argument means @code{debug} was called because +of entry to a function that was set to debug on entry. The debugger +displays the string @samp{Debugger entered--entering a function:}, +just as in the @code{lambda} case. It also marks the stack frame for +that function so that it will invoke the debugger when exited. @item t When the first argument is @code{t}, this indicates a call to -@code{debug} due to evaluation of a list form when +@code{debug} due to evaluation of a function call form when @code{debug-on-next-call} is non-@code{nil}. The debugger displays @samp{Debugger entered--beginning evaluation of function call form:} as the top line in the buffer. diff --git a/lispref/display.texi b/lispref/display.texi index 87520fb4d4f..930f8aa31bc 100644 --- a/lispref/display.texi +++ b/lispref/display.texi @@ -547,15 +547,15 @@ remaining time and clearly see that Emacs is busy working, not hung. reporting operation progress. Here is a working example that does nothing useful: -@example +@smallexample (let ((progress-reporter - (make-progress-reporter "Collecting some mana for Emacs..." + (make-progress-reporter "Collecting mana for Emacs..." 0 500))) (dotimes (k 500) (sit-for 0.01) (progress-reporter-update progress-reporter k)) (progress-reporter-done progress-reporter)) -@end example +@end smallexample @defun make-progress-reporter message min-value max-value &optional current-value min-change min-time This function creates and returns a @dfn{progress reporter}---an @@ -1296,8 +1296,8 @@ A cons cell of the form @code{(foreground-color . @var{color-name})} or @code{(background-color . @var{color-name})}. These elements specify 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. +@code{(foreground-color . @var{color-name})} has the same effect as +@code{(:foreground @var{color-name})}; likewise for the background. @end itemize @item mouse-face @@ -2757,10 +2757,9 @@ For instance, this changes the default fontset to use a font of which registry name is @samp{JISX0208.1983} for all characters belonging to the charset @code{japanese-jisx0208}. -@example +@smallexample (set-fontset-font nil 'japanese-jisx0208 '(nil . "JISX0208.1983")) -@end example - +@end smallexample @end defun @defun char-displayable-p char @@ -3137,7 +3136,7 @@ single unit. By contrast, characters that have similar but distinct Lisp objects as their @code{display} properties are handled separately. Here's a function that illustrates this point: -@example +@smallexample (defun foo () (goto-char (point-min)) (dotimes (i 5) @@ -3146,7 +3145,7 @@ separately. Here's a function that illustrates this point: (forward-char 1) (put-text-property (point) (1+ (point)) 'display string) (forward-char 1)))) -@end example +@end smallexample @noindent It gives each of the first ten characters in the buffer string @@ -3158,7 +3157,7 @@ Likewise for each following pair of characters. Thus, the ten characters appear as five A's. This function would have the same results: -@example +@smallexample (defun foo () (goto-char (point-min)) (dotimes (i 5) @@ -3166,7 +3165,7 @@ results: (put-text-property (point) (2+ (point)) 'display string) (put-text-property (point) (1+ (point)) 'display string) (forward-char 2)))) -@end example +@end smallexample @noindent This illustrates that what matters is the property value for @@ -3262,18 +3261,20 @@ as an absolute number of pixels. The following expressions are supported: -@example +@smallexample @group @var{expr} ::= @var{num} | (@var{num}) | @var{unit} | @var{elem} | @var{pos} | @var{image} | @var{form} @var{num} ::= @var{integer} | @var{float} | @var{symbol} @var{unit} ::= in | mm | cm | width | height +@end group +@group @var{elem} ::= left-fringe | right-fringe | left-margin | right-margin | scroll-bar | text @var{pos} ::= left | center | right @var{form} ::= (@var{num} . @var{expr}) | (@var{op} @var{expr} ...) @var{op} ::= + | - @end group -@end example +@end smallexample The form @var{num} specifies a fraction of the default frame font height or width. The form @code{(@var{num})} specifies an absolute @@ -3331,7 +3332,7 @@ in the @code{display} text property. Display @var{string} instead of the text that has this property. @item (image . @var{image-props}) -This display specification is an image descriptor (@pxref{Images}). +This kind of display specification is an image descriptor (@pxref{Images}). When used as a display specification, it means to display the image instead of the text that has the display specification. diff --git a/lispref/edebug.texi b/lispref/edebug.texi index 6447fbe37c5..f074cf3dbd5 100644 --- a/lispref/edebug.texi +++ b/lispref/edebug.texi @@ -330,7 +330,7 @@ program to stop. Proceed to the stop point near where point is (@code{edebug-goto-here}). @item f -Run the program forward over one expression +Run the program for one expression (@code{edebug-forward-sexp}). @item o @@ -462,9 +462,9 @@ point (@code{edebug-unset-breakpoint}). @item x @var{condition} @key{RET} Set a conditional breakpoint which stops the program only if -@var{condition} evaluates to a non-@code{nil} value -(@code{edebug-set-conditional-breakpoint}). With a prefix argument, the -breakpoint is temporary. +evaluating @var{condition} produces a non-@code{nil} value +(@code{edebug-set-conditional-breakpoint}). With a prefix argument, +the breakpoint is temporary. @item B Move point to the next breakpoint in the current definition @@ -585,8 +585,8 @@ effect outside of Edebug. @table @kbd @item v -View the outside window configuration (@code{edebug-view-outside}). -Type @kbd{C-x X w} to return to Edebug. +Switch to viewing the outside window configuration +(@code{edebug-view-outside}). Type @kbd{C-x X w} to return to Edebug. @item p Temporarily display the outside current buffer with point at its @@ -1035,11 +1035,12 @@ saves (and later restores) these additional data: The current match data. @xref{Match Data}. @item -@code{last-command}, @code{this-command}, @code{last-command-char}, -@code{last-input-char}, @code{last-input-event}, -@code{last-command-event}, @code{last-event-frame}, -@code{last-nonmenu-event}, and @code{track-mouse}. Commands used within -Edebug do not affect these variables outside of Edebug. +The variables @code{last-command}, @code{this-command}, +@code{last-command-char}, @code{last-input-char}, +@code{last-input-event}, @code{last-command-event}, +@code{last-event-frame}, @code{last-nonmenu-event}, and +@code{track-mouse}. Commands used within Edebug do not affect these +variables outside of Edebug. The key sequence returned by @code{this-command-keys} is changed by executing commands within Edebug and there is no way to reset @@ -1099,13 +1100,13 @@ macro. To do this, add a @code{debug} declaration to the macro definition. Here is a simple example that shows the specification for the @code{for} example macro (@pxref{Argument Evaluation}). -@example +@smallexample (defmacro for (var from init to final do &rest body) "Execute a simple \"for\" loop. For example, (for i from 1 to 10 do (print i))." (declare (debug (symbolp "from" form "to" form "do" &rest form))) ...) -@end example +@end smallexample The Edebug specification says which parts of a call to the macro are forms to be evaluated. For simple macros, the @var{specification} diff --git a/lispref/errors.texi b/lispref/errors.texi index 8591fb9a45f..a246539b8fd 100644 --- a/lispref/errors.texi +++ b/lispref/errors.texi @@ -63,7 +63,7 @@ See @code{/} and @code{%} in @ref{Numbers}. @xref{Function Indirection}. @item cyclic-variable-indirection -@code{"Symbol's chain of variable indirections contains a loop"}@* +@code{"Symbol's chain of variable indirections\@* contains a loop"}@* @xref{Variable Aliases}. @item end-of-buffer diff --git a/lispref/files.texi b/lispref/files.texi index 766220aa882..93c104e6ccd 100644 --- a/lispref/files.texi +++ b/lispref/files.texi @@ -98,9 +98,9 @@ new buffer and reading the file into it. It also returns that buffer. Aside from some technical details, the body of the @code{find-file} function is basically equivalent to: -@example +@smallexample (switch-to-buffer (find-file-noselect filename nil nil wildcards)) -@end example +@end smallexample @noindent (See @code{switch-to-buffer} in @ref{Displaying Buffers}.) @@ -2731,9 +2731,9 @@ This function tests whether @var{filename} is a remote file. If If @var{filename} is indeed remote, the return value is a string that identifies the remote system. -This identifier string may include a host name, a user name, and -characters designating the method used to access the remote system. -For example, the remote identifier string for the filename +This identifier string can include a host name and a user name, as +well as characters designating the method used to access the remote +system. For example, the remote identifier string for the filename @code{/ssh:user@@host:/some/file} is @code{/ssh:user@@host:}. If @code{file-remote-p} returns the same identifier for two different diff --git a/lispref/frames.texi b/lispref/frames.texi index ffcc16f6289..10035b76f9f 100644 --- a/lispref/frames.texi +++ b/lispref/frames.texi @@ -1550,13 +1550,13 @@ clients. It takes two optional arguments, @var{type} and The @var{data-type} argument specifies the form of data conversion to use, to convert the raw data obtained from another X client into Lisp data. Meaningful values include @code{TEXT}, @code{STRING}, -@code{UTF8_STRING}, -@code{TARGETS}, @code{LENGTH}, @code{DELETE}, @code{FILE_NAME}, -@code{CHARACTER_POSITION}, @code{LINE_NUMBER}, @code{COLUMN_NUMBER}, -@code{OWNER_OS}, @code{HOST_NAME}, @code{USER}, @code{CLASS}, -@code{NAME}, @code{ATOM}, and @code{INTEGER}. (These are symbols with -upper-case names in accord with X conventions.) The default for -@var{data-type} is @code{STRING}. +@code{UTF8_STRING}, @code{TARGETS}, @code{LENGTH}, @code{DELETE}, +@code{FILE_NAME}, @code{CHARACTER_POSITION}, @code{NAME}, +@code{LINE_NUMBER}, @code{COLUMN_NUMBER}, @code{OWNER_OS}, +@code{HOST_NAME}, @code{USER}, @code{CLASS}, @code{ATOM}, and +@code{INTEGER}. (These are symbols with upper-case names in accord +with X conventions.) The default for @var{data-type} is +@code{STRING}. @end defun @cindex cut buffer @@ -1822,8 +1822,8 @@ xterm.vt100.background: yellow @end example @noindent -in in your X resources file (usually named @file{~/.Xdefaults} or -@file{~/.Xresources}). Then: +in in your X resources file (whose name is usually @file{~/.Xdefaults} +or @file{~/.Xresources}). Then: @example @group diff --git a/lispref/functions.texi b/lispref/functions.texi index 409f0125ad8..f58cad69bb7 100644 --- a/lispref/functions.texi +++ b/lispref/functions.texi @@ -525,9 +525,9 @@ defines the symbol @var{name} as a function that looks like this: @var{name}. It returns the value @var{name}, but usually we ignore this value. -As described previously (@pxref{Lambda Expressions}), -@var{argument-list} is a list of argument names and may include the -keywords @code{&optional} and @code{&rest}. Also, the first two of the +As described previously, @var{argument-list} is a list of argument +names and may include the keywords @code{&optional} and @code{&rest} +(@pxref{Lambda Expressions}). Also, the first two of the @var{body-forms} may be a documentation string and an interactive declaration. @@ -1174,20 +1174,13 @@ You can define a function as an alias and declare it obsolete at the same time using the macro @code{define-obsolete-function-alias}. @defmac define-obsolete-function-alias obsolete-name current-name &optional when docstring -This macro marks the function @var{obsolete-name} obsolete and also defines -it as an alias for the function @var{current-name}. A typical call has the -form: +This macro marks the function @var{obsolete-name} obsolete and also +defines it as an alias for the function @var{current-name}. It is +equivalent to the following: @example -(define-obsolete-function-alias 'old-fun 'new-fun "22.1" "Doc.") -@end example - -@noindent -which is equivalent to the following two lines of code: - -@example -(defalias 'old-fun 'new-fun "Doc.") -(make-obsolete 'old-fun 'new-fun "22.1") +(defalias @var{obsolete-name} @var{current-name} @var{docstring}) +(make-obsolete @var{obsolete-name} @var{current-name} @var{when}) @end example @end defmac diff --git a/lispref/help.texi b/lispref/help.texi index ec6dff13666..2dbea2038cc 100644 --- a/lispref/help.texi +++ b/lispref/help.texi @@ -119,7 +119,7 @@ retrieves the text from a file if the value calls for that. If the property value isn't @code{nil}, isn't a string, and doesn't refer to text in a file, then it is evaluated to obtain a string. -Finally, @code{documentation-property} passes the string through +The last thing this function does is pass the string through @code{substitute-command-keys} to substitute actual key bindings, unless @var{verbatim} is non-@code{nil}. diff --git a/lispref/keymaps.texi b/lispref/keymaps.texi index 63832ced1b4..79cbe478ea2 100644 --- a/lispref/keymaps.texi +++ b/lispref/keymaps.texi @@ -1335,10 +1335,10 @@ a key binding. instead of @code{kill-line} and @code{kill-word}. It can establish this by making these two command-remapping bindings in its keymap: -@example +@smallexample (define-key my-mode-map [remap kill-line] 'my-kill-line) (define-key my-mode-map [remap kill-word] 'my-kill-word) -@end example +@end smallexample Whenever @code{my-mode-map} is an active keymap, if the user types @kbd{C-k}, Emacs will find the standard global binding of @@ -1349,10 +1349,10 @@ so instead of running @code{kill-line}, Emacs runs Remapping only works through a single level. In other words, -@example +@smallexample (define-key my-mode-map [remap kill-line] 'my-kill-line) (define-key my-mode-map [remap my-kill-line] 'my-other-kill-line) -@end example +@end smallexample @noindent does not have the effect of remapping @code{kill-line} into diff --git a/lispref/modes.texi b/lispref/modes.texi index 2366fca5b96..ac13e30b90c 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi @@ -395,7 +395,7 @@ setting up a buffer-local value for the variable @item The mode should specify how Imenu should find the definitions or sections of a buffer, by setting up a buffer-local value for the -variable @code{imenu-generic-expression}, for the pair of variables +variable @code{imenu-generic-expression}, for the two variables @code{imenu-prev-index-position-function} and @code{imenu-extract-index-name-function}, or for the variable @code{imenu-create-index-function} (@pxref{Imenu}). @@ -2290,8 +2290,8 @@ A nested sub-alist element looks like this: It creates the submenu @var{menu-title} specified by @var{sub-alist}. The default value of @code{imenu-create-index-function} is -@code{imenu-default-create-index-function}. This function uses -@code{imenu-prev-index-position-function} and +@code{imenu-default-create-index-function}. This function calls the +value of @code{imenu-prev-index-position-function} and the value of @code{imenu-extract-index-name-function} to produce the index alist. However, if either of these two variables is @code{nil}, the default function uses @code{imenu-generic-expression} instead. @@ -2456,7 +2456,7 @@ highlighted (instead of the entire text that @var{matcher} matched). @end example If you use @code{regexp-opt} to produce the regular expression -@var{matcher}, then you can use @code{regexp-opt-depth} (@pxref{Regexp +@var{matcher}, you can use @code{regexp-opt-depth} (@pxref{Regexp Functions}) to calculate the value for @var{subexp}. @item (@var{matcher} . @var{facespec}) @@ -2657,8 +2657,7 @@ non-@code{nil} value, they are added at the end of Some modes provide specialized support you can use in additional highlighting patterns. See the variables @code{c-font-lock-extra-types}, @code{c++-font-lock-extra-types}, -@code{objc-font-lock-extra-types} and -@code{java-font-lock-extra-types}, for example. +and @code{java-font-lock-extra-types}, for example. @strong{Warning:} major mode functions must not call @code{font-lock-add-keywords} under any circumstances, either directly diff --git a/lispref/nonascii.texi b/lispref/nonascii.texi index aaa23e90a48..9683156541d 100644 --- a/lispref/nonascii.texi +++ b/lispref/nonascii.texi @@ -1067,11 +1067,11 @@ for decoding (in case @var{operation} does decoding), and @var{encoding-system} is the coding system for encoding (in case @var{operation} does encoding). -The argument @var{operation} should be a symbol, one of -@code{insert-file-contents}, @code{write-region}, @code{call-process}, -@code{call-process-region}, @code{start-process}, or -@code{open-network-stream}. These are the names of the Emacs I/O primitives -that can do coding system conversion. +The argument @var{operation} should be a symbol, any one of +@code{insert-file-contents}, @code{write-region}, +@code{start-process}, @code{call-process}, @code{call-process-region}, +or @code{open-network-stream}. These are the names of the Emacs I/O +primitives that can do coding system conversion. The remaining arguments should be the same arguments that might be given to that I/O primitive. Depending on the primitive, one of those @@ -1081,9 +1081,9 @@ name is the target. For subprocess primitives, the process name is the target. For @code{open-network-stream}, the target is the service name or port number. -This function looks up the target in @code{file-coding-system-alist}, -@code{process-coding-system-alist}, or -@code{network-coding-system-alist}, depending on @var{operation}. +Depending on @var{operation}, this function looks up the target in +@code{file-coding-system-alist}, @code{process-coding-system-alist}, +or @code{network-coding-system-alist}. @end defun @node Specifying Coding Systems diff --git a/lispref/os.texi b/lispref/os.texi index e0c032f3e95..7bc76799210 100644 --- a/lispref/os.texi +++ b/lispref/os.texi @@ -91,10 +91,10 @@ name is usually @file{site-start.el}. @cindex @file{site-start.el} @item -It loads your init file (usually @file{~/.emacs}), unless @samp{-q} -(or @samp{--no-init-file}), @samp{-Q}, or @samp{--batch} was specified -on the command line. The @samp{-u} option can specify another user -whose home directory should be used instead of @file{~}. +It loads your init file (usually @file{~/.emacs}), unless the option +@samp{-q} (or @samp{--no-init-file}), @samp{-Q}, or @samp{--batch} was +specified on the command line. The @samp{-u} option can specify +another user whose home directory should be used instead of @file{~}. @item It loads the library @file{default} (if any), unless @@ -606,9 +606,10 @@ through various functions. These variables include the name of the system, the user's @acronym{UID}, and so on. @defvar system-configuration -This variable holds the GNU configuration name for the hardware/software -configuration of your system, as a string. The convenient way to test -parts of this string is with @code{string-match}. +This variable holds the standard GNU configuration name for the +hardware/software configuration of your system, as a string. The +convenient way to test parts of this string is with +@code{string-match}. @end defvar @defvar system-type diff --git a/lispref/processes.texi b/lispref/processes.texi index cdefa256fcd..f88b2c46159 100644 --- a/lispref/processes.texi +++ b/lispref/processes.texi @@ -169,7 +169,7 @@ function. (shell-quote-argument "foo > bar") @result{} "foo\\ \\>\\ bar" -;; @r{This example shows the behavior on MS-DOS and MS-Windows systems.} +;; @r{This example shows the behavior on MS-DOS and MS-Windows.} (shell-quote-argument "foo > bar") @result{} "\"foo > bar\"" @end example @@ -2277,13 +2277,16 @@ is COOKIES without the directory part." (buffer-string)))) (sel (random (bindat-get-field info :count))) (beg (cdar (bindat-get-field info :offset sel))) - (end (or (cdar (bindat-get-field info :offset (1+ sel))) + (end (or (cdar (bindat-get-field info + :offset (1+ sel))) (nth 7 (file-attributes cookies))))) - (switch-to-buffer (get-buffer-create - (format "*Fortune Cookie: %s*" - (file-name-nondirectory cookies)))) + (switch-to-buffer + (get-buffer-create + (format "*Fortune Cookie: %s*" + (file-name-nondirectory cookies)))) (erase-buffer) - (insert-file-contents-literally cookies nil beg (- end 3)))) + (insert-file-contents-literally + cookies nil beg (- end 3)))) (defun fcookie-create-index (cookies &optional index delim) "Scan file COOKIES, and write out its index file. @@ -2311,18 +2314,19 @@ COOKIES, indicates the border between entries." offsets (cons (1- p) offsets)))) (with-temp-buffer (set-buffer-multibyte nil) - (insert (string-make-unibyte - (bindat-pack - fcookie-index-spec - `((:version . 2) - (:count . ,count) - (:longest . ,max) - (:shortest . ,min) - (:flags . 0) - (:delim . ,delim) - (:offset . ,(mapcar (lambda (o) - (list (cons :foo o))) - (nreverse offsets))))))) + (insert + (string-make-unibyte + (bindat-pack + fcookie-index-spec + `((:version . 2) + (:count . ,count) + (:longest . ,max) + (:shortest . ,min) + (:flags . 0) + (:delim . ,delim) + (:offset . ,(mapcar (lambda (o) + (list (cons :foo o))) + (nreverse offsets))))))) (let ((coding-system-for-write 'raw-text-unix)) (write-file (or index (concat cookies ".dat"))))))) @end lisp @@ -2392,7 +2396,7 @@ A binary data representation: The corresponding decoded structure: @lisp -(setq decoded-structure (bindat-unpack packet-spec binary-data)) +(setq decoded (bindat-unpack packet-spec binary-data)) @result{} ((header (dest-ip . [192 168 1 100]) @@ -2415,7 +2419,7 @@ The corresponding decoded structure: Fetching data from this structure: @lisp -(bindat-get-field decoded-structure 'item 1 'id) +(bindat-get-field decoded 'item 1 'id) @result{} "BCDEFG" @end lisp diff --git a/lispref/searching.texi b/lispref/searching.texi index 38a0f4915d7..f2f21458506 100644 --- a/lispref/searching.texi +++ b/lispref/searching.texi @@ -244,16 +244,15 @@ first tries to match all three @samp{a}s; but the rest of the pattern is The next alternative is for @samp{a*} to match only two @samp{a}s. With this choice, the rest of the regexp matches successfully.@refill -Nested repetition operators can be extremely slow or loop infinitely -if they use repetition operators inside repetition operators. For -example, it could take hours for the regular expression -@samp{\(x+y*\)*a} to try to match the sequence -@samp{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxz}, before it ultimately -fails. Emacs must try each way of grouping the 35 @samp{x}s before -concluding that none of them can work. Even worse, @samp{\(x*\)*} can -match the null string in infinitely many ways, so it causes an -infinite loop. To avoid these problems, check nested repetitions -carefully. +Nested repetition operators take a long time, or even forever, if they +lead to ambiguous matching. For example, trying to match the regular +expression @samp{\(x+y*\)*a} against the string +@samp{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxz} could take hours before it +ultimately fails. Emacs must try each way of grouping the 35 +@samp{x}s before concluding that none of them can work. Even worse, +@samp{\(x*\)*} can match the null string in infinitely many ways, so +it causes an infinite loop. To avoid these problems, check nested +repetitions carefully. @item @samp{+} @cindex @samp{+} in regexp @@ -347,9 +346,10 @@ different characters. @item @samp{[^ @dots{} ]} @cindex @samp{^} in regexp -@samp{[^} begins a @dfn{complemented character alternative}, which matches any -character except the ones specified. Thus, @samp{[^a-z0-9A-Z]} matches -all characters @emph{except} letters and digits. +@samp{[^} begins a @dfn{complemented character alternative}. This +matches any character except the ones specified. Thus, +@samp{[^a-z0-9A-Z]} matches all characters @emph{except} letters and +digits. @samp{^} is not special in a character alternative unless it is the first character. The character following the @samp{^} is treated as if it diff --git a/lispref/strings.texi b/lispref/strings.texi index b70e8d9f9d4..d0504684f82 100644 --- a/lispref/strings.texi +++ b/lispref/strings.texi @@ -298,7 +298,8 @@ useful. If you need such a result, use an explicit value for @var{separators}: @example -(split-string " two words " split-string-default-separators) +(split-string " two words " + split-string-default-separators) @result{} ("" "two" "words" "") @end example @@ -353,8 +354,8 @@ practice: @end defun @defvar split-string-default-separators -The default value of @var{separators} for @code{split-string}, initially -@w{@samp{"[ \f\t\n\r\v]+"}}. +The default value of @var{separators} for @code{split-string}. Its +usual value is @w{@samp{"[ \f\t\n\r\v]+"}}. @end defvar @node Modifying Strings diff --git a/lispref/text.texi b/lispref/text.texi index cddeeb8fbde..5a4d743ab75 100644 --- a/lispref/text.texi +++ b/lispref/text.texi @@ -1497,10 +1497,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 +1727,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 @@ -2969,7 +2968,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 @@ -3561,9 +3561,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 +3574,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 -- 2.39.2