[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/faster-loaddefs 086fc40e35: Allow file-local inhibits of prefixe
From: |
Lars Ingebrigtsen |
Subject: |
scratch/faster-loaddefs 086fc40e35: Allow file-local inhibits of prefixes |
Date: |
Sun, 29 May 2022 10:13:51 -0400 (EDT) |
branch: scratch/faster-loaddefs
commit 086fc40e356f5baab6a81dadba2291e831a53c98
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Allow file-local inhibits of prefixes
---
lisp/emacs-lisp/autoload.el | 2 +-
lisp/emacs-lisp/loaddefs-gen.el | 10 ++++++----
lisp/generic-x.el | 4 ++++
3 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index 1e4b2c14a0..abd55338b6 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -527,7 +527,7 @@ Return non-nil in the case where no autoloads were added at
point."
Standard prefixes won't be registered anyway. I.e. if a file \"foo.el\"
defines
variables or functions that use \"foo-\" as prefix, that will not be
registered.
But all other prefixes will be included.")
-(put 'autoload-compute-prefixes 'safe #'booleanp)
+(put 'autoload-compute-prefixes 'safe-local-variable #'booleanp)
(defconst autoload-def-prefixes-max-entries 5
"Target length of the list of definition prefixes per file.
diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el
index bbf5b8c431..a8715171ab 100644
--- a/lisp/emacs-lisp/loaddefs-gen.el
+++ b/lisp/emacs-lisp/loaddefs-gen.el
@@ -54,8 +54,7 @@ by ;;;###foo-autoload statements.
If PACKAGE-ONLY, only return the package info."
(let ((defs nil)
(load-name (autoload-file-load-name file main-outfile))
- ;; FIXME: Probably remove.
- (inhibit-prefs nil)
+ (compute-prefixes t)
local-outfile package-defs
inhibit-autoloads)
(with-temp-buffer
@@ -74,7 +73,9 @@ If PACKAGE-ONLY, only return the package info."
(when (re-search-forward "generated-autoload-load-name: *" nil t)
(setq load-name (read (current-buffer)))))
(when (re-search-forward "no-update-autoloads: *" nil t)
- (setq inhibit-autoloads (read (current-buffer)))))
+ (setq inhibit-autoloads (read (current-buffer))))
+ (when (re-search-forward "autoload-compute-prefixes: *" nil t)
+ (setq compute-prefixes (read (current-buffer)))))
;; We always return the package version (even for pre-dumped
;; files).
@@ -133,7 +134,8 @@ If PACKAGE-ONLY, only return the package info."
(buffer-substring (point) (line-end-position)))
defs))))
- (when (and autoload-compute-prefixes (not inhibit-prefs))
+ (when (and autoload-compute-prefixes
+ compute-prefixes)
(when-let ((form (loaddefs-gen--compute-prefixes load-name)))
;; This output needs to always go in the main loaddefs.el,
;; regardless of `generated-autoload-file'.
diff --git a/lisp/generic-x.el b/lisp/generic-x.el
index ecfa8aab84..2c9d1b316e 100644
--- a/lisp/generic-x.el
+++ b/lisp/generic-x.el
@@ -1847,4 +1847,8 @@ like an INI file. You can add this hook to
`find-file-hook'."
(provide 'generic-x)
+;; Local Variables:
+;; autoload-compute-prefixes: nil
+;; End:
+
;;; generic-x.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- scratch/faster-loaddefs 086fc40e35: Allow file-local inhibits of prefixes,
Lars Ingebrigtsen <=