]> git.eshelyaron.com Git - emacs.git/commitdiff
Rename feature `nativecomp' into `native-compile'
authorAndrea Corallo <akrl@sdf.org>
Wed, 5 May 2021 15:18:07 +0000 (17:18 +0200)
committerAndrea Corallo <akrl@sdf.org>
Wed, 5 May 2021 20:27:29 +0000 (22:27 +0200)
* 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
lisp/emacs-lisp/comp.el
lisp/emacs-lisp/nadvice.el
lisp/emacs-lisp/package.el
lisp/help.el
lisp/loadup.el
lisp/startup.el
src/comp.c
test/lisp/help-fns-tests.el
test/src/comp-tests.el

index dc8636f8f763a00b9d6e634d735f12c3ecc4e34b..8e8d0e22651c731a545a66f51eabf7962f005977 100644 (file)
@@ -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))
index 297c1f7ebcae78529524521c23680db16bdbfbef..f700faa38b3c60197b472e799a5ce1ed19e2b8a6 100644 (file)
@@ -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"))))
index f9740565389b184dbc86d21fbf485a3d64792bb7..747572a3363b445ceb2d817afc6a02760dc6c6ef 100644 (file)
@@ -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
index 503585079e4885cc13b98f7a250053c5beb1d2b1..e13391775195e15988227063c9d5aa71e68ca40a 100644 (file)
@@ -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))))
index 6ba59ae852da51f2c80cff84a5a5e7908384ad41..e70041aea4bf61cf74a2bfdc99b04824714e150d 100644 (file)
@@ -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))
index c82d08133cff995f31f05d0bdd88434685e8fe5b..158c02eceaa6b6cdcd2d922a595d102c7dbbf838 100644 (file)
@@ -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.
index 3513ab7c4ecddec126729341cd645a337bad038c..6bab9e364c2595bf3164597340296aa9391fc866 100644 (file)
@@ -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)
index a4dba435b4a600315a7095c3da46a0f33e1724c8..89667b2febcb5a4eb6d631029d5fe7ec0f4c49db 100644 (file)
@@ -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);
index 5b60939f8a8bd87108b1460c185b7e16b09151e1..513a0c2daea6dd3c86e90d58b9ed4bf0c1253573 100644 (file)
@@ -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)))
index ba8b8b009366886319986a8b8e02a74bffbcf9fe..e3e4bdd9b61492300628387c9c5aa541ff1a3da5 100644 (file)
@@ -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))