]> git.eshelyaron.com Git - emacs.git/commitdiff
; Grammar fixes for "native-compiled"
authorStefan Kangas <stefankangas@gmail.com>
Fri, 28 Feb 2025 18:59:12 +0000 (19:59 +0100)
committerEshel Yaron <me@eshelyaron.com>
Tue, 4 Mar 2025 20:54:05 +0000 (21:54 +0100)
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)

(cherry picked from commit 678fdcc16594aaedb319fe145d039aa118174f5d)

16 files changed:
Makefile.in
configure.ac
doc/emacs/building.texi
doc/lispref/compile.texi
doc/lispref/functions.texi
doc/lispref/loading.texi
etc/NEWS.28
etc/NEWS.29
lisp/emacs-lisp/comp-common.el
lisp/emacs-lisp/comp-cstr.el
lisp/subr.el
src/comp.c
src/data.c
src/lread.c
src/pdumper.c
test/src/comp-tests.el

index 257ca24aecc7826b63285ff856106d9c7e7c209b..0b9ea8ee5902f688fbfc40b1b453c91952a1afb0 100644 (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 ; \
index a2f626d5ca3c5609e1019fbdf4edabfcc2d2fc99..a13a7765e425beedbf1664a2de67f9c50cefb6ec 100644 (file)
@@ -5212,7 +5212,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])
index 489b912da71fae72f55d8629ecb04a60ea039778..2e02422739c345a2ff0e59e294331bbd8881f604 100644 (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
index 060b5ccae4c6e4f18ba7bfbf569e999ef48361e6..57e6700184731933dfa6efca6791841dbb18c31d 100644 (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
index 729071c09c61d50a39375b8ad2a6b220fe9baea1..62c555edd4fbb7310861dbc5507d67a1849f372e 100644 (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
 
@@ -2777,7 +2777,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
index 8fd5a8303f7ab82fd9564be9a25633897109723a..c0cf5de8a7f8e7b29dc5c312ed742ac68cb851fc 100644 (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
index 2c0009e1902f6ba62dfa97309e2bcfe50b73dd5e..f8f8664f00b2d4fa6b568c56999353b5637350ab 100644 (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.
 
index 2879892cb01e3d9089d86186bd4e865bfa535f1a..61fa3747aa12ca9b4bf628ddad8405b8d9ddafb7 100644 (file)
@@ -3486,7 +3486,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'.
@@ -3579,7 +3579,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.
index 0eeda8cef541283f50da5d3aac79c2e9c58263ef..74aea058933c2e8a6eab937702e910cee8707df3 100644 (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
index 7931118361ba4d98af601433fffb15036e09274e..49c2c5d35d1d54545b5f397ab49ba1e7d2a2ddd4 100644 (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)
 
index be2e292cdc831bd3947c3e0fdda44f8fb3ac1974..af2ffa713e554d174caeb6f321cc4af521334825 100644 (file)
@@ -3127,7 +3127,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)
index 692b28e00cb8a33e28f07ae2bbe96d7f6a3af11a..219a482931ee24d5ea7f9c8db1c31d2f0d08e0a8 100644 (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.  */);
 
index 5fcdda1b6e8379b4cf9e06b5b81632c05a012710..b2e5ffe4eedbf72b099e97c9c6496ba94d4a7e8a 100644 (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)
 {
index df1caaf57324c5a34ed72f4e1aaf63db64bf5f61..d45860fd470efd515ab72813171216797c1e9f8d 100644 (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)
index b954421e225a45bf4f60e6e3c87a9334d55b63dd..7a8c5bba9ad47ebd8eb16b744a989b4b207b24c7 100644 (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);
index e8ea2fde9e282a00de28f36db77f0d9e2e1209d8..2991a05d771a995aff79584bf8ff05eba1b2a7db 100644 (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)))