comparison lisp/emacs-lisp/autoload.el @ 55208:12f4731fd3aa

(autoload-before-p): Remove. (update-file-autoloads, update-directory-autoloads): Use `time-less-p'.
author Juanma Barranquero <lekktu@gmail.com>
date Tue, 27 Apr 2004 22:45:59 +0000
parents 695cf19ef79e
children fd1be95301bf 4c90ffeb71c5
comparison
equal deleted inserted replaced
55207:a3244da8e396 55208:12f4731fd3aa
1 ;; autoload.el --- maintain autoloads in loaddefs.el 1 ;; autoload.el --- maintain autoloads in loaddefs.el
2 2
3 ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2001, 2003 3 ;; Copyright (C) 1991,92,93,94,95,96,97, 2001,02,03,04
4 ;; Free Software Foundation, Inc. 4 ;; Free Software Foundation, Inc.
5 5
6 ;; Author: Roland McGrath <roland@gnu.org> 6 ;; Author: Roland McGrath <roland@gnu.org>
7 ;; Keywords: maint 7 ;; Keywords: maint
8 8
405 (last-time (nth 4 form)) 405 (last-time (nth 4 form))
406 (file-time (nth 5 (file-attributes file)))) 406 (file-time (nth 5 (file-attributes file))))
407 (if (and (or (null existing-buffer) 407 (if (and (or (null existing-buffer)
408 (not (buffer-modified-p existing-buffer))) 408 (not (buffer-modified-p existing-buffer)))
409 (listp last-time) (= (length last-time) 2) 409 (listp last-time) (= (length last-time) 2)
410 (not (autoload-before-p last-time file-time))) 410 (not (time-less-p last-time file-time)))
411 (progn 411 (progn
412 (if (interactive-p) 412 (if (interactive-p)
413 (message "\ 413 (message "\
414 Autoload section for %s is up to date." 414 Autoload section for %s is up to date."
415 file)) 415 file))
466 (buffer-modified-p) 466 (buffer-modified-p)
467 (save-buffer)) 467 (save-buffer))
468 468
469 (if no-autoloads file)))) 469 (if no-autoloads file))))
470 470
471 (defun autoload-before-p (time1 time2)
472 (or (< (car time1) (car time2))
473 (and (= (car time1) (car time2))
474 (< (nth 1 time1) (nth 1 time2)))))
475
476 (defun autoload-remove-section (begin) 471 (defun autoload-remove-section (begin)
477 (goto-char begin) 472 (goto-char begin)
478 (search-forward generate-autoload-section-trailer) 473 (search-forward generate-autoload-section-trailer)
479 (delete-region begin (point))) 474 (delete-region begin (point)))
480 475
525 (autoload-remove-section (match-beginning 0)) 520 (autoload-remove-section (match-beginning 0))
526 (let ((last-time (nth 4 form))) 521 (let ((last-time (nth 4 form)))
527 (dolist (file file) 522 (dolist (file file)
528 (let ((file-time (nth 5 (file-attributes file)))) 523 (let ((file-time (nth 5 (file-attributes file))))
529 (when (and file-time 524 (when (and file-time
530 (not (autoload-before-p last-time 525 (not (time-less-p last-time file-time)))
531 file-time)))
532 ;; file unchanged 526 ;; file unchanged
533 (push file no-autoloads) 527 (push file no-autoloads)
534 (setq files (delete file files))))))) 528 (setq files (delete file files)))))))
535 ((not (stringp file))) 529 ((not (stringp file)))
536 ((not (file-exists-p (expand-file-name file top-dir))) 530 ((not (file-exists-p (expand-file-name file top-dir)))