1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-23 10:34:07 +00:00

Fix typos and minor wording issues in ELisp manual

* doc/lispref/internals.texi (Writing Emacs Primitives):
* doc/lispref/display.texi (Temporary Displays): Fix typos.
* doc/lispref/text.texi (Filling, Changing Properties)
(Transposition): Clarify and fix typos.
* doc/lispref/positions.texi (Screen Lines): Improve wording.
* doc/lispref/modes.texi (Minor Mode Conventions)
(Font Lock Multiline): Fix typos.
* doc/lispref/variables.texi (Dynamic Binding Tips): Fix a
cross-reference.  Fix a typo.
* doc/lispref/sequences.texi (Sequence Functions): Fix typos.
(Bug#31143)
This commit is contained in:
Eli Zaretskii 2018-04-13 16:44:05 +03:00
parent febac2796b
commit 6bdcaec885
7 changed files with 27 additions and 25 deletions

View File

@ -739,7 +739,7 @@ DEFUN ("foo", Ffoo, Sfoo, 0, UNEVALLED, 0
"(list (read-char-by-name \"Insert character: \")\ "(list (read-char-by-name \"Insert character: \")\
(prefix-numeric-value current-prefix-arg)\ (prefix-numeric-value current-prefix-arg)\
t))", t))",
doc: /* @dots{} /*) doc: /* @dots{} */)
@end group @end group
@end example @end example
@ -769,7 +769,7 @@ this:
@example @example
@group @group
DEFUN ("bar", Fbar, Sbar, 0, UNEVALLED, 0 DEFUN ("bar", Fbar, Sbar, 0, UNEVALLED, 0
doc: /* @dots{} /* doc: /* @dots{} */
attributes: @var{attr1} @var{attr2} @dots{}) attributes: @var{attr1} @var{attr2} @dots{})
@end group @end group
@end example @end example

View File

@ -1388,9 +1388,10 @@ similar to the code generated by the @code{define-minor-mode} macro):
@example @example
(interactive (list (or current-prefix-arg 'toggle))) (interactive (list (or current-prefix-arg 'toggle)))
(let ((enable (if (eq arg 'toggle) (let ((enable
(not foo-mode) ; @r{this mode's mode variable} (if (eq arg 'toggle)
(> (prefix-numeric-value arg) 0)))) (not foo-mode) ; @r{this is the mode's mode variable}
(> (prefix-numeric-value arg) 0))))
(if enable (if enable
@var{do-enable} @var{do-enable}
@var{do-disable})) @var{do-disable}))
@ -3375,7 +3376,7 @@ easy to add the @code{font-lock-multiline} property by hand.
The @code{font-lock-multiline} property is meant to ensure proper The @code{font-lock-multiline} property is meant to ensure proper
refontification; it does not automatically identify new multiline refontification; it does not automatically identify new multiline
constructs. Identifying the requires that Font Lock mode operate on constructs. Identifying them requires that Font Lock mode operate on
large enough chunks at a time. This will happen by accident on many large enough chunks at a time. This will happen by accident on many
cases, which may give the impression that multiline constructs magically cases, which may give the impression that multiline constructs magically
work. If you set the @code{font-lock-multiline} variable work. If you set the @code{font-lock-multiline} variable

View File

@ -569,9 +569,9 @@ The optional argument @var{cur-col} specifies the current column when
the function is called. This is the window-relative horizontal the function is called. This is the window-relative horizontal
coordinate of point, measured in units of font width of the frame's coordinate of point, measured in units of font width of the frame's
default face. Providing it speeds up the function, especially in very default face. Providing it speeds up the function, especially in very
long lines, because it doesn't have to go back in the buffer in order long lines, because the function doesn't have to go back in the buffer
to determine the current column. Note that @var{cur-col} is also in order to determine the current column. Note that @var{cur-col} is
counted from the visual start of the line. also counted from the visual start of the line.
@end defun @end defun
@defun count-screen-lines &optional beg end count-final-newline window @defun count-screen-lines &optional beg end count-final-newline window

View File

