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.
This commit is contained in:
Glenn Morris 2010-10-28 20:29:29 -07:00
parent dcc029e017
commit 9d79402605
11 changed files with 81 additions and 48 deletions

View file

@ -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