* lisp/emacs-lisp/autoload.el (update-directory-autoloads):
Future-proof against non-time-values. ; Do not merge to master.
This commit is contained in:
parent
6ac9892fa1
commit
935715a5cd
1 changed files with 11 additions and 9 deletions
|
@ -800,13 +800,14 @@ write its autoloads into the specified file instead."
|
||||||
;; Remove the obsolete section.
|
;; Remove the obsolete section.
|
||||||
(autoload-remove-section (match-beginning 0))
|
(autoload-remove-section (match-beginning 0))
|
||||||
(setq last-time (nth 4 form))
|
(setq last-time (nth 4 form))
|
||||||
(dolist (file file)
|
(when (listp last-time)
|
||||||
(let ((file-time (nth 5 (file-attributes file))))
|
(dolist (file file)
|
||||||
(when (and file-time
|
(let ((file-time (nth 5 (file-attributes file))))
|
||||||
(not (time-less-p last-time file-time)))
|
(when (and file-time
|
||||||
;; file unchanged
|
(not (time-less-p last-time file-time)))
|
||||||
(push file no-autoloads)
|
;; file unchanged
|
||||||
(setq files (delete file files))))))
|
(push file no-autoloads)
|
||||||
|
(setq files (delete file files)))))))
|
||||||
((not (stringp file)))
|
((not (stringp file)))
|
||||||
((or (not (file-exists-p file))
|
((or (not (file-exists-p file))
|
||||||
;; Remove duplicates as well, just in case.
|
;; Remove duplicates as well, just in case.
|
||||||
|
@ -815,8 +816,9 @@ write its autoloads into the specified file instead."
|
||||||
(member (expand-file-name file) autoload-excludes))
|
(member (expand-file-name file) autoload-excludes))
|
||||||
;; Remove the obsolete section.
|
;; Remove the obsolete section.
|
||||||
(autoload-remove-section (match-beginning 0)))
|
(autoload-remove-section (match-beginning 0)))
|
||||||
((not (time-less-p (nth 4 form)
|
((and (listp (nth 4 form))
|
||||||
(nth 5 (file-attributes file))))
|
(not (time-less-p (nth 4 form)
|
||||||
|
(nth 5 (file-attributes file)))))
|
||||||
;; File hasn't changed.
|
;; File hasn't changed.
|
||||||
nil)
|
nil)
|
||||||
(t
|
(t
|
||||||
|
|
Loading…
Add table
Reference in a new issue