summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2022-10-16 08:27:16 +0200
committerStefan Kangas <stefankangas@gmail.com>2022-10-16 08:27:16 +0200
commit07222447b6c9e75b713fe3b3954952fbb0e40c71 (patch)
tree2876590809eb930001208acff8652e25c2695ab4
parentc4c4a60f71254b7f59010c5539545fc2fc49b855 (diff)
parent067361f3a29ae23ff609a4308dd025fe783b9723 (diff)
downloademacs-07222447b6c9e75b713fe3b3954952fbb0e40c71.tar.gz
Merge from origin/emacs-28
067361f3a2 ; Improve documentation of 'C-M-i' fdb6f7cf26 ; Fix documentation of 'comp-enable-subr-trampolines' be30369e01 ; Avoid incorrect indentation in an @example. 4bd3dd505e Document how to control where the *.eln files are written b7d7c2d9e9 Add cross-reference to alternative syntaxes for Unicode # Conflicts: # doc/emacs/custom.texi
-rw-r--r--doc/emacs/custom.texi18
-rw-r--r--doc/emacs/programs.texi41
-rw-r--r--doc/lispref/compile.texi18
-rw-r--r--doc/lispref/modes.texi5
-rw-r--r--src/comp.c17
5 files changed, 80 insertions, 19 deletions
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index f98527bf9a7..6e5a0ddc1c7 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -2821,6 +2821,24 @@ strings incorrectly. You should then avoid adding Emacs Lisp code
that modifies the coding system in other ways, such as calls to
@code{set-language-environment}.
+ An alternative to using non-@acronym{ASCII} characters directly is
+to use one of the character escape syntaxes described in
+@pxref{General Escape Syntax,,, elisp, The Emacs Lisp Reference
+Manual}, as they allow all Unicode codepoints to be specified using
+only @acronym{ASCII} characters.
+
+ To bind non-@acronym{ASCII} keys, you must use a vector (@pxref{Init
+Rebinding}). The string syntax cannot be used, since the
+non-@acronym{ASCII} characters will be interpreted as meta keys. For
+instance:
+
+@example
+(global-set-key [?@var{char}] 'some-function)
+@end example
+
+@noindent
+Type @kbd{C-q}, followed by the key you want to bind, to insert @var{char}.
+
@node Early Init File
@subsection The Early Init File
@cindex early init file
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index 30c7f106e50..818deb39415 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -1421,27 +1421,38 @@ nor comments). The default value is @code{code}.
Completion is normally done in the minibuffer (@pxref{Completion}),
but you can also complete symbol names in ordinary Emacs buffers.
+@cindex tags-based completion
@kindex M-TAB
@kindex C-M-i
- In programming language modes, type @kbd{C-M-i} or @kbd{M-@key{TAB}}
-to complete the partial symbol before point. On graphical displays,
-the @kbd{M-@key{TAB}} key is usually reserved by the window manager
-for switching graphical windows, so you should type @kbd{C-M-i} or
-@kbd{@key{ESC} @key{TAB}} instead.
-
-@cindex tags-based completion
@findex completion-at-point@r{, in programming language modes}
@cindex Lisp symbol completion
@cindex completion (Lisp symbols)
In most programming language modes, @kbd{C-M-i} (or
-@kbd{M-@key{TAB}}) invokes the command @code{completion-at-point},
-which generates its completion list in a flexible way. If Semantic
-mode is enabled, it tries to use the Semantic parser data for
-completion (@pxref{Semantic}). If Semantic mode is not enabled or
-fails at performing completion, it tries to complete using the
-selected tags table (@pxref{Tags Tables}). If in Emacs Lisp mode, it
-performs completion using the function, variable, or property names
-defined in the current Emacs session.
+@kbd{M-@key{TAB}}@footnote{
+On graphical displays, the @kbd{M-@key{TAB}} key is usually reserved
+by the window manager for switching graphical windows, so you should
+type @kbd{C-M-i} or @kbd{@key{ESC} @key{TAB}} instead.
+}) invokes the command @code{completion-at-point}, which generates the
+list of possible completions for the symbol at point. This command
+uses the available support facilities to come up with the completion
+candidates:
+
+@itemize @bullet
+@item
+If Semantic mode is enabled (@pxref{Semantic}), the command tries to
+use the Semantic parser data for completion.
+
+@item
+If Semantic mode is not enabled or fails at performing completion, the
+command tries to complete using the selected tags table (@pxref{Tags
+Tables}); you need to visit the tags table with @w{@kbd{M-x
+visit-tags-table}} for that to work.
+
+@item
+In Emacs Lisp mode, the command performs completion using the
+function, variable, or property names defined in the current Emacs
+session.
+@end itemize
In all other respects, in-buffer symbol completion behaves like
minibuffer completion. For instance, if Emacs cannot complete to
diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi
index 70e0f98f443..6f8431c55ce 100644
--- a/doc/lispref/compile.texi
+++ b/doc/lispref/compile.texi
@@ -843,6 +843,14 @@ native compilation of that file. In addition, a similar variable
file. If both @code{no-byte-compile} and @code{no-native-compile} are
specified, the former takes precedence.
+@cindex native compilation, prevent writing @file{*.eln} files
+ Sometimes there could be a need to prevent the native compilation
+from writing its results, the @file{*.eln} files, into a subdirectory
+of @code{user-emacs-directory} (@pxref{Init File}). You can do that
+by either changing the value of @code{native-comp-eln-load-path}
+(@pxref{Native-Compilation Variables}) or by temporarily pointing the
+@env{HOME} environment variable to a non-existing directory.
+
@menu
* Native-Compilation Functions:: Functions to natively-compile Lisp.
* Native-Compilation Variables:: Variables controlling native compilation.
@@ -1075,3 +1083,13 @@ subprocesses that are still running, thus preventing the corresponding
@file{.eln} files from being written. If the value is @code{nil}, the
default, Emacs will kill these subprocesses without querying.
@end defopt
+
+The variable @code{native-comp-eln-load-path} holds the list of
+directories where Emacs looks for the @file{*.eln} files
+(@pxref{Library Search}); in that role it is the equivalent of
+@code{load-path} used to look for @file{*.el} and @file{*.elc} files.
+The directories in this list are also used for writing the
+@file{*.eln} files produced by asynchronous native-compilation;
+specifically, Emacs will write these files into the first writable
+directory in the list. Thus, you can control where native-compilation
+stores the results by changing the value of this variable.
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 75eb21522f1..73c5fcd44d7 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -3146,9 +3146,10 @@ match found by @var{matcher} acts as the anchor for further searches
specified by @var{anchored-highlighter}. @var{anchored-highlighter}
is a list of the following form:
+@c Don't wrap the line in the next @example, because that tends to
+@c produce ugly indentation in Info
@example
-(@var{anchored-matcher} @var{pre-form} @var{post-form}
- @var{subexp-highlighters}@dots{})
+(@var{anchored-matcher} @var{pre-form} @var{post-form} @var{subexp-highlighters}@dots{})
@end example
Here, @var{anchored-matcher}, like @var{matcher}, is either a regular
diff --git a/src/comp.c b/src/comp.c
index b7541c5d9f7..14012634ccc 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -5868,8 +5868,21 @@ The last directory of this list is assumed to be the system one. */);
Vnative_comp_eln_load_path = Fcons (build_string ("../native-lisp/"), Qnil);
DEFVAR_BOOL ("comp-enable-subr-trampolines", comp_enable_subr_trampolines,
- doc: /* If non-nil enable primitive trampoline synthesis.
-This makes primitive functions redefinable or advisable effectively. */);
+ doc: /* If non-nil, enable primitive trampoline synthesis.
+This makes Emacs respect redefinition or advises of primitive functions
+when they are called from Lisp code natively-compiled at `native-comp-speed'
+of 2.
+
+By default, this is enabled, and when Emacs sees a redefined or advised
+primitive called from natively-compiled Lisp, it generates a trampoline
+for it on-the-fly.
+
+Disabling this, when a trampoline for a redefined or advised primitive is
+not available from previous compilations, means that such redefinition
+or advise will not have effect on calls from natively-compiled Lisp code.
+That is, calls to primitives without existing trampolines from
+natively-compiled Lisp will behave as if the primitive was called
+directly from C. */);
DEFVAR_LISP ("comp-installed-trampolines-h", Vcomp_installed_trampolines_h,
doc: /* Hash table subr-name -> installed trampoline.