; Grammar fixes for "native-compiled"

1. Prefer "native-compiled" to "native compiled".
The adjective "native-compiled" with the hyphen is generally more
consistent with the typical pattern in English, especially when the
compound modifies a noun (e.g., "native-compiled code").

2. Prefer "natively compiled" to "natively-compiled".
The adverb "natively" modifies "compiled", and it is standard not
to hyphenate an adverb + adjective combination when the adverb ends
in -ly (e.g., "code that is natively compiled").

For example, note that we say "high-speed internet" but "highly
performant code".

* Makefile.in (dest):
* configure.ac (HAVE_NATIVE_COMP):
* doc/emacs/building.texi (Lisp Libraries):
* doc/lispref/compile.texi (Native Compilation)
(Native-Compilation Functions, Native-Compilation Variables):
* doc/lispref/functions.texi (What Is a Function, Declare Form):
* doc/lispref/loading.texi (How Programs Do Loading, Library Search):
* etc/NEWS:
* etc/NEWS.28:
* etc/NEWS.29:
* etc/NEWS.30:
* lisp/emacs-lisp/comp-common.el (native-comp-never-optimize-functions)
(comp-function-type-spec):
* lisp/emacs-lisp/comp-cstr.el:
* lisp/subr.el (locate-eln-file):
* src/comp.c (SETJMP_NAME, syms_of_comp):
* src/data.c (Fsubrp, Fnative_comp_function_p, Fsubr_native_lambda_list):
* src/lread.c (Fload):
* src/pdumper.c (dump_do_dump_relocation):
* test/src/comp-tests.el (lambda-return2): Avoid grammatically incorrect
variations on "natively compiled" and "native-compiled".  (Bug#56727)
This commit is contained in:
Stefan Kangas 2025-02-28 19:59:12 +01:00
parent 0b0bf7c07f
commit 678fdcc165
18 changed files with 47 additions and 47 deletions

View file

@ -909,7 +909,7 @@ install-etc:
done ; \
done
### Install native compiled Lisp files.
### Install native-compiled Lisp files.
install-eln: lisp
ifeq ($(HAVE_NATIVE_COMP),yes)
umask 022 ; \

View file

@ -5179,7 +5179,7 @@ if test "${with_native_compilation}" != "no"; then
LIBS=$SAVE_LIBS
fi
AC_DEFINE_UNQUOTED([NATIVE_ELISP_SUFFIX], [".eln"],
[System extension for native compiled elisp])
[System extension for native-compiled elisp])
AC_SUBST([HAVE_NATIVE_COMP])
AC_SUBST([LIBGCCJIT_CFLAGS])
AC_SUBST([LIBGCCJIT_LIBS])

View file

@ -1580,7 +1580,7 @@ Emacs Lisp Reference Manual}.
@cindex native compilation
Emacs Lisp code can also be compiled into @dfn{native code}: machine
code not unlike the one produced by a C or Fortran compiler. Native
code runs even faster than byte-code. Natively-compiled Emacs Lisp
code runs even faster than byte-code. Natively compiled Emacs Lisp
code is stored in files whose names end in @samp{.eln}. @xref{Native
Compilation,, Native Compilation, elisp, the Emacs Lisp Reference Manual}.
@ -1660,7 +1660,7 @@ way, you don't need to modify the default value of @code{load-path}.
@vindex native-comp-eln-load-path
Similarly to @code{load-path}, the list of directories where Emacs
looks for @file{*.eln} files with natively-compiled Lisp code is
looks for @file{*.eln} files with native-compiled Lisp code is
specified by the variable @code{native-comp-eln-load-path}.
@cindex autoload

View file

