[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 6c11214dc1: Inhibit nativecomp of loaddefs files
From: |
Lars Ingebrigtsen |
Subject: |
master 6c11214dc1: Inhibit nativecomp of loaddefs files |
Date: |
Sat, 3 Sep 2022 08:23:50 -0400 (EDT) |
branch: master
commit 6c11214dc1124bcb459088e89334e16e46127e16
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Inhibit nativecomp of loaddefs files
* lisp/emacs-lisp/generate-lisp-file.el
(generate-lisp-file-trailer): Allow inhibiting nativecomp.
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--rubric):
Inhibit native-comp, because it's not very useful for loaddefs files.
---
lisp/emacs-lisp/generate-lisp-file.el | 14 ++++++++++----
lisp/emacs-lisp/loaddefs-gen.el | 1 +
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/lisp/emacs-lisp/generate-lisp-file.el
b/lisp/emacs-lisp/generate-lisp-file.el
index 8896a3f701..7b087a4ecb 100644
--- a/lisp/emacs-lisp/generate-lisp-file.el
+++ b/lisp/emacs-lisp/generate-lisp-file.el
@@ -63,12 +63,12 @@ inserted."
(cl-defun generate-lisp-file-trailer (file &key version inhibit-provide
(coding 'utf-8-emacs-unix) autoloads
- compile provide)
+ compile provide inhibit-native-compile)
"Insert a standard trailer for FILE.
By default, this trailer inhibits version control, byte
compilation, updating autoloads, and uses a `utf-8-emacs-unix'
coding system. These can be inhibited by providing non-nil
-values to the VERSION, NO-PROVIDE, AUTOLOADS and COMPILE
+values to the VERSION, AUTOLOADS, COMPILE and NATIVE-COMPILE
keyword arguments.
CODING defaults to `utf-8-emacs-unix'. Use a nil value to
@@ -79,7 +79,11 @@ If PROVIDE is non-nil, use that in the `provide' statement
instead of using FILE as the basis.
If `standard-output' is bound to a buffer, insert in that buffer.
-If no, insert at point in the current buffer."
+If no, insert at point in the current buffer.
+
+If INHITBIT-NATIVE-COMPILE is non-nil, add a cookie to inhibit
+native compilation. (By default, a file will be native-compiled
+if it's also byte-compiled)."
(with-current-buffer (if (bufferp standard-output)
standard-output
(current-buffer))
@@ -96,9 +100,11 @@ If no, insert at point in the current buffer."
(unless version
(insert ";; version-control: never\n"))
(unless compile
- (insert ";; no-byte-" "compile: t\n")) ;; #$ is byte-compiled into nil.
+ (insert ";; no-byte-" "compile: t\n"))
(unless autoloads
(insert ";; no-update-autoloads: t\n"))
+ (when inhibit-native-compile
+ (insert ";; no-native-" "compile: t\n"))
(when coding
(insert (format ";; coding: %s\n"
(if (eq coding t)
diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el
index e13b92bab8..005a46c2d7 100644
--- a/lisp/emacs-lisp/loaddefs-gen.el
+++ b/lisp/emacs-lisp/loaddefs-gen.el
@@ -504,6 +504,7 @@ If COMPILE, don't include a \"don't compile\" cookie."
(generate-lisp-file-trailer
file :provide (and (stringp feature) feature)
:compile compile
+ :inhibit-native-compile t
:inhibit-provide (not feature))
(buffer-string))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 6c11214dc1: Inhibit nativecomp of loaddefs files,
Lars Ingebrigtsen <=