summaryrefslogtreecommitdiff
path: root/lisp/cus-start.el
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/cus-start.el
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/cus-start.el')
-rw-r--r--lisp/cus-start.el15
1 files changed, 13 insertions, 2 deletions
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index ceb7bcdfd1a..8fa20d624dd 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -101,6 +101,9 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
:set #'(lambda (symbol value)
(set-default symbol value)
(force-mode-line-update t)))
+ (transient-mark-mode editing-basics boolean nil
+ (not noninteractive)
+ :initialize custom-initialize-delay)
;; callint.c
(mark-even-if-inactive editing-basics boolean)
;; callproc.c
@@ -185,6 +188,8 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
(other :tag "hidden by keypress" 1))
"22.1")
(make-pointer-invisible mouse boolean "23.2")
+ (menu-bar-mode frames boolean)
+ (tool-bar-mode (frames mouse) boolean)
;; fringe.c
(overflow-newline-into-fringe fringe boolean)
;; indent.c
@@ -452,11 +457,17 @@ since it could result in memory overflow and make Emacs crash."
(put symbol 'safe-local-variable (cadr prop)))
(if (setq prop (memq :risky rest))
(put symbol 'risky-local-variable (cadr prop)))
+ ;; Note this is the _only_ initialize property we handle.
+ (if (eq (cadr (memq :initialize rest)) 'custom-initialize-delay)
+ (push symbol custom-delayed-init-variables))
;; If this is NOT while dumping Emacs,
;; set up the rest of the customization info.
(unless purify-flag
- ;; Add it to the right group.
- (custom-add-to-group group symbol 'custom-variable)
+ ;; Add it to the right group(s).
+ (if (listp group)
+ (dolist (g group)
+ (custom-add-to-group g symbol 'custom-variable))
+ (custom-add-to-group group symbol 'custom-variable))
;; Set the type.
(put symbol 'custom-type type)
(put symbol 'custom-version version)