@ -764,32 +764,32 @@ you to be able to native-compile Lisp code.
@vindex native-compile@r{, a Lisp feature}
To determine whether the current Emacs process can produce and load
natively-compiled Lisp code, call
natively compiled Lisp code, call
@code{native-comp-available-p} (@pxref{Native-Compilation Functions}).
Unlike byte-compiled code, natively-compiled Lisp code is executed
Unlike byte-compiled code, native-compiled Lisp code is executed
directly by the machine's hardware, and therefore runs at full speed
that the host CPU can provide. The resulting speedup generally
depends on what the Lisp code does, but is usually 2.5 to 5 times
faster than the corresponding byte-compiled code.
Since native code is generally incompatible between different
systems, the natively-compiled code is @emph{not} transportable from
systems, the native-compiled code is @emph{not} transportable from
one machine to another, it can only be used on the same machine where
it was produced or on very similar ones (having the same CPU and
run-time libraries). The transportability of natively-compiled code
run-time libraries). The transportability of native-compiled code
is the same as that of shared libraries (@file{.so} or @file{.dll}
files).
Libraries of natively-compiled code include crucial dependencies on
Libraries of native-compiled code include crucial dependencies on
Emacs Lisp primitives (@pxref{What Is a Function}) and their calling
conventions, and thus Emacs usually won't load natively-compiled code
conventions, and thus Emacs usually won't load native-compiled code
produced by earlier or later Emacs versions; native compilation of the
same Lisp code by a different Emacs version will usually produce a
natively-compiled library under a unique file name that only that
natively compiled library under a unique file name that only that
version of Emacs will be able to load. However, the use of unique
file names enables several versions of the same Lisp library
natively-compiled by several different versions of Emacs to be placed
natively compiled by several different versions of Emacs to be placed
within the same directory.
@vindex no-native-compile
@ -882,7 +882,7 @@ non-@code{nil}, tells the function to place the resulting @file{.eln}
files in the last directory mentioned in
@code{native-comp-eln-load-path} (@pxref{Library Search}); this is
meant to be used as part of building an Emacs source tarball for the
first time, when the natively-compiled files, which are absent from
first time, when the native-compiled files, which are absent from
the source tarball, should be generated in the build tree instead of
the user's cache directory.
@end defun
@ -891,7 +891,7 @@ Native compilation can be run entirely asynchronously, in a subprocess
of the main Emacs process. This leaves the main Emacs process free to
use while the compilation runs in the background. This is the method
used by Emacs to natively-compile any Lisp file or byte-compiled Lisp
file that is loaded into Emacs, when no natively-compiled file for it
file that is loaded into Emacs, when no native-compiled file for it
is available. Note that because of this use of a subprocess, native
compilation may produce warning and errors which byte-compilation does
not, and Lisp code may thus need to be modified to work correctly. See
@ -938,7 +938,7 @@ in any of the directories mentioned in the
@deffn Command emacs-lisp-native-compile
This command compiles the file visited by the current buffer into
native code, if the file was changed since the last time it was
natively-compiled.
natively compiled.
@end deffn
@deffn Command emacs-lisp-native-compile-and-load
@ -1125,13 +1125,13 @@ control this, use a separate variable, described below.
This variable controls generation of trampolines. A trampoline is a
small piece of native code required to allow calling Lisp primitives,
which were advised or redefined, from Lisp code that was
natively-compiled with @code{native-comp-speed} set to 2 or greater.
natively compiled with @code{native-comp-speed} set to 2 or greater.
Emacs stores the generated trampolines on separate @file{*.eln} files.
By default, this variable's value is @code{t}, which enables the
generation of trampoline files; setting it to @code{nil} disables the
generation of trampolines. Note that if a trampoline needed for
advising or redefining a primitive is not available and cannot be
generated, calls to that primitive from natively-compiled Lisp will
generated, calls to that primitive from native-compiled Lisp will
ignore redefinitions and advices, and will behave as if the primitive
was called directly from C. Therefore, we don't recommend disabling
the trampoline generation, unless you know that all the trampolines

View file

