summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-07-31 19:57:55 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-07-31 19:57:55 +0200
commit6ef058cec2331e5135ce8e4c73983dec695afa15 (patch)
tree3c2a4a3fa80ad77eebafc683b2c7cdde8af48c6a /lisp/emacs-lisp
parentf5cd6b730dd04390fcbcfe45f7462026f16ae78e (diff)
downloademacs-6ef058cec2331e5135ce8e4c73983dec695afa15.tar.gz
emacs-6ef058cec2331e5135ce8e4c73983dec695afa15.tar.bz2
emacs-6ef058cec2331e5135ce8e4c73983dec695afa15.zip
Allow specifying that loaddefs files shouldn't not be compiled
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--rubric): Allow specifying that we shouldn't include a no-compile cookie (bug#53024).
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/loaddefs-gen.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el
index 261e44aeced..36b0b1e9cdf 100644
--- a/lisp/emacs-lisp/loaddefs-gen.el
+++ b/lisp/emacs-lisp/loaddefs-gen.el
@@ -459,7 +459,7 @@ don't include."
(push name prefs)))))
(loaddefs-generate--make-prefixes prefs load-name)))
-(defun loaddefs-generate--rubric (file &optional type feature)
+(defun loaddefs-generate--rubric (file &optional type feature compile)
"Return a string giving the appropriate autoload rubric for FILE.
TYPE (default \"autoloads\") is a string stating the type of
information contained in FILE. TYPE \"package\" acts like the default,
@@ -467,7 +467,9 @@ but adds an extra line to the output to modify `load-path'.
If FEATURE is non-nil, FILE will provide a feature. FEATURE may
be a string naming the feature, otherwise it will be based on
-FILE's name."
+FILE's name.
+
+If COMPILE, don't include a \"don't compile\" cookie."
(let ((lp (and (equal type "package") (setq type "autoloads"))))
(with-temp-buffer
(generate-lisp-file-heading
@@ -481,6 +483,7 @@ FILE's name."
(insert " \n;;; End of scraped data\n\n")
(generate-lisp-file-trailer
file :provide (and (stringp feature) feature)
+ :compile compile
:inhibit-provide (not feature))
(buffer-string))))