aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emacs-lisp/autoload.el
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2004-11-02 09:20:13 +0000
committerRichard M. Stallman <[email protected]>2004-11-02 09:20:13 +0000
commitf7ed02acc78d750509dd302014adec42ea8453d1 (patch)
treebcec7bbc23c8fb0040cdc7224e566b2b11bdfdd8 /lisp/emacs-lisp/autoload.el
parentae03e7cf52e245b66b8e04bd9601aa652c43cdf9 (diff)
(update-file-autoloads): Don't use interactive-p; take new arg SAVE-AFTER.
Diffstat (limited to 'lisp/emacs-lisp/autoload.el')
-rw-r--r--lisp/emacs-lisp/autoload.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index 5a5eb55a2a..196786e917 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -360,11 +360,14 @@ are used."
(message "Generating autoloads for %s...done" file)))
;;;###autoload
-(defun update-file-autoloads (file)
+(defun update-file-autoloads (file &optional save-after)
"Update the autoloads for FILE in `generated-autoload-file'
\(which FILE might bind in its local variables).
-Return FILE if there was no autoload cookie in it."
- (interactive "fUpdate autoloads for file: ")
+If SAVE-AFTER is non-nil (which is always, when called interactively),
+save the buffer too.
+
+Return FILE if there was no autoload cookie in it, else nil."
+ (interactive "fUpdate autoloads for file: \np")
(let ((load-name (let ((name (file-name-nondirectory file)))
(if (string-match "\\.elc?\\(\\.\\|$\\)" name)
(substring name 0 (match-beginning 0))
@@ -464,7 +467,7 @@ Autoload section for %s is up to date."
(or existing-buffer
(kill-buffer (current-buffer))))))))
(generate-file-autoloads file))))
- (and (interactive-p)
+ (and save-after
(buffer-modified-p)
(save-buffer))