comparison lisp/emacs-lisp/autoload.el @ 93710:07af23654bc8

(autoload-ensure-default-file): Provide a feature.
author Glenn Morris <rgm@gnu.org>
date Sat, 05 Apr 2008 18:51:12 +0000
parents 123ee50ab055
children ca9efc5939fc
comparison
equal deleted inserted replaced
93709:1471197c1a94 93710:07af23654bc8
238 (print form outbuf))))))) 238 (print form outbuf)))))))
239 239
240 (defun autoload-ensure-default-file (file) 240 (defun autoload-ensure-default-file (file)
241 "Make sure that the autoload file FILE exists and if not create it." 241 "Make sure that the autoload file FILE exists and if not create it."
242 (unless (file-exists-p file) 242 (unless (file-exists-p file)
243 (write-region 243 (let ((basename (file-name-nondirectory file)))
244 (concat ";;; " (file-name-nondirectory file) 244 (write-region
245 " --- automatically extracted autoloads\n" 245 (concat ";;; " basename
246 ";;\n" 246 " --- automatically extracted autoloads\n"
247 ";;; Code:\n\n" 247 ";;\n"
248 " \n;; Local Variables:\n" 248 ";;; Code:\n\n"
249 ";; version-control: never\n" 249 " \n"
250 ";; no-byte-compile: t\n" 250 "(provide '" (file-name-sans-extension basename) ")\n"
251 ";; no-update-autoloads: t\n" 251 ";; Local Variables:\n"
252 ";; End:\n" 252 ";; version-control: never\n"
253 ";;; " (file-name-nondirectory file) 253 ";; no-byte-compile: t\n"
254 " ends here\n") 254 ";; no-update-autoloads: t\n"
255 nil file)) 255 ";; End:\n"
256 ";;; " basename
257 " ends here\n")
258 nil file)))
256 file) 259 file)
257 260
258 (defun autoload-insert-section-header (outbuf autoloads load-name file time) 261 (defun autoload-insert-section-header (outbuf autoloads load-name file time)
259 "Insert the section-header line, 262 "Insert the section-header line,
260 which lists the file name and which functions are in it, etc." 263 which lists the file name and which functions are in it, etc."