# HG changeset patch # User Glenn Morris # Date 1207421472 0 # Node ID 07af23654bc8a579cc0546c46e354438c4db5a37 # Parent 1471197c1a949204063e53551c7e62a55e0ae647 (autoload-ensure-default-file): Provide a feature. diff -r 1471197c1a94 -r 07af23654bc8 lisp/emacs-lisp/autoload.el --- a/lisp/emacs-lisp/autoload.el Sat Apr 05 18:47:34 2008 +0000 +++ b/lisp/emacs-lisp/autoload.el Sat Apr 05 18:51:12 2008 +0000 @@ -240,19 +240,22 @@ (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)