@ -223,7 +223,7 @@ that is not in the form of ELisp source code but something like
machine code or byte code instead. More specifically it returns
@code{t} if the function is built-in (a.k.a.@: ``primitive'',
@pxref{What Is a Function}), or byte-compiled (@pxref{Byte
Compilation}), or natively-compiled (@pxref{Native Compilation}), or
Compilation}), or native-compiled (@pxref{Native Compilation}), or
a function loaded from a dynamic module (@pxref{Dynamic Modules}).
@end defun
@ -2868,7 +2868,7 @@ For description of additional types, see @ref{Lisp Data Types}).
Declaring a function with an incorrect type produces undefined behavior
and could lead to unexpected results or might even crash Emacs when
natively-compiled code is loaded, if it was compiled with
native-compiled code is loaded, if it was compiled with
@code{compilation-safety} level of zero (@pxref{compilation-safety}).
Note also that when redefining (or advising) a type-declared function,
the replacement should respect the original signature to avoid such

View file

@ -117,7 +117,7 @@ If the option @code{load-prefer-newer} is non-@code{nil}, then when
searching suffixes, @code{load} selects whichever version of a file
(@samp{.elc}, @samp{.el}, etc.)@: has been modified most recently.
In this case, @code{load} doesn't load the @samp{.eln}
natively-compiled file even if it exists.
native-compiled file even if it exists.
If @var{filename} is a relative file name, such as @file{foo} or
@file{baz/foo.bar}, @code{load} searches for the file using the variable
@ -161,7 +161,7 @@ during compilation. @xref{Compiling Macros}.
Messages like @samp{Loading foo...} and @samp{Loading foo...done} appear
in the echo area during loading unless @var{nomessage} is
non-@code{nil}. If a natively-compiled @samp{.eln} file is loaded,
non-@code{nil}. If a native-compiled @samp{.eln} file is loaded,
the message says so.
@cindex load errors
@ -462,13 +462,13 @@ the shadowed files as a string.
(@pxref{Native Compilation}), then when a @samp{.elc} byte-compiled
file is found by searching @code{load-path}, Emacs will try to look
for a corresponding @samp{.eln} file holding the corresponding
natively-compiled code. The natively-compiled files are looked up in
native-compiled code. The native-compiled files are looked up in
the directories listed by the @code{native-comp-eln-load-path}.
@vindex comp-native-version-dir
@defvar native-comp-eln-load-path
This variable holds a list of directories where Emacs looks for
natively-compiled @samp{.eln} files. File names in the list that are
native-compiled @samp{.eln} files. File names in the list that are
not absolute are interpreted as relative to @code{invocation-directory}
(@pxref{System Environment}). The last directory in the list is the
system directory, i.e.@: the directory with @samp{.eln} files

View file

@ -1470,8 +1470,8 @@ strings in a variety of formats, for example "6 months 3 weeks" or "5m
** The function 'purecopy' is now an obsolete alias for 'identity'.
** New function 'native-compile-directory'.
This function natively-compiles all Lisp files in a directory and in its
sub-directories, recursively, which were not already natively-compiled.
This function natively compiles all Lisp files in a directory and in its
sub-directories, recursively, which were not already natively compiled.
---
** New function 'color-blend'.

View file

@ -32,7 +32,7 @@ It is no longer enough to specify 'bindir=DIRECTORY' on the command
line of the "make install" command.
The reason for this new requirement is that Emacs needs to locate at
startup the directory with its "*.eln" natively-compiled files for the
startup the directory with its "*.eln" natively compiled files for the
preloaded Lisp packages, and the relative name of that directory needs
therefore to be recorded in the executable as part of the build.

View file

@ -3487,7 +3487,7 @@ These are like 'line-end-position' and 'line-beginning-position'
** New function 'compiled-function-p'.
This returns non-nil if its argument is either a built-in, or a
byte-compiled, or a natively-compiled function object, or a function
byte-compiled, or a native-compiled function object, or a function
loaded from a dynamic module.
** 'deactivate-mark' can have new value 'dont-save'.
@ -3580,7 +3580,7 @@ things to be saved.
** New function 'string-equal-ignore-case'.
This compares strings ignoring case differences.
** 'symbol-file' can now report natively-compiled ".eln" files.
** 'symbol-file' can now report native-compiled ".eln" files.
If Emacs was built with native-compilation enabled, Lisp programs can
now call 'symbol-file' with the new optional 3rd argument non-nil to
request the name of the ".eln" file which defined a given symbol.

