Mercurial > emacs
comparison lisp/emacs-lisp/autoload.el @ 2535:86d5500624d5
(update-file-autoloads, update-directory-autoloads): If called
interactively, save generated-autoload-file when done.
author | Roland McGrath <roland@gnu.org> |
---|---|
date | Wed, 14 Apr 1993 19:56:19 +0000 (1993-04-14) |
parents | c0fbbfadcb04 |
children | 3b0cb275ca29 |
comparison
equal
deleted
inserted
replaced
2534:0099d6be2b11 | 2535:86d5500624d5 |
---|---|
206 (terpri outbuf) | 206 (terpri outbuf) |
207 (insert ";;; Generated autoloads from " file "\n") | 207 (insert ";;; Generated autoloads from " file "\n") |
208 (goto-char output-end) | 208 (goto-char output-end) |
209 (insert generate-autoload-section-trailer))) | 209 (insert generate-autoload-section-trailer))) |
210 (message "Generating autoloads for %s...done" file))) | 210 (message "Generating autoloads for %s...done" file))) |
211 | 211 |
212 (defconst generated-autoload-file "loaddefs.el" | 212 (defconst generated-autoload-file "loaddefs.el" |
213 "*File \\[update-file-autoloads] puts autoloads into. | 213 "*File \\[update-file-autoloads] puts autoloads into. |
214 A .el file can set this in its local variables section to make its | 214 A .el file can set this in its local variables section to make its |
215 autoloads go somewhere else.") | 215 autoloads go somewhere else.") |
216 | 216 |
268 Then do \\[exit-recursive-edit]." | 268 Then do \\[exit-recursive-edit]." |
269 file)))) | 269 file)))) |
270 (recursive-edit) | 270 (recursive-edit) |
271 (beginning-of-line)) | 271 (beginning-of-line)) |
272 (generate-file-autoloads file))) | 272 (generate-file-autoloads file))) |
273 (if (interactive-p) (save-buffer)) | |
273 (if (and (null existing-buffer) | 274 (if (and (null existing-buffer) |
274 (setq existing-buffer (get-file-buffer file))) | 275 (setq existing-buffer (get-file-buffer file))) |
275 (kill-buffer existing-buffer))))) | 276 (kill-buffer existing-buffer))))) |
276 | 277 |
277 ;;;###autoload | 278 ;;;###autoload |
310 ;;;###autoload | 311 ;;;###autoload |
311 (defun update-directory-autoloads (dir) | 312 (defun update-directory-autoloads (dir) |
312 "Run \\[update-file-autoloads] on each .el file in DIR." | 313 "Run \\[update-file-autoloads] on each .el file in DIR." |
313 (interactive "DUpdate autoloads for directory: ") | 314 (interactive "DUpdate autoloads for directory: ") |
314 (mapcar 'update-file-autoloads | 315 (mapcar 'update-file-autoloads |
315 (directory-files dir nil "\\.el$"))) | 316 (directory-files dir nil "\\.el$")) |
317 (if (interactive-p) | |
318 (save-excursion | |
319 (set-buffer (find-file-noselect generated-autoload-file)) | |
320 (save-buffer)))) | |
316 | 321 |
317 ;;;###autoload | 322 ;;;###autoload |
318 (defun batch-update-autoloads () | 323 (defun batch-update-autoloads () |
319 "Update the autoloads for the files or directories on the command line. | 324 "Update the autoloads for the files or directories on the command line. |
320 Runs \\[update-file-autoloads] on files and \\[update-directory-autoloads] | 325 Runs \\[update-file-autoloads] on files and \\[update-directory-autoloads] |