summaryrefslogtreecommitdiff
path: root/doc/lispref
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2019-05-23 10:53:23 +0900
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2019-05-23 10:53:23 +0900
commitb40dde705af4d53853de6185a2468153b442dc9a (patch)
treee8dabba695163c2d07439fad6accff761f8f714c /doc/lispref
parent5d7dafacf4afc888511649f6fc24c28210cd0dfc (diff)
parent03feb9376b54c489e24478954a11061e9b0d6db7 (diff)
downloademacs-b40dde705af4d53853de6185a2468153b442dc9a.tar.gz
Merge branch 'master' into harfbuzz
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/commands.texi9
-rw-r--r--doc/lispref/hooks.texi1
-rw-r--r--doc/lispref/internals.texi11
-rw-r--r--doc/lispref/loading.texi23
-rw-r--r--doc/lispref/modes.texi7
-rw-r--r--doc/lispref/nonascii.texi2
-rw-r--r--doc/lispref/os.texi7
-rw-r--r--doc/lispref/processes.texi2
-rw-r--r--doc/lispref/searching.texi7
-rw-r--r--doc/lispref/sequences.texi2
-rw-r--r--doc/lispref/text.texi8
-rw-r--r--doc/lispref/variables.texi2
-rw-r--r--doc/lispref/windows.texi67
13 files changed, 131 insertions, 17 deletions
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index cd44c1c87ef..5ea0be2667b 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -1047,12 +1047,9 @@ and meaning of input events in detail.
This function returns non-@code{nil} if @var{object} is an input event
or event type.
-Note that any symbol might be used as an event or an event type.
-@code{eventp} cannot distinguish whether a symbol is intended by Lisp
-code to be used as an event. Instead, it distinguishes whether the
-symbol has actually been used in an event that has been read as input in
-the current Emacs session. If a symbol has not yet been so used,
-@code{eventp} returns @code{nil}.
+Note that any non-@code{nil} symbol might be used as an event or an
+event type; @code{eventp} cannot distinguish whether a symbol is
+intended by Lisp code to be used as an event.
@end defun
@menu
diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi
index 71992464e09..f775aa4d4b0 100644
--- a/doc/lispref/hooks.texi
+++ b/doc/lispref/hooks.texi
@@ -251,6 +251,7 @@ I thought did not need to be mentioned here:
Lisp:
after-load-functions
+after-set-visited-file-name-hook
auto-coding-functions
choose-completion-string-functions
completing-read-function
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi
index 5ae71afbef2..cfeb492af40 100644
--- a/doc/lispref/internals.texi
+++ b/doc/lispref/internals.texi
@@ -1191,6 +1191,17 @@ grow with new Emacs releases. Given the version of Emacs, the module
can use only the parts of the module @acronym{API} that existed in
that version, since those parts are identical in later versions.
+@file{emacs-module.h} defines a preprocessor macro
+@code{EMACS_MAJOR_VERSION}. It expands to an integer literal which is
+the latest major version of Emacs supported by the header.
+@xref{Version Info}. Note that the value of
+@code{EMACS_MAJOR_VERSION} is a compile-time constant and does not
+represent the version of Emacs that is currently running and has
+loaded your module. If you want your module to be compatible with
+various versions of @file{emacs-module.h} as well as various versions
+of Emacs, you can use conditional compilation based on
+@code{EMACS_MAJOR_VERSION}.
+
We recommend that modules always perform the compatibility
verification, unless they do their job entirely in the initialization
function, and don't access any Lisp objects or use any Emacs functions
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi
index 6f1213f097b..3261e6d1888 100644
--- a/doc/lispref/loading.texi
+++ b/doc/lispref/loading.texi
@@ -466,9 +466,11 @@ first call to the function automatically loads the proper library, in
order to install the real definition and other associated code, then
runs the real definition as if it had been loaded all along.
Autoloading can also be triggered by looking up the documentation of
-the function or macro (@pxref{Documentation Basics}).
+the function or macro (@pxref{Documentation Basics}), and completion
+of variable and function names (@pxref{Autoload by Prefix} below).
@menu
+* Autoload by Prefix:: Autoload by Prefix.
* When to Autoload:: When to Use Autoload.
@end menu
@@ -703,6 +705,25 @@ symbol's new function value. If the value of the optional argument
function, only a macro.
@end defun
+@node Autoload by Prefix
+@subsection Autoload by Prefix
+@cindex autoload by prefix
+
+@vindex definition-prefixes
+@findex register-definition-prefixes
+@vindex autoload-compute-prefixes
+During completion for the commands @code{describe-variable} and
+@code{describe-function}, Emacs will try to load files which may
+contain definitions matching the prefix being completed. The variable
+@code{definition-prefixes} holds a hashtable which maps a prefix to
+the corresponding list of files to load for it. Entries to this
+mapping are added by calls to @code{register-definition-prefixes}
+which are generated by @code{update-file-autoloads}
+(@pxref{Autoload}). Files which don't contain any definitions worth
+loading (test files, for examples), should set
+@code{autoload-compute-prefixes} to @code{nil} as a file-local
+variable.
+
@node When to Autoload
@subsection When to Use Autoload
@cindex autoload, when to use
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 4315b70ed72..97e9be9918f 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -3238,7 +3238,12 @@ is disabled, @code{font-lock-face} has no effect on the display.
It is ok for a mode to use @code{font-lock-face} for some text and
also use the normal Font Lock machinery. But if the mode does not use
the normal Font Lock machinery, it should not set the variable
-@code{font-lock-defaults}.
+@code{font-lock-defaults}. In this case the @code{face} property will
+not be overriden, so using the @code{face} property could work too.
+However, using @code{font-lock-face} is generally preferable as it
+allows the user to control the fontification by toggling
+@code{font-lock-mode}, and lets the code work regardless of whether
+the mode uses Font Lock machinery or not.
@node Faces for Font Lock
@subsection Faces for Font Lock
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi
index 9c64c3cf2ca..47206a406fd 100644
--- a/doc/lispref/nonascii.texi
+++ b/doc/lispref/nonascii.texi
@@ -1049,7 +1049,7 @@ is like @code{undecided}, but it prefers to choose @code{utf-8} when
possible.
In general, a coding system doesn't guarantee roundtrip identity:
-decoding a byte sequence using coding system, then encoding the
+decoding a byte sequence using a coding system, then encoding the
resulting text in the same coding system, can produce a different byte
sequence. But some coding systems do guarantee that the byte sequence
will be the same as what you originally decoded. Here are a few
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 59cd5a8fe8a..fef954eb7a3 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -2197,7 +2197,7 @@ is the character Emacs currently uses for quitting, usually @kbd{C-g}.
@subsection Recording Input
@cindex recording input
-@defun recent-keys
+@defun recent-keys &optional include-cmds
This function returns a vector containing the last 300 input events from
the keyboard or mouse. All input events are included, whether or not
they were used as parts of key sequences. Thus, you always get the last
@@ -2205,6 +2205,11 @@ they were used as parts of key sequences. Thus, you always get the last
(These are excluded because they are less interesting for debugging; it
should be enough to see the events that invoked the macros.)
+If @var{include-cmds} is non-@code{nil}, complete key sequences in the
+result vector are interleaved with pseudo-events of the form
+@code{(nil . @var{COMMAND})}, where @var{COMMAND} is the binding of
+the key sequence (@pxref{Command Overview}).
+
A call to @code{clear-this-command-keys} (@pxref{Command Loop Info})
causes this function to return an empty vector immediately afterward.
@end defun
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
index 69f781e3a9f..b73401a62a2 100644
--- a/doc/lispref/processes.texi
+++ b/doc/lispref/processes.texi
@@ -1688,7 +1688,7 @@ how to do these things:
(save-excursion
;; @r{Insert the text, advancing the process marker.}
(goto-char (process-mark proc))
- (insert string)
+ (insert-before-markers string)
(set-marker (process-mark proc) (point)))
(if moving (goto-char (process-mark proc)))))))
@end group
diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi
index 8775254dd07..24f30b4dac6 100644
--- a/doc/lispref/searching.texi
+++ b/doc/lispref/searching.texi
@@ -1070,6 +1070,13 @@ list of characters @var{chars}.
@c Internal functions: regexp-opt-group
+@defvar regexp-unmatchable
+This variable contains a regexp that is guaranteed not to match any
+string at all. It is particularly useful as default value for
+variables that may be set to a pattern that actually matches
+something.
+@end defvar
+
@node Regexp Search
@section Regular Expression Searching
@cindex regular expression searching
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi
index a7f270c0680..4b67a5f9f1a 100644
--- a/doc/lispref/sequences.texi
+++ b/doc/lispref/sequences.texi
@@ -601,7 +601,7 @@ returned value is a list.
@defun seq-mapn function &rest sequences
This function returns the result of applying @var{function} to each
element of @var{sequences}. The arity (@pxref{What Is a Function,
-sub-arity}) of @var{function} must match the number of sequences.
+subr-arity}) of @var{function} must match the number of sequences.
Mapping stops at the end of the shortest sequence, and the returned
value is a list.
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 500df1f8f0d..278bc3c2680 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -2252,9 +2252,11 @@ If it is impossible to move to column @var{column} because that is in
the middle of a multicolumn character such as a tab, point moves to the
end of that character. However, if @var{force} is non-@code{nil}, and
@var{column} is in the middle of a tab, then @code{move-to-column}
-converts the tab into spaces so that it can move precisely to column
-@var{column}. Other multicolumn characters can cause anomalies despite
-@var{force}, since there is no way to split them.
+either converts the tab into spaces (when @code{indent-tabs-mode} is
+@code{nil}), or inserts enough spaces before it (otherwise), so that
+point can move precisely to column @var{column}. Other multicolumn
+characters can cause anomalies despite @var{force}, since there is no
+way to split them.
The argument @var{force} also has an effect if the line isn't long
enough to reach column @var{column}; if it is @code{t}, that means to
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index aca7d2f5e93..932b7c829b9 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -2009,7 +2009,7 @@ all files in those directories. The list in @var{variables} can be of
one of the two forms: @code{(@var{major-mode} . @var{alist})} or
@code{(@var{directory} . @var{list})}. With the first form, if the
file's buffer turns on a mode that is derived from @var{major-mode},
-then the all the variables in the associated @var{alist} are applied;
+then all the variables in the associated @var{alist} are applied;
@var{alist} should be of the form @code{(@var{name} . @var{value})}.
A special value @code{nil} for @var{major-mode} means the settings are
applicable to any mode. In @var{alist}, you can use a special
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 32e8c2afa31..96e42a148c5 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -2601,6 +2601,63 @@ window and displaying the buffer in that window. It can fail if all
windows are dedicated to other buffers (@pxref{Dedicated Windows}).
@end defun
+@defun display-buffer-in-direction buffer alist
+This function tries to display @var{buffer} at a location specified by
+@var{alist}. For this purpose, @var{alist} should contain a
+@code{direction} entry whose value is one of @code{left}, @code{above}
+(or @code{up}), @code{right} and @code{below} (or @code{down}). Other
+values are usually interpreted as @code{below}.
+
+If @var{alist} also contains a @code{window} entry, its value
+specifies a reference window. That value can be a special symbol like
+@code{main} which stands for the selected frame's main window
+(@pxref{Side Window Options and Functions}) or @code{root} standing
+for the selected frame's root window (@pxref{Windows and Frames}). It
+can also specify an arbitrary valid window. Any other value (or
+omitting the @code{window} entry entirely) means to use the selected
+window as reference window.
+
+This function first tries to reuse a window in the specified direction
+that already shows @var{buffer}. If no such window exists, it tries
+to split the reference window in order to produce a new window in the
+specified direction. If this fails as well, it will try to display
+@var{buffer} in an existing window in the specified direction. In
+either case, the window chosen will appear on the side of the
+reference window specified by the @code{direction} entry, sharing at
+least one edge with the reference window.
+
+If the reference window is live, the edge the chosen window will share
+with it is always the opposite of the one specified by the
+@code{direction} entry. For example, if the value of the
+@code{direction} entry is @code{left}, the chosen window's right edge
+coordinate (@pxref{Coordinates and Windows}) will equal the reference
+window's left edge coordinate.
+
+If the reference window is internal, a reused window must share with
+it the edge specified by the @code{direction} entry. Hence if, for
+example, the reference window is the frame's root window and the value
+of the @code{direction} entry is @code{left}, a reused window must be
+on the left of the frame. This means that the left edge coordinate of
+the chosen window and that of the reference window are the same.
+
+A new window, however, will be created by splitting the reference
+window such that the chosen window will share the opposite edge with
+the reference window. In our example, a new root window would be
+created with a new live window and the reference window as its
+children. The chosen window's right edge coordinate would then equal
+the left edge coordinate of the reference window. Its left edge
+coordinate would equal the left edge coordinate of the frame's new
+root window.
+
+Four special values for @code{direction} entries allow to implicitly
+specify the selected frame's main window as the reference window:
+@code{leftmost}, @code{top}, @code{rightmost} and @code{bottom}. This
+means that instead of, for example, @w{@code{(direction . left)
+(window . main)}} one can just specify @w{@code{(direction
+. leftmost)}}. An existing @code{window} @var{alist} entry is ignored
+in such cases.
+@end defun
+
@defun display-buffer-below-selected buffer alist
This function tries to display @var{buffer} in a window below the
selected window. If there is a window below the selected one and that
@@ -2934,12 +2991,20 @@ If non-@code{nil}, the value specifies the slot of the side window
supposed to display the buffer. This entry is used only by
@code{display-buffer-in-side-window}.
+@vindex direction@r{, a buffer display action alist entry}
+@item direction
+The value specifies a direction which, together with a @code{window}
+entry, allows @code{display-buffer-in-direction} to determine the
+location of the window to display the buffer.
+
@vindex window@r{, a buffer display action alist entry}
@item window
The value specifies a window that is in some way related to the window
chosen by @code{display-buffer}. This entry is currently used by
@code{display-buffer-in-atom-window} to indicate the window on whose
-side the new window shall be created.
+side the new window shall be created. It is also used by
+@code{display-buffer-in-direction} to specify the reference window on
+whose side the resulting window shall appear.
@vindex allow-no-window@r{, a buffer display action alist entry}
@item allow-no-window