View file

@ -425,7 +425,7 @@ This user option controls outline visibility in the output buffer of
'describe-bindings' when 'describe-bindings-outline' is non-nil.
*** 'describe-function' shows the function's inferred type when available.
For native compiled Lisp functions, 'describe-function' prints (after
For native-compiled Lisp functions, 'describe-function' prints (after
the signature) the automatically inferred function type as well. If the
function's type was explicitly declared (via the 'declare' form's
'ftype' property), 'describe-function' shows the declared type. This is

View file

@ -56,7 +56,7 @@ This is intended for debugging the compiler itself.
"Primitive functions to exclude from trampoline optimization.
Primitive functions included in this list will not be called
directly by the natively-compiled code, which makes trampolines for
directly by the native-compiled code, which makes trampolines for
those primitives unnecessary in case of function redefinition/advice."
:type '(repeat symbol)
:version "30.1")
@ -520,7 +520,7 @@ itself."
;; Declared Lisp function
(setf type-spec delc-type)
(when (native-comp-function-p f)
;; Native compiled inferred
;; Natively compiled inferred
(setf kind 'inferred
type-spec (subr-type f))))))
(when type-spec

View file

@ -216,7 +216,7 @@ Return them as multiple value."
collect cstr into positives
finally return (cl-values positives negatives)))
;; So we can load comp-cstr.el and comp.el in non native compiled
;; So we can load comp-cstr.el and comp.el in non natively compiled
;; builds.
(defvar comp-ctxt nil)

View file

@ -3112,7 +3112,7 @@ This is to `put' what `defalias' is to `fset'."
(declare-function comp-el-to-eln-rel-filename "comp.c")
(defun locate-eln-file (eln-file)
"Locate a natively-compiled ELN-FILE by searching its load path.
"Locate a native-compiled ELN-FILE by searching its load path.
This function looks in directories named by `native-comp-eln-load-path'."
(declare (important-return-value t))
(or (locate-file-internal (concat comp-native-version-dir "/" eln-file)

View file

@ -518,7 +518,7 @@ load_gccjit_if_necessary (bool mandatory)
#endif
#define SETJMP_NAME SETJMP
/* Max number function importable by native compiled code. */
/* Max number function importable by native-compiled code. */
#define F_RELOC_MAX_SIZE 1600
typedef struct {
@ -5556,7 +5556,7 @@ syms_of_comp (void)
doc: /* If non-nil, compile loaded .elc files asynchronously.
After compilation, each function definition is updated to use the
natively-compiled one. */);
natively compiled one. */);
native_comp_jit_compilation = true;
DEFSYM (Qnative_comp_speed, "native-comp-speed");
@ -5726,7 +5726,7 @@ For internal use. */);
Vcomp_eln_to_el_h = CALLN (Fmake_hash_table, QCtest, Qequal);
DEFVAR_LISP ("native-comp-eln-load-path", Vnative_comp_eln_load_path,
doc: /* List of directories to look for natively-compiled *.eln files.
doc: /* List of directories to look for native-compiled *.eln files.
The *.eln files are actually looked for in a version-specific
subdirectory of each directory in this list. That subdirectory
@ -5746,11 +5746,11 @@ Emacs. */);
Vnative_comp_enable_subr_trampolines,
doc: /* If non-nil, enable generation of trampolines for calling primitives.
Trampolines are needed so that Emacs respects redefinition or advice of
primitive functions when they are called from Lisp code natively-compiled
primitive functions when they are called from native-compiled Lisp code
at `native-comp-speed' of 2.
By default, the value is t, and when Emacs sees a redefined or advised
primitive called from natively-compiled Lisp, it generates a trampoline
primitive called from native-compiled Lisp, it generates a trampoline
for it on-the-fly.
If the value is a file name (a string), it specifies the directory in
@ -5762,8 +5762,8 @@ When this variable is nil, generation of trampolines is disabled.
Disabling the generation of trampolines, when a trampoline for a redefined
or advised primitive is not already available from previous compilations,
means that such redefinition or advice will not have effect when calling
primitives from natively-compiled Lisp code. That is, calls to primitives
without existing trampolines from natively-compiled Lisp will behave as if
primitives from native-compiled Lisp code. That is, calls to primitives
without existing trampolines from native-compiled Lisp will behave as if
the primitive was called directly from C, and will ignore its redefinition
and advice. */);

