comparison lisp/emacs-lisp/autoload.el @ 90261:7beb78bc1f8e

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-97 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 616-696) - Add lisp/mh-e/.arch-inventory - Update from CVS - Merge from gnus--rel--5.10 - Update from CVS: lisp/smerge-mode.el: Add 'tools' to file keywords. - lisp/gnus/ChangeLog: Remove duplicate entry * gnus--rel--5.10 (patch 147-181) - Update from CVS - Merge from emacs--cvs-trunk--0 - Update from CVS: lisp/mml.el (mml-preview): Doc fix. - Update from CVS: texi/message.texi: Fix default values. - Update from CVS: texi/gnus.texi (RSS): Addition.
author Miles Bader <miles@gnu.org>
date Mon, 16 Jan 2006 08:37:27 +0000
parents 5e2d3828e89f cf5b42f7a962
children c5406394f567
comparison
equal deleted inserted replaced
90260:0ca0d9181b5e 90261:7beb78bc1f8e
84 (mapcar (lambda (form) (make-autoload form file)) 84 (mapcar (lambda (form) (make-autoload form file))
85 (cdr expand))))) 85 (cdr expand)))))
86 86
87 ;; For special function-like operators, use the `autoload' function. 87 ;; For special function-like operators, use the `autoload' function.
88 ((memq car '(defun define-skeleton defmacro define-derived-mode 88 ((memq car '(defun define-skeleton defmacro define-derived-mode
89 define-compilation-mode 89 define-compilation-mode define-generic-mode
90 define-generic-mode easy-mmode-define-minor-mode 90 easy-mmode-define-global-mode define-global-minor-mode
91 easy-mmode-define-global-mode 91 easy-mmode-define-minor-mode define-minor-mode
92 define-minor-mode defun* defmacro*)) 92 defun* defmacro*))
93 (let* ((macrop (memq car '(defmacro defmacro*))) 93 (let* ((macrop (memq car '(defmacro defmacro*)))
94 (name (nth 1 form)) 94 (name (nth 1 form))
95 (args (case car 95 (args (case car
96 ((defun defmacro defun* defmacro*) (nth 2 form)) 96 ((defun defmacro defun* defmacro*) (nth 2 form))
97 ((define-skeleton) '(&optional str arg)) 97 ((define-skeleton) '(&optional str arg))
107 ;; `define-generic-mode' quotes the name, so take care of that 107 ;; `define-generic-mode' quotes the name, so take care of that
108 (list 'autoload (if (listp name) name (list 'quote name)) file doc 108 (list 'autoload (if (listp name) name (list 'quote name)) file doc
109 (or (and (memq car '(define-skeleton define-derived-mode 109 (or (and (memq car '(define-skeleton define-derived-mode
110 define-generic-mode 110 define-generic-mode
111 easy-mmode-define-global-mode 111 easy-mmode-define-global-mode
112 define-global-minor-mode
112 easy-mmode-define-minor-mode 113 easy-mmode-define-minor-mode
113 define-minor-mode)) t) 114 define-minor-mode)) t)
114 (eq (car-safe (car body)) 'interactive)) 115 (eq (car-safe (car body)) 'interactive))
115 (if macrop (list 'quote 'macro) nil)))) 116 (if macrop (list 'quote 'macro) nil))))
116 117
132 ,(let ((setter (condition-case nil 133 ,(let ((setter (condition-case nil
133 (cadr (memq :set form)) 134 (cadr (memq :set form))
134 (error nil)))) 135 (error nil))))
135 (if (equal setter ''custom-set-minor-mode) 136 (if (equal setter ''custom-set-minor-mode)
136 `(put ',varname 'custom-set 'custom-set-minor-mode)))))) 137 `(put ',varname 'custom-set 'custom-set-minor-mode))))))
138
139 ((eq car 'defgroup)
140 ;; In Emacs this is normally handled separately by cus-dep.el, but for
141 ;; third party packages, it can be convenient to explicitly autoload
142 ;; a group.
143 (let ((groupname (nth 1 form)))
144 `(let ((loads (get ',groupname 'custom-loads)))
145 (if (member ',file loads) nil
146 (put ',groupname 'custom-loads (cons ',file loads))))))
137 147
138 ;; nil here indicates that this is not a special autoload form. 148 ;; nil here indicates that this is not a special autoload form.
139 (t nil)))) 149 (t nil))))
140 150
141 ;; Forms which have doc-strings which should be printed specially. 151 ;; Forms which have doc-strings which should be printed specially.
566 (current-buffer) nil nil no-autoloads this-time) 576 (current-buffer) nil nil no-autoloads this-time)
567 (insert generate-autoload-section-trailer)) 577 (insert generate-autoload-section-trailer))
568 578
569 (save-buffer)))) 579 (save-buffer))))
570 580
581 (define-obsolete-function-alias 'update-autoloads-from-directories
582 'update-directory-autoloads "22.1")
583
571 ;;;###autoload 584 ;;;###autoload
572 (defun batch-update-autoloads () 585 (defun batch-update-autoloads ()
573 "Update loaddefs.el autoloads in batch mode. 586 "Update loaddefs.el autoloads in batch mode.
574 Calls `update-directory-autoloads' on the command line arguments." 587 Calls `update-directory-autoloads' on the command line arguments."
575 (apply 'update-directory-autoloads command-line-args-left) 588 (apply 'update-directory-autoloads command-line-args-left)