diff options
author | Glenn Morris <rgm@gnu.org> | 2008-04-05 18:51:12 +0000 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2008-04-05 18:51:12 +0000 |
commit | 5ec993427a38630a5a23a4b09345a6a5009cf037 (patch) | |
tree | 741ff9b496287946efb956a7e39c60980fd64883 /lisp/emacs-lisp | |
parent | ce28a62838e239d9b1aeab4acd6abcca7f1ebe9e (diff) | |
download | emacs-5ec993427a38630a5a23a4b09345a6a5009cf037.tar.gz emacs-5ec993427a38630a5a23a4b09345a6a5009cf037.tar.bz2 emacs-5ec993427a38630a5a23a4b09345a6a5009cf037.zip |
(autoload-ensure-default-file): Provide a feature.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/autoload.el | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index dadb6aa0ea8..e6bca3b15dd 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -240,19 +240,22 @@ put the output in." (defun autoload-ensure-default-file (file) "Make sure that the autoload file FILE exists and if not create it." (unless (file-exists-p file) - (write-region - (concat ";;; " (file-name-nondirectory file) - " --- automatically extracted autoloads\n" - ";;\n" - ";;; Code:\n\n" - "\n;; Local Variables:\n" - ";; version-control: never\n" - ";; no-byte-compile: t\n" - ";; no-update-autoloads: t\n" - ";; End:\n" - ";;; " (file-name-nondirectory file) - " ends here\n") - nil 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))) file) (defun autoload-insert-section-header (outbuf autoloads load-name file time) |