[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/faster-loaddefs c8ceaee4d5 2/7: Replicate CEDET quirks
From: |
Lars Ingebrigtsen |
Subject: |
scratch/faster-loaddefs c8ceaee4d5 2/7: Replicate CEDET quirks |
Date: |
Sat, 28 May 2022 12:31:22 -0400 (EDT) |
branch: scratch/faster-loaddefs
commit c8ceaee4d50c136d1719428d4ef451f0327d6ea1
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Replicate CEDET quirks
---
lisp/emacs-lisp/loaddefs-gen.el | 28 ++++++++++++++++++++--------
1 file changed, 20 insertions(+), 8 deletions(-)
diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el
index 401f66aed4..97ac276a18 100644
--- a/lisp/emacs-lisp/loaddefs-gen.el
+++ b/lisp/emacs-lisp/loaddefs-gen.el
@@ -36,6 +36,10 @@
;; This makes the autoload go to foo-loaddefs.el in the current directory.
;; Normal ;;;###autoload specs go to the main loaddefs file.
+;; This file currently contains a bunch of things marked FIXME that
+;; are only present to create identical output from the older files.
+;; These should be removed.
+
;;; Code:
(require 'autoload)
@@ -117,8 +121,8 @@ by ;;;###foo-autoload statements."
(while forms
(let ((elem (pop forms)))
(if (eq (car elem) 'progn)
- ;; More recursion; push it to the end.
- (setq forms (nconc forms (cdr elem)))
+ ;; More recursion; add it to the start.
+ (setq forms (nconc (cdr elem) forms))
;; We have something to add to the defs; do it.
(push (list to-file file
(loaddefs-gen--prettify-autoload elem))
@@ -145,11 +149,18 @@ by ;;;###foo-autoload statements."
(push name prefs)))))
;; This output needs to always go in the main loaddefs.el,
;; regardless of `generated-autoload-file'.
- (let ((form (autoload--make-defs-autoload prefs load-name)))
- (cond
- ((null form)) ;All defs obey the default rule, yay!
- (t
- (push (list main-outfile file form) defs)))))))
+ (when-let ((form (autoload--make-defs-autoload prefs load-name)))
+ ;; FIXME: For legacy reasons, the CEDET specs go elsewhere.
+ (cond ((and (string-match "/cedet/" file) local-outfile)
+ (push (list local-outfile file form) defs))
+ ((string-match "/cedet/\\(semantic\\|srecode\\|ede\\)/"
+ file)
+ (push (list (concat (substring file 0 (match-end 0))
+ "loaddefs.el")
+ file form)
+ defs))
+ (t
+ (push (list main-outfile file form) defs)))))))
(if package-defs
(nconc defs (list (list (or local-outfile main-outfile) file
@@ -287,7 +298,8 @@ directory or directories specified."
(setq command-line-args-left nil)
(let ((autoload-builtin-package-versions t))
(loaddefs-gen--generate
- args "loaddefs.el" (loaddefs-gen--excluded-files)))))
+ args (expand-file-name "loaddefs.el" lisp-directory)
+ (loaddefs-gen--excluded-files)))))
(provide 'loaddefs-gen)
- branch scratch/faster-loaddefs created (now e5f141a2a1), Lars Ingebrigtsen, 2022/05/28
- scratch/faster-loaddefs 046ccbe701 1/7: Initial version, Lars Ingebrigtsen, 2022/05/28
- scratch/faster-loaddefs 83c0bc6097 4/7: Also include package data from files that are preloaded, Lars Ingebrigtsen, 2022/05/28
- scratch/faster-loaddefs e624103187 3/7: Replicate old loaddefs.el format even more closely, Lars Ingebrigtsen, 2022/05/28
- scratch/faster-loaddefs e5f141a2a1 7/7: Re-fix doc string output, Lars Ingebrigtsen, 2022/05/28
- scratch/faster-loaddefs c8ceaee4d5 2/7: Replicate CEDET quirks,
Lars Ingebrigtsen <=
- scratch/faster-loaddefs 62138656da 5/7: Make output even more similar, Lars Ingebrigtsen, 2022/05/28
- scratch/faster-loaddefs f8500742a4 6/7: Fix autoload (progn ...), Lars Ingebrigtsen, 2022/05/28