From 9d7940260552d9ad5f331443aae200094ae2847c Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 28 Oct 2010 20:29:29 -0700 Subject: Remove duplicate Lisp definitions of define-minor-mode variables defined in C. * lisp/abbrev.el (abbrev-mode): * lisp/composite.el (auto-composition-mode): * lisp/menu-bar.el (menu-bar-mode): * lisp/simple.el (transient-mark-mode): * lisp/tool-bar.el (tool-bar-mode): Adjust the define-minor-mode calls so that they do not define the associated variables twice. * lisp/simple.el (transient-mark-mode): Remove defvar. * lisp/composite.el (auto-composition-mode): Make variable auto-buffer-local. * lisp/cus-start.el: Add transient-mark-mode, menu-bar-mode, tool-bar-mode. Handle multiple groups, and also custom-delayed-init-variables. * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix. * src/buffer.c (syms_of_buffer) : * src/frame.c (syms_of_frame) : Move docs here from Lisp. --- lisp/emacs-lisp/easy-mmode.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lisp/emacs-lisp/easy-mmode.el') diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index e11572dfc62..9a703c96378 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -119,7 +119,8 @@ BODY contains code to execute each time the mode is enabled or disabled. of the variable MODE to store the state of the mode. PLACE can also be of the form (GET . SET) where GET is an expression that returns the current state and SET is a function that takes - a new state and sets it. + a new state and sets it. If you specify a :variable, this + function assumes it is defined elsewhere. For example, you could write (define-minor-mode foo-mode \"If enabled, foo on you!\" @@ -196,6 +197,7 @@ For example, you could write `(:group ',(intern (replace-regexp-in-string "-mode\\'" "" mode-name))))) + ;; TODO? Mark booleans as safe if booleanp? Eg abbrev-mode. (unless type (setq type '(:type 'boolean))) `(progn @@ -583,5 +585,4 @@ BODY is executed after moving to the destination location." (provide 'easy-mmode) -;; arch-tag: d48a5250-6961-4528-9cb0-3c9ea042a66a ;;; easy-mmode.el ends here -- cgit v1.2.3