diff options
| -rw-r--r-- | lisp/emacs-lisp/autoload.el | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 3b6e7d46bdb..0503d908fdd 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el | |||
| @@ -257,7 +257,7 @@ are used." | |||
| 257 | (let ((outbuf (current-buffer)) | 257 | (let ((outbuf (current-buffer)) |
| 258 | (autoloads-done '()) | 258 | (autoloads-done '()) |
| 259 | (load-name (let ((name (file-name-nondirectory file))) | 259 | (load-name (let ((name (file-name-nondirectory file))) |
| 260 | (if (string-match "\\.elc?$" name) | 260 | (if (string-match "\\.elc?\\(\\.\\|$\\)" name) |
| 261 | (substring name 0 (match-beginning 0)) | 261 | (substring name 0 (match-beginning 0)) |
| 262 | name))) | 262 | name))) |
| 263 | (print-length nil) | 263 | (print-length nil) |
| @@ -360,7 +360,7 @@ are used." | |||
| 360 | Return FILE if there was no autoload cookie in it." | 360 | Return FILE if there was no autoload cookie in it." |
| 361 | (interactive "fUpdate autoloads for file: ") | 361 | (interactive "fUpdate autoloads for file: ") |
| 362 | (let ((load-name (let ((name (file-name-nondirectory file))) | 362 | (let ((load-name (let ((name (file-name-nondirectory file))) |
| 363 | (if (string-match "\\.elc?$" name) | 363 | (if (string-match "\\.elc?\\(\\.\\|$\\)" name) |
| 364 | (substring name 0 (match-beginning 0)) | 364 | (substring name 0 (match-beginning 0)) |
| 365 | name))) | 365 | name))) |
| 366 | (found nil) | 366 | (found nil) |
| @@ -480,11 +480,14 @@ Autoload section for %s is up to date." | |||
| 480 | Update loaddefs.el with all the current autoloads from DIRS, and no old ones. | 480 | Update loaddefs.el with all the current autoloads from DIRS, and no old ones. |
| 481 | This uses `update-file-autoloads' (which see) do its work." | 481 | This uses `update-file-autoloads' (which see) do its work." |
| 482 | (interactive "DUpdate autoloads from directory: ") | 482 | (interactive "DUpdate autoloads from directory: ") |
| 483 | (let* ((files (apply 'nconc | 483 | (let* ((files-re (let ((tmp nil)) |
| 484 | (dolist (suf load-suffixes | ||
| 485 | (concat "^[^=.].*" (regexp-opt tmp t) "\\'")) | ||
| 486 | (unless (string-match "\\.elc" suf) (push suf tmp))))) | ||
| 487 | (files (apply 'nconc | ||
| 484 | (mapcar (lambda (dir) | 488 | (mapcar (lambda (dir) |
| 485 | (directory-files (expand-file-name dir) | 489 | (directory-files (expand-file-name dir) |
| 486 | ;; FIXME: add .gz etc... | 490 | t files-re)) |
| 487 | t "^[^=.].*\\.el\\'")) | ||
| 488 | dirs))) | 491 | dirs))) |
| 489 | (this-time (current-time)) | 492 | (this-time (current-time)) |
| 490 | (no-autoloads nil) ;files with no autoload cookies. | 493 | (no-autoloads nil) ;files with no autoload cookies. |