aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2002-11-03 12:37:48 +0000
committerStefan Monnier2002-11-03 12:37:48 +0000
commita85e4d5887bc78a155f7bfdbe0feb978b87c19fd (patch)
treea65253d4bc1239d3a12abb69d84cf170bb5c9084
parent6af7040d52d88a971a092959599af87de9602ca6 (diff)
downloademacs-a85e4d5887bc78a155f7bfdbe0feb978b87c19fd.tar.gz
emacs-a85e4d5887bc78a155f7bfdbe0feb978b87c19fd.zip
(generate-file-autoloads, update-file-autoloads): Strip .gz extensions.
(update-autoloads-from-directories): Also consider compressed files.
-rw-r--r--lisp/emacs-lisp/autoload.el13
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."
360Return FILE if there was no autoload cookie in it." 360Return 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."
480Update loaddefs.el with all the current autoloads from DIRS, and no old ones. 480Update loaddefs.el with all the current autoloads from DIRS, and no old ones.
481This uses `update-file-autoloads' (which see) do its work." 481This 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.