Mercurial > emacs
comparison lisp/emacs-lisp/autoload.el @ 71874:e727167b07e4
(make-autoload): Remove special handling of
minor modes, redundant with the custom-autoload line above.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 13 Jul 2006 18:13:06 +0000 |
parents | 29150c5d541b |
children | e768c05d6e71 |
comparison
equal
deleted
inserted
replaced
71873:0048306da39e | 71874:e727167b07e4 |
---|---|
122 (doc (car-safe (cdr-safe (cdr-safe (cdr-safe form))))) | 122 (doc (car-safe (cdr-safe (cdr-safe (cdr-safe form))))) |
123 ;; (rest (cdr-safe (cdr-safe (cdr-safe (cdr-safe form))))) | 123 ;; (rest (cdr-safe (cdr-safe (cdr-safe (cdr-safe form))))) |
124 ) | 124 ) |
125 `(progn | 125 `(progn |
126 (defvar ,varname ,init ,doc) | 126 (defvar ,varname ,init ,doc) |
127 (custom-autoload ',varname ,file) | 127 (custom-autoload ',varname ,file)))) |
128 ;; The use of :require in a defcustom can be annoying, especially | |
129 ;; when defcustoms are moved from one file to another between | |
130 ;; releases because the :require arg gets placed in the user's | |
131 ;; .emacs. In order for autoloaded minor modes not to need the | |
132 ;; use of :require, we arrange to store their :setter. | |
133 ,(let ((setter (condition-case nil | |
134 (cadr (memq :set form)) | |
135 (error nil)))) | |
136 (if (equal setter ''custom-set-minor-mode) | |
137 `(put ',varname 'custom-set 'custom-set-minor-mode)))))) | |
138 | 128 |
139 ((eq car 'defgroup) | 129 ((eq car 'defgroup) |
140 ;; In Emacs this is normally handled separately by cus-dep.el, but for | 130 ;; In Emacs this is normally handled separately by cus-dep.el, but for |
141 ;; third party packages, it can be convenient to explicitly autoload | 131 ;; third party packages, it can be convenient to explicitly autoload |
142 ;; a group. | 132 ;; a group. |