@ -728,7 +728,7 @@ to every element of @var{sequence} returns non-@code{nil}.
@result{} t @result{} t
@end group @end group
@group @group
(seq-some #'numberp [2 4 "6"]) (seq-every-p #'numberp [2 4 "6"])
@result{} nil @result{} nil
@end group @end group
@end example @end example
@ -854,7 +854,7 @@ it is a function of two arguments to use instead of the default @code{equal}.
@end group @end group
@group @group
(seq-uniq '(1 2 2.0 1.0) #'=) (seq-uniq '(1 2 2.0 1.0) #'=)
@result{} [1 2] @result{} (1 2)
@end group @end group
@end example @end example
@end defun @end defun

View File

@ -1612,7 +1612,7 @@ that the line ends exactly at @code{fill-column}. It returns
The argument @var{how}, if non-@code{nil} specifies explicitly the style The argument @var{how}, if non-@code{nil} specifies explicitly the style
of justification. It can be @code{left}, @code{right}, @code{full}, of justification. It can be @code{left}, @code{right}, @code{full},
@code{center}, or @code{none}. If it is @code{t}, that means to do @code{center}, or @code{none}. If it is @code{t}, that means to
follow specified justification style (see @code{current-justification}, follow specified justification style (see @code{current-justification},
below). @code{nil} means to do full justification. below). @code{nil} means to do full justification.
@ -2976,7 +2976,7 @@ If any text in the region already has a non-@code{nil} @code{face} property,
those face(s) are retained. This function sets the @code{face} those face(s) are retained. This function sets the @code{face}
property to a list of faces, with @var{face} as the first element (by property to a list of faces, with @var{face} as the first element (by
default) and the pre-existing faces as the remaining elements. If the default) and the pre-existing faces as the remaining elements. If the
optional argument @var{append} is non-@code{nil}, @var{face} is optional argument @var{appendp} is non-@code{nil}, @var{face} is
appended to the end of the list instead. Note that in a face list, appended to the end of the list instead. Note that in a face list,
the first occurring value for each attribute takes precedence. the first occurring value for each attribute takes precedence.
@ -4297,10 +4297,10 @@ read register names use this function.
This function can be used to transpose stretches of text: This function can be used to transpose stretches of text:
@defun transpose-regions start1 end1 start2 end2 &optional leave-markers @defun transpose-regions start1 end1 start2 end2 &optional leave-markers
This function exchanges two nonoverlapping portions of the buffer. This function exchanges two nonoverlapping portions of the buffer (if
Arguments @var{start1} and @var{end1} specify the bounds of one portion they overlap, the function signals an error). Arguments @var{start1}
and arguments @var{start2} and @var{end2} specify the bounds of the and @var{end1} specify the bounds of one portion and arguments
other portion. @var{start2} and @var{end2} specify the bounds of the other portion.
Normally, @code{transpose-regions} relocates markers with the transposed Normally, @code{transpose-regions} relocates markers with the transposed
text; a marker previously positioned within one of the two transposed text; a marker previously positioned within one of the two transposed

View File

@ -1004,12 +1004,13 @@ affect, nor be affected by, any uses of the same variable symbol
elsewhere in the program. elsewhere in the program.
@item @item
Otherwise, define the variable with @code{defvar}, @code{defconst}, or Otherwise, define the variable with @code{defvar}, @code{defconst}
@code{defcustom}. @xref{Defining Variables}. Usually, the definition (@pxref{Defining Variables}), or @code{defcustom} (@pxref{Variable
should be at top-level in an Emacs Lisp file. As far as possible, it Definitions}). Usually, the definition should be at top-level in an
should include a documentation string which explains the meaning and Emacs Lisp file. As far as possible, it should include a
purpose of the variable. You should also choose the variable's name documentation string which explains the meaning and purpose of the
to avoid name conflicts (@pxref{Coding Conventions}). variable. You should also choose the variable's name to avoid name
conflicts (@pxref{Coding Conventions}).
Then you can bind the variable anywhere in a program, knowing reliably Then you can bind the variable anywhere in a program, knowing reliably
what the effect will be. Wherever you encounter the variable, it will what the effect will be. Wherever you encounter the variable, it will
@ -1024,7 +1025,7 @@ variables like @code{case-fold-search}:
@group @group
(defun search-for-abc () (defun search-for-abc ()
"Search for the string \"abc\", ignoring case differences." "Search for the string \"abc\", ignoring case differences."
(let ((case-fold-search nil)) (let ((case-fold-search t))
(re-search-forward "abc"))) (re-search-forward "abc")))
@end group @end group
@end example @end example

View File

@ -904,7 +904,7 @@ include mode and header line and a bottom divider, if any.
If @var{window} is part of a horizontal combination and the value of the If @var{window} is part of a horizontal combination and the value of the
option @code{fit-window-to-buffer-horizontally} (see below) is option @code{fit-window-to-buffer-horizontally} (see below) is
non-@code{nil}, this function adjusts @var{window}'s height. The new non-@code{nil}, this function adjusts @var{window}'s width. The new
width of @var{window} is calculated from the maximum length of its width of @var{window} is calculated from the maximum length of its
buffer's lines that follow the current start position of @var{window}. buffer's lines that follow the current start position of @var{window}.
The optional argument @var{max-width} specifies a maximum width and The optional argument @var{max-width} specifies a maximum width and