360 |
(message "Generating autoloads for %s...done" file))) |
(message "Generating autoloads for %s...done" file))) |
361 |
|
|
362 |
;;;###autoload |
;;;###autoload |
363 |
(defun update-file-autoloads (file) |
(defun update-file-autoloads (file &optional save-after) |
364 |
"Update the autoloads for FILE in `generated-autoload-file' |
"Update the autoloads for FILE in `generated-autoload-file' |
365 |
\(which FILE might bind in its local variables). |
\(which FILE might bind in its local variables). |
366 |
Return FILE if there was no autoload cookie in it." |
If SAVE-AFTER is non-nil (which is always, when called interactively), |
367 |
(interactive "fUpdate autoloads for file: ") |
save the buffer too. |
368 |
|
|
369 |
|
Return FILE if there was no autoload cookie in it, else nil." |
370 |
|
(interactive "fUpdate autoloads for file: \np") |
371 |
(let ((load-name (let ((name (file-name-nondirectory file))) |
(let ((load-name (let ((name (file-name-nondirectory file))) |
372 |
(if (string-match "\\.elc?\\(\\.\\|$\\)" name) |
(if (string-match "\\.elc?\\(\\.\\|$\\)" name) |
373 |
(substring name 0 (match-beginning 0)) |
(substring name 0 (match-beginning 0)) |
467 |
(or existing-buffer |
(or existing-buffer |
468 |
(kill-buffer (current-buffer)))))))) |
(kill-buffer (current-buffer)))))))) |
469 |
(generate-file-autoloads file)))) |
(generate-file-autoloads file)))) |
470 |
(and (interactive-p) |
(and save-after |
471 |
(buffer-modified-p) |
(buffer-modified-p) |
472 |
(save-buffer)) |
(save-buffer)) |
473 |
|
|