summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2010-10-28 20:29:29 -0700
committerGlenn Morris <rgm@gnu.org>2010-10-28 20:29:29 -0700
commit9d7940260552d9ad5f331443aae200094ae2847c (patch)
treef7c3cf42cbf6a057ba2918f03b91e15da25c8b19 /lisp/emacs-lisp
parentdcc029e017acab959291f9d938234240ac3cea32 (diff)
downloademacs-9d7940260552d9ad5f331443aae200094ae2847c.tar.gz
emacs-9d7940260552d9ad5f331443aae200094ae2847c.tar.bz2
emacs-9d7940260552d9ad5f331443aae200094ae2847c.zip
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) <abbrev-mode, transient-mark-mode>: * src/frame.c (syms_of_frame) <tool-bar-mode>: Move docs here from Lisp.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/easy-mmode.el5
1 files changed, 3 insertions, 2 deletions
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