From a98f63d48d277ebab72cb38090a48e2799531449 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 5 Jun 2008 02:37:06 +0000 Subject: [PATCH] (autoload-rubric): New function, extracted from autoload-ensure-default-file. (autoload-ensure-default-file): Use autoload-rubric. --- lisp/ChangeLog | 36 ++++++++++++++++++++++++++++++++++++ lisp/emacs-lisp/autoload.el | 36 ++++++++++++++++++++---------------- 2 files changed, 56 insertions(+), 16 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 05f0001c82b..3ecb91a3bb6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,39 @@ +2008-06-05 Glenn Morris + + * emacs-lisp/autoload.el (autoload-rubric): New function, + extracted from autoload-ensure-default-file. + (autoload-ensure-default-file): Use autoload-rubric. + + * cus-dep.el (generated-custom-dependencies-file): Doc fix. + (custom-dependencies-no-scan-regexp): New variable. + (custom-make-dependencies): Use with-temp-buffer and autoload-rubric. + Don't scan files matching custom-dependencies-no-scan-regexp. + Disable undo in the output buffer. Remove kept-new-versions wackiness. + + * finder.el (finder-headmark): Initialize and add doc string. + (generated-finder-keywords-file): Doc fix. + (finder-no-scan-regexp): New variable. + (finder-compile-keywords): Use a single let binding. + Disable undo in the output buffer. Use autoload-rubric. + Use mapc rather than mapcar. Don't scan files matching + finder-no-scan-regexp. Use with-temp-buffer. Use expand-file-name + rather than concat. Use directory-files to do regexp matching. + No need to require jka-compr. + (finder-list-keywords): Remove un-needed set-buffer. Disable undo. + (finder-list-matches): Disable undo. + (finder-commentary): Use let rather than let*. Disable undo. + (finder-current-item): Use zerop. + (finder-mode): Use define-derived-mode. + (finder-exit): Doc fix. Use dolist. + + * Makefile.in ($(lisp)/cus-load.el): Remove unnecessary rule. + (custom-deps): Don't require $(lisp)/cus-load.el. + (custom-deps, finder-data): Don't depend on autoloads. + Should not be needed now, and doing so was causing make install to + re-dump emacs post-bootstrap. + (bootstrap-after): Don't run update-elclist, since modifying Makefile.in + mid-build forces some things to be rebuilt. + 2008-06-05 Miles Bader * face-remap.el (variable-pitch-mode): Autoload. diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index bbe7904c6e6..343a2ce8edf 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -235,25 +235,29 @@ put the output in." (print-escape-nonascii t)) (print form outbuf))))))) +(defun autoload-rubric (file &optional type) + "Return a string giving the appropriate autoload rubric for FILE. +TYPE (default \"autoloads\") is a string stating the type of +information contained in FILE." + (let ((basename (file-name-nondirectory file))) + (concat ";;; " basename + " --- automatically extracted " (or type "autoloads") "\n" + ";;\n" + ";;; Code:\n\n" + " \n" + "(provide '" (file-name-sans-extension basename) ")\n" + ";; Local Variables:\n" + ";; version-control: never\n" + ";; no-byte-compile: t\n" + ";; no-update-autoloads: t\n" + ";; End:\n" + ";;; " basename + " ends here\n"))) + (defun autoload-ensure-default-file (file) "Make sure that the autoload file FILE exists and if not create it." (unless (file-exists-p file) - (let ((basename (file-name-nondirectory file))) - (write-region - (concat ";;; " basename - " --- automatically extracted autoloads\n" - ";;\n" - ";;; Code:\n\n" - " \n" - "(provide '" (file-name-sans-extension basename) ")\n" - ";; Local Variables:\n" - ";; version-control: never\n" - ";; no-byte-compile: t\n" - ";; no-update-autoloads: t\n" - ";; End:\n" - ";;; " basename - " ends here\n") - nil file))) + (write-region (autoload-rubric file) nil file)) file) (defun autoload-insert-section-header (outbuf autoloads load-name file time) -- 2.39.2