comparison lisp/emacs-lisp/autoload.el @ 90982:a66921565bcb

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 806-813) - Merge from emacs--rel--22 - Update from CVS * emacs--rel--22 (patch 51-58) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 233-236) - Merge from emacs--devo--0 - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-230
author Miles Bader <miles@gnu.org>
date Sun, 15 Jul 2007 04:47:46 +0000
parents 988f1edc9674 3bb49962b482
children f55f9811f5d7
comparison
equal deleted inserted replaced
90981:a37d5bf6cbb7 90982:a66921565bcb
39 (defvar generated-autoload-file "loaddefs.el" 39 (defvar generated-autoload-file "loaddefs.el"
40 "*File \\[update-file-autoloads] puts autoloads into. 40 "*File \\[update-file-autoloads] puts autoloads into.
41 A `.el' file can set this in its local variables section to make its 41 A `.el' file can set this in its local variables section to make its
42 autoloads go somewhere else. The autoload file is assumed to contain a 42 autoloads go somewhere else. The autoload file is assumed to contain a
43 trailer starting with a FormFeed character.") 43 trailer starting with a FormFeed character.")
44 ;;;###autoload
44 (put 'generated-autoload-file 'safe-local-variable 'stringp) 45 (put 'generated-autoload-file 'safe-local-variable 'stringp)
45 46
46 ;; This feels like it should be a defconst, but MH-E sets it to 47 ;; This feels like it should be a defconst, but MH-E sets it to
47 ;; ";;;###mh-autoload" for the autoloads that are to go into mh-loaddefs.el. 48 ;; ";;;###mh-autoload" for the autoloads that are to go into mh-loaddefs.el.
48 (defvar generate-autoload-cookie ";;;###autoload" 49 (defvar generate-autoload-cookie ";;;###autoload"
430 ;; (loaddefs.el) where we have special ways to 431 ;; (loaddefs.el) where we have special ways to
431 ;; circumvent the "random change problem", and MD5 432 ;; circumvent the "random change problem", and MD5
432 ;; checksum in secondary autoload files where we do 433 ;; checksum in secondary autoload files where we do
433 ;; not need the time-stamp optimization because it is 434 ;; not need the time-stamp optimization because it is
434 ;; already provided by the primary autoloads file. 435 ;; already provided by the primary autoloads file.
435 (md5 secondary-autoloads-file-buf nil nil 'emacs-mule) 436 (md5 secondary-autoloads-file-buf
437 ;; We'd really want to just use
438 ;; `emacs-internal' instead.
439 nil nil 'emacs-mule-unix)
436 (nth 5 (file-attributes relfile)))) 440 (nth 5 (file-attributes relfile))))
437 (insert ";;; Generated autoloads from " relfile "\n")) 441 (insert ";;; Generated autoloads from " relfile "\n"))
438 (insert generate-autoload-section-trailer)))) 442 (insert generate-autoload-section-trailer))))
439 (message "Generating autoloads for %s...done" file)) 443 (message "Generating autoloads for %s...done" file))
440 (or visited 444 (or visited
557 (files (apply 'nconc 561 (files (apply 'nconc
558 (mapcar (lambda (dir) 562 (mapcar (lambda (dir)
559 (directory-files (expand-file-name dir) 563 (directory-files (expand-file-name dir)
560 t files-re)) 564 t files-re))
561 dirs))) 565 dirs)))
566 (done ())
562 (this-time (current-time)) 567 (this-time (current-time))
563 ;; Files with no autoload cookies or whose autoloads go to other 568 ;; Files with no autoload cookies or whose autoloads go to other
564 ;; files because of file-local autoload-generated-file settings. 569 ;; files because of file-local autoload-generated-file settings.
565 (no-autoloads nil) 570 (no-autoloads nil)
566 (autoload-modified-buffers nil)) 571 (autoload-modified-buffers nil))
590 (not (time-less-p last-time file-time))) 595 (not (time-less-p last-time file-time)))
591 ;; file unchanged 596 ;; file unchanged
592 (push file no-autoloads) 597 (push file no-autoloads)
593 (setq files (delete file files))))))) 598 (setq files (delete file files)))))))
594 ((not (stringp file))) 599 ((not (stringp file)))
595 ((not (and (file-exists-p file) 600 ((or (not (file-exists-p file))
596 ;; Remove duplicates as well, just in case. 601 ;; Remove duplicates as well, just in case.
597 (member file files))) 602 (member file done))
598 ;; Remove the obsolete section. 603 ;; Remove the obsolete section.
599 (autoload-remove-section (match-beginning 0))) 604 (autoload-remove-section (match-beginning 0)))
600 ((not (time-less-p (nth 4 form) 605 ((not (time-less-p (nth 4 form)
601 (nth 5 (file-attributes file)))) 606 (nth 5 (file-attributes file))))
602 ;; File hasn't changed. 607 ;; File hasn't changed.
603 nil) 608 nil)
604 (t 609 (t
605 (autoload-remove-section (match-beginning 0)) 610 (autoload-remove-section (match-beginning 0))
606 (if (autoload-generate-file-autoloads 611 (if (autoload-generate-file-autoloads
607 file (current-buffer) buffer-file-name) 612 file (current-buffer) buffer-file-name)
608 (push file no-autoloads)))) 613 (push file no-autoloads))))
614 (push file done)
609 (setq files (delete file files))))) 615 (setq files (delete file files)))))
610 ;; Elements remaining in FILES have no existing autoload sections yet. 616 ;; Elements remaining in FILES have no existing autoload sections yet.
611 (dolist (file files) 617 (dolist (file files)
612 (if (autoload-generate-file-autoloads file nil buffer-file-name) 618 (if (autoload-generate-file-autoloads file nil buffer-file-name)
613 (push file no-autoloads))) 619 (push file no-autoloads)))