aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2016-04-25 17:28:00 -0400
committerGlenn Morris2016-04-25 17:28:00 -0400
commit935715a5cd5f77bedb00fbc860375924846f9e3b (patch)
tree895fe3720426754bacd35e156fa0e92559845141
parent6ac9892fa1ee808092f8f5b968c31f3a021e9fc8 (diff)
downloademacs-935715a5cd5f77bedb00fbc860375924846f9e3b.tar.gz
emacs-935715a5cd5f77bedb00fbc860375924846f9e3b.zip
* lisp/emacs-lisp/autoload.el (update-directory-autoloads):
Future-proof against non-time-values. ; Do not merge to master.
-rw-r--r--lisp/emacs-lisp/autoload.el20
1 files changed, 11 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index e688d6be725..eb6b746bd80 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -800,13 +800,14 @@ write its autoloads into the specified file instead."
800 ;; Remove the obsolete section. 800 ;; Remove the obsolete section.
801 (autoload-remove-section (match-beginning 0)) 801 (autoload-remove-section (match-beginning 0))
802 (setq last-time (nth 4 form)) 802 (setq last-time (nth 4 form))
803 (dolist (file file) 803 (when (listp last-time)
804 (let ((file-time (nth 5 (file-attributes file)))) 804 (dolist (file file)
805 (when (and file-time 805 (let ((file-time (nth 5 (file-attributes file))))
806 (not (time-less-p last-time file-time))) 806 (when (and file-time
807 ;; file unchanged 807 (not (time-less-p last-time file-time)))
808 (push file no-autoloads) 808 ;; file unchanged
809 (setq files (delete file files)))))) 809 (push file no-autoloads)
810 (setq files (delete file files)))))))
810 ((not (stringp file))) 811 ((not (stringp file)))
811 ((or (not (file-exists-p file)) 812 ((or (not (file-exists-p file))
812 ;; Remove duplicates as well, just in case. 813 ;; Remove duplicates as well, just in case.
@@ -815,8 +816,9 @@ write its autoloads into the specified file instead."
815 (member (expand-file-name file) autoload-excludes)) 816 (member (expand-file-name file) autoload-excludes))
816 ;; Remove the obsolete section. 817 ;; Remove the obsolete section.
817 (autoload-remove-section (match-beginning 0))) 818 (autoload-remove-section (match-beginning 0)))
818 ((not (time-less-p (nth 4 form) 819 ((and (listp (nth 4 form))
819 (nth 5 (file-attributes file)))) 820 (not (time-less-p (nth 4 form)
821 (nth 5 (file-attributes file)))))
820 ;; File hasn't changed. 822 ;; File hasn't changed.
821 nil) 823 nil)
822 (t 824 (t