summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/easy-mmode.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2012-05-30 21:41:17 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2012-05-30 21:41:17 -0400
commit500fcedc32199750ee61ce6caba3914fe204e629 (patch)
tree48e4954b45900c121bda51f3de0209e5cd3736e7 /lisp/emacs-lisp/easy-mmode.el
parentb03b4c00631aa0d43de33c0498db36a2403cd519 (diff)
downloademacs-500fcedc32199750ee61ce6caba3914fe204e629.tar.gz
Add `declare' for `defun'. Align `defmacro's with it.
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode) (define-globalized-minor-mode): Don't autoload the var definitions. * lisp/emacs-lisp/byte-run.el: Use lexical-binding. (defun-declarations-alist, macro-declarations-alist): New vars. (defmacro, defun): Use them. (make-obsolete, define-obsolete-function-alias) (make-obsolete-variable, define-obsolete-variable-alias): Use `declare'. (macro-declaration-function): Mark obsolete. * lisp/emacs-lisp/autoload.el: Use lexical-binding. (make-autoload): Add `expansion' arg. Rely more on macro expansion.
Diffstat (limited to 'lisp/emacs-lisp/easy-mmode.el')
-rw-r--r--lisp/emacs-lisp/easy-mmode.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index a11f213e646..d522f07249a 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -229,6 +229,7 @@ For example, you could write
(variable nil)
((not globalp)
`(progn
+ :autoload-end
(defvar ,mode ,init-value ,(format "Non-nil if %s is enabled.
Use the command `%s' to change this variable." pretty-name mode))
(make-variable-buffer-local ',mode)))
@@ -366,8 +367,10 @@ call another major mode in their body."
"-mode\\'" "" (symbol-name mode))))))
`(progn
- (defvar ,MODE-major-mode nil)
- (make-variable-buffer-local ',MODE-major-mode)
+ (progn
+ :autoload-end
+ (defvar ,MODE-major-mode nil)
+ (make-variable-buffer-local ',MODE-major-mode))
;; The actual global minor-mode
(define-minor-mode ,global-mode
;; Very short lines to avoid too long lines in the generated