summaryrefslogtreecommitdiff
path: root/lisp/composite.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2010-05-02 22:29:46 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2010-05-02 22:29:46 -0400
commit56eb09046e00ac7ee6d3d3d752cb1ee664b7e062 (patch)
tree6ff481ffba16576053b3cb2a8ad24a4f66bdec4a /lisp/composite.el
parent063371f2b0dc2519db3abcbe54955167bde8ca9e (diff)
downloademacs-56eb09046e00ac7ee6d3d3d752cb1ee664b7e062.tar.gz
Use define-minor-mode where applicable.
* mh-show.el (mh-showing-mode): Move function to mh-e.el. * mh-e.el (mh-showing-mode): * url-dired.el (url-dired-minor-mode): * org-table.el (orgtbl-mode): * view.el (view-mode): * type-break.el (type-break-query-mode) (type-break-mode-line-message-mode): * textmodes/reftex.el (reftex-mode): * term/vt100.el (vt100-wide-mode): * tar-mode.el (tar-subfile-mode): * savehist.el (savehist-mode): * ibuf-ext.el (ibuffer-auto-mode): * composite.el (auto-composition-mode): * progmodes/vhdl-mode.el (vhdl-electric-mode, vhdl-stutter-mode): Use define-minor-mode. (vhdl-mode): Use static mode-line format. (vhdl-mode-line-update): Delete. (vhdl-create-mode-menu, vhdl-activate-customizations) (vhdl-hs-minor-mode): Don't bother calling it.
Diffstat (limited to 'lisp/composite.el')
-rw-r--r--lisp/composite.el10
1 files changed, 2 insertions, 8 deletions
diff --git a/lisp/composite.el b/lisp/composite.el
index 5b01718fc71..2b65839b93f 100644
--- a/lisp/composite.el
+++ b/lisp/composite.el
@@ -745,14 +745,13 @@ This function is the default value of `auto-composition-function' (which see)."
(setq func 'compose-gstring-for-terminal))
(funcall func gstring))))
-(make-variable-buffer-local 'auto-composition-mode)
(put 'auto-composition-mode 'permanent-local t)
(make-variable-buffer-local 'auto-composition-function)
(setq-default auto-composition-function 'auto-compose-chars)
;;;###autoload
-(defun auto-composition-mode (&optional arg)
+(define-minor-mode auto-composition-mode
"Toggle Auto Composition mode.
With ARG, turn Auto Composition mode off if and only if ARG is a non-positive
number; if ARG is nil, toggle Auto Composition mode; anything else turns Auto
@@ -762,12 +761,7 @@ When Auto Composition is enabled, text characters are automatically composed
by functions registered in `composition-function-table' (which see).
You can use `global-auto-composition-mode' to turn on
-Auto Composition mode in all buffers (this is the default)."
- (interactive "P")
- (setq auto-composition-mode
- (if arg
- (or (not (integerp arg)) (> arg 0))
- (not auto-composition-mode))))
+Auto Composition mode in all buffers (this is the default).")
;;;###autoload
(defun global-auto-composition-mode (&optional arg)