View file

@ -499,7 +499,7 @@ DEFUN ("user-ptrp", Fuser_ptrp, Suser_ptrp, 1, 1, 0,
#endif
DEFUN ("subrp", Fsubrp, Ssubrp, 1, 1, 0,
doc: /* Return t if OBJECT is a built-in or native compiled Lisp function.
doc: /* Return t if OBJECT is a built-in or native-compiled Lisp function.
See also `primitive-function-p' and `native-comp-function-p'. */)
(Lisp_Object object)
@ -1046,7 +1046,7 @@ SUBR must be a built-in function. */)
}
DEFUN ("native-comp-function-p", Fnative_comp_function_p, Snative_comp_function_p, 1, 1,
0, doc: /* Return t if the object is native compiled Lisp function, nil otherwise. */)
0, doc: /* Return t if the object is native-compiled Lisp function, nil otherwise. */)
(Lisp_Object object)
{
return NATIVE_COMP_FUNCTIONP (object) ? Qt : Qnil;
@ -1054,7 +1054,7 @@ DEFUN ("native-comp-function-p", Fnative_comp_function_p, Snative_comp_function_
DEFUN ("subr-native-lambda-list", Fsubr_native_lambda_list,
Ssubr_native_lambda_list, 1, 1, 0,
doc: /* Return the lambda list for a native compiled lisp/d
doc: /* Return the lambda list for a native-compiled lisp/d
function or t otherwise. */)
(Lisp_Object subr)
{

View file

@ -1680,7 +1680,7 @@ Return t if the file exists and loads successfully. */)
if (is_module)
message_with_string ("Loading %s (module)...", file, 1);
else if (is_native_elisp)
message_with_string ("Loading %s (native compiled elisp)...", file, 1);
message_with_string ("Loading %s (native-compiled elisp)...", file, 1);
else if (!compiled)
message_with_string ("Loading %s (source)...", file, 1);
else if (newer)
@ -1759,7 +1759,7 @@ Return t if the file exists and loads successfully. */)
if (is_module)
message_with_string ("Loading %s (module)...done", file, 1);
else if (is_native_elisp)
message_with_string ("Loading %s (native compiled elisp)...done", file, 1);
message_with_string ("Loading %s (native-compiled elisp)...done", file, 1);
else if (!compiled)
message_with_string ("Loading %s (source)...done", file, 1);
else if (newer)

View file

@ -5503,7 +5503,7 @@ dump_do_dump_relocation (const uintptr_t dump_base,
case RELOC_NATIVE_SUBR:
{
/* When resurrecting from a dump given non all the original
native compiled subrs may be still around we can't rely on
native-compiled subrs may be still around we can't rely on
a 'top_level_run' mechanism, we revive them one-by-one
here. */
struct Lisp_Subr *subr = dump_ptr (dump_base, reloc_offset);

View file

@ -329,7 +329,7 @@ Check that the resulting binaries do not differ."
(should (= (funcall f 3) 4))))
(comp-deftest lambda-return2 ()
"Check a nested lambda function gets native compiled."
"Check a nested lambda function gets natively compiled."
(let ((f (comp-tests-lambda-return-f2)))
(should (native-comp-function-p f))
(let ((f2 (funcall f)))