From 3406e4064f09fb60c34317143209485bed18e366 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 5 Jun 2022 20:17:30 +0200 Subject: [PATCH] Make finder/cus-dep scraping use generate-lisp-file functions * lisp/finder.el (finder-compile-keywords): * lisp/cus-dep.el (custom-make-dependencies): Use generate-lisp-file functions directly instead of piggy-backing on the autoload.el functions. (This is part of making autoload.el obsolete.) --- lisp/cus-dep.el | 7 ++++--- lisp/finder.el | 9 ++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lisp/cus-dep.el b/lisp/cus-dep.el index 87dcbbb004f..47d2cac3be1 100644 --- a/lisp/cus-dep.el +++ b/lisp/cus-dep.el @@ -156,9 +156,9 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS" (set-buffer (find-file-noselect generated-custom-dependencies-file)) (setq buffer-undo-list t) (erase-buffer) - (insert (autoload-rubric generated-custom-dependencies-file - "custom dependencies" t)) - (search-backward " ") + (generate-lisp-file-heading + generated-custom-dependencies-file 'custom-make-dependencies + :title "custom dependencies") (let (alist) (mapatoms (lambda (symbol) (let ((members (get symbol 'custom-group)) @@ -241,6 +241,7 @@ This is an alist whose members have as car a version string, and as elements the files that have variables or faces that contain that version. These files should be loaded before showing the customization buffer that `customize-changed' generates.\")\n\n")) + (generate-lisp-file-trailer generated-custom-dependencies-file) (save-buffer) (byte-compile-info (format "Generating %s...done" generated-custom-dependencies-file) t)) diff --git a/lisp/finder.el b/lisp/finder.el index a2a27ea061d..73072c0cd48 100644 --- a/lisp/finder.el +++ b/lisp/finder.el @@ -127,8 +127,6 @@ Keywords and package names both should be symbols.") cus-load\\|finder-inf\\|esh-groups\\|subdirs\\|leim-list\\)\\.el$\\)" "Regexp matching file names not to scan for keywords.") -(autoload 'autoload-rubric "autoload") - (defconst finder--builtins-descriptions ;; I have no idea whether these are supposed to be capitalized ;; and/or end in a full-stop. Existing file headers are inconsistent, @@ -264,9 +262,9 @@ from; the default is `load-path'." (find-file-noselect generated-finder-keywords-file) (setq buffer-undo-list t) (erase-buffer) - (insert (autoload-rubric generated-finder-keywords-file - "keyword-to-package mapping" t)) - (search-backward " ") + (generate-lisp-file-heading + generated-finder-keywords-file 'finder-compile-keywords + :title "keyword-to-package mapping") ;; FIXME: Now that we have package--builtin-versions, package--builtins is ;; only needed to get the list of unversioned packages and to get the ;; summary description of each package. @@ -280,6 +278,7 @@ from; the default is `load-path'." (insert "(setq finder-keywords-hash\n ") (prin1 finder-keywords-hash (current-buffer)) (insert ")\n") + (generate-lisp-file-trailer generated-finder-keywords-file) (basic-save-buffer))) (defun finder-compile-keywords-make-dist () -- 2.39.2