emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 4073635: Rename feature `nativecomp' into `native-compile'


From: Andrea Corallo
Subject: master 4073635: Rename feature `nativecomp' into `native-compile'
Date: Wed, 5 May 2021 16:31:53 -0400 (EDT)

branch: master
commit 40736357b8b811ffbe9023527db5c2a91a9c7a5a
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>

    Rename feature `nativecomp' into `native-compile'
    
        * test/src/comp-tests.el : Rename feature `nativecomp' into
        `native-compile'.
        * test/lisp/help-fns-tests.el (help-fns-test-lisp-defun): Likewise.
        * src/comp.c (syms_of_comp): Likewise.
        * lisp/startup.el (normal-top-level): Likewise.
        * lisp/loadup.el: Likewise.
        * lisp/help.el (help-function-arglist): Likewise.
        * lisp/emacs-lisp/package.el (package--native-compile-async)
        (package--delete-directory): Likewise.
        * lisp/emacs-lisp/nadvice.el (advice--add-function): Likewise.
        * lisp/emacs-lisp/comp.el (comp-ensure-native-compiler): Likewise.
        * lisp/emacs-lisp/advice.el (ad-add-advice): Likewise.
---
 lisp/emacs-lisp/advice.el   | 2 +-
 lisp/emacs-lisp/comp.el     | 2 +-
 lisp/emacs-lisp/nadvice.el  | 2 +-
 lisp/emacs-lisp/package.el  | 4 ++--
 lisp/help.el                | 2 +-
 lisp/loadup.el              | 4 ++--
 lisp/startup.el             | 4 ++--
 src/comp.c                  | 2 +-
 test/lisp/help-fns-tests.el | 2 +-
 test/src/comp-tests.el      | 2 +-
 10 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el
index dc8636f..8e8d0e2 100644
--- a/lisp/emacs-lisp/advice.el
+++ b/lisp/emacs-lisp/advice.el
@@ -2076,7 +2076,7 @@ mapped to the closest extremal position).
 If FUNCTION was not advised already, its advice info will be
 initialized.  Redefining a piece of advice whose name is part of
 the cache-id will clear the cache."
-  (when (and (featurep 'nativecomp)
+  (when (and (featurep 'native-compile)
              (subr-primitive-p (symbol-function function)))
     (comp-subr-trampoline-install function))
   (cond ((not (ad-is-advised function))
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 297c1f7..f700faa 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -938,7 +938,7 @@ In use by the back-end."
 Signal an error otherwise.
 To be used by all entry points."
   (cond
-   ((null (featurep 'nativecomp))
+   ((null (featurep 'native-compile))
     (error "Emacs was not compiled with native compiler support 
(--with-native-compilation)"))
    ((null (native-comp-available-p))
     (error "Cannot find libgccjit library"))))
diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el
index f974056..747572a 100644
--- a/lisp/emacs-lisp/nadvice.el
+++ b/lisp/emacs-lisp/nadvice.el
@@ -320,7 +320,7 @@ is also interactive.  There are 3 cases:
 
 ;;;###autoload
 (defun advice--add-function (where ref function props)
-  (when (and (featurep 'nativecomp)
+  (when (and (featurep 'native-compile)
              (subr-primitive-p (gv-deref ref)))
     (let ((subr-name (intern (subr-name (gv-deref ref)))))
       ;; Requiring the native compiler to advice `macroexpand' cause a
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 5035850..e133917 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1081,7 +1081,7 @@ This assumes that `pkg-desc' has already been activated 
with
   "Native compile installed package PKG-DESC asynchronously.
 This assumes that `pkg-desc' has already been activated with
 `package-activate-1'."
-  (when (and (featurep 'nativecomp)
+  (when (and (featurep 'native-compile)
              (native-comp-available-p))
     (let ((warning-minimum-level :error))
       (native-compile-async (package-desc-dir pkg-desc) t))))
@@ -2265,7 +2265,7 @@ confirmation to install packages."
   "Delete DIR recursively.
 Clean-up the corresponding .eln files if Emacs is native
 compiled."
-  (when (featurep 'nativecomp)
+  (when (featurep 'native-compile)
     (cl-loop
      for file in (directory-files-recursively dir ".el\\'")
      do (comp-clean-up-stale-eln (comp-el-to-eln-filename file))))
diff --git a/lisp/help.el b/lisp/help.el
index 6ba59ae..e70041a 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1890,7 +1890,7 @@ the same names as used in the original source code, when 
possible."
    ((and (byte-code-function-p def) (listp (aref def 0))) (aref def 0))
    ((eq (car-safe def) 'lambda) (nth 1 def))
    ((eq (car-safe def) 'closure) (nth 2 def))
-   ((and (featurep 'nativecomp)
+   ((and (featurep 'native-compile)
          (subrp def)
          (listp (subr-native-lambda-list def)))
     (subr-native-lambda-list def))
diff --git a/lisp/loadup.el b/lisp/loadup.el
index c82d081..158c02e 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -449,7 +449,7 @@ lost after dumping")))
 ;; At this point, we're ready to resume undo recording for scratch.
 (buffer-enable-undo "*scratch*")
 
-(when (featurep 'nativecomp)
+(when (featurep 'native-compile)
   ;; Fix the compilation unit filename to have it working when
   ;; installed or if the source directory got moved.  This is set to be
   ;; a pair in the form of:
@@ -521,7 +521,7 @@ lost after dumping")))
                         ((equal dump-mode "bootstrap") "emacs")
                         ((equal dump-mode "pbootstrap") "bootstrap-emacs.pdmp")
                         (t (error "unrecognized dump mode %s" dump-mode)))))
-      (when (and (featurep 'nativecomp)
+      (when (and (featurep 'native-compile)
                  (equal dump-mode "pdump"))
         ;; Don't enable this before bootstrap is completed, as the
         ;; compiler infrastructure may not be usable yet.
diff --git a/lisp/startup.el b/lisp/startup.el
index 3513ab7..6bab9e3 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -537,7 +537,7 @@ It is the default value of the variable `top-level'."
     (setq user-emacs-directory
          (startup--xdg-or-homedot startup--xdg-config-home-emacs nil))
 
-    (when (featurep 'nativecomp)
+    (when (featurep 'native-compile)
       ;; Form `comp-eln-load-path'.
       (let ((path-env (getenv "EMACSNATIVELOADPATH")))
         (when path-env
@@ -639,7 +639,7 @@ It is the default value of the variable `top-level'."
                (set pathsym (mapcar (lambda (dir)
                                       (decode-coding-string dir coding t))
                                     path)))))
-        (when (featurep 'nativecomp)
+        (when (featurep 'native-compile)
           (let ((npath (symbol-value 'comp-eln-load-path)))
             (set 'comp-eln-load-path
                  (mapcar (lambda (dir)
diff --git a/src/comp.c b/src/comp.c
index a4dba43..89667b2 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -5403,7 +5403,7 @@ For internal use.  */);
               doc: /* When non-nil assume the file being compiled to
 be preloaded.  */);
 
-  Fprovide (intern_c_string ("nativecomp"), Qnil);
+  Fprovide (intern_c_string ("native-compile"), Qnil);
 #endif /* #ifdef HAVE_NATIVE_COMP */
 
   defsubr (&Snative_comp_available_p);
diff --git a/test/lisp/help-fns-tests.el b/test/lisp/help-fns-tests.el
index 5b60939..513a0c2 100644
--- a/test/lisp/help-fns-tests.el
+++ b/test/lisp/help-fns-tests.el
@@ -62,7 +62,7 @@ Return first line of the output of (describe-function-1 
FUNC)."
     (should (string-match regexp result))))
 
 (ert-deftest help-fns-test-lisp-defun ()
-  (let ((regexp (if (featurep 'nativecomp)
+  (let ((regexp (if (featurep 'native-compile)
                     "a native compiled Lisp function in .+subr\\.el"
                   "a compiled Lisp function in .+subr\\.el"))
         (result (help-fns-tests--describe-function 'last)))
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el
index ba8b8b0..e3e4bdd 100644
--- a/test/src/comp-tests.el
+++ b/test/src/comp-tests.el
@@ -33,7 +33,7 @@
 
 (defconst comp-test-dyn-src (ert-resource-file "comp-test-funcs-dyn.el"))
 
-(when (featurep 'nativecomp)
+(when (featurep 'native-compile)
   (require 'comp)
   (message "Compiling tests...")
   (load (native-compile comp-test-src))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]