aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2010-10-29 19:27:44 -0700
committerGlenn Morris2010-10-29 19:27:44 -0700
commit88f43c67491e301d5e0fe4476d1a7203c64a3762 (patch)
treeae076477a2a31b139ceb1d56a81e0cefbfb7f1d5
parentc4d17d50ea180c405fc58f9ffe693b6c633571ac (diff)
downloademacs-88f43c67491e301d5e0fe4476d1a7203c64a3762.tar.gz
emacs-88f43c67491e301d5e0fe4476d1a7203c64a3762.zip
Fix bug#7306; customization of minor-mode variables defined in C.
* lisp/cus-start.el: Add :set properties for minor modes menu-bar-mode, tool-bar-mode, transient-mark-mode. Include the :set property in the dumped Emacs.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/cus-start.el27
2 files changed, 23 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0fb702e7f66..5344909c3a5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12010-10-30 Glenn Morris <rgm@gnu.org>
2
3 * cus-start.el: Add :set properties for minor modes menu-bar-mode,
4 tool-bar-mode, transient-mark-mode. (Bug#7306)
5 Include the :set property in the dumped Emacs.
6
12010-10-29 Stefan Monnier <monnier@iro.umontreal.ca> 72010-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
2 8
3 SMIE: change indent rules format, improve smie-setup. 9 SMIE: change indent rules format, improve smie-setup.
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index 90291fc9229..af5338b0bcd 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -1,7 +1,7 @@
1;;; cus-start.el --- define customization properties of builtins 1;;; cus-start.el --- define customization properties of builtins
2;; 2;;
3;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 3;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
4;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. 4;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
5;; 5;;
6;; Author: Per Abrahamsen <abraham@dina.kvl.dk> 6;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
7;; Keywords: internal 7;; Keywords: internal
@@ -103,7 +103,8 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
103 (force-mode-line-update t))) 103 (force-mode-line-update t)))
104 (transient-mark-mode editing-basics boolean nil 104 (transient-mark-mode editing-basics boolean nil
105 (not noninteractive) 105 (not noninteractive)
106 :initialize custom-initialize-delay) 106 :initialize custom-initialize-delay
107 :set custom-set-minor-mode)
107 ;; callint.c 108 ;; callint.c
108 (mark-even-if-inactive editing-basics boolean) 109 (mark-even-if-inactive editing-basics boolean)
109 ;; callproc.c 110 ;; callproc.c
@@ -217,8 +218,13 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
217 (other :tag "hidden by keypress" 1)) 218 (other :tag "hidden by keypress" 1))
218 "22.1") 219 "22.1")
219 (make-pointer-invisible mouse boolean "23.2") 220 (make-pointer-invisible mouse boolean "23.2")
220 (menu-bar-mode frames boolean) 221 (menu-bar-mode frames boolean nil t
221 (tool-bar-mode (frames mouse) boolean) 222 ;; FIXME?
223; :initialize custom-initialize-default
224 :set custom-set-minor-mode)
225 (tool-bar-mode (frames mouse) boolean nil t
226; :initialize custom-initialize-default
227 :set custom-set-minor-mode)
222 ;; fringe.c 228 ;; fringe.c
223 (overflow-newline-into-fringe fringe boolean) 229 (overflow-newline-into-fringe fringe boolean)
224 ;; indent.c 230 ;; indent.c
@@ -486,11 +492,14 @@ since it could result in memory overflow and make Emacs crash."
486 (put symbol 'safe-local-variable (cadr prop))) 492 (put symbol 'safe-local-variable (cadr prop)))
487 (if (setq prop (memq :risky rest)) 493 (if (setq prop (memq :risky rest))
488 (put symbol 'risky-local-variable (cadr prop))) 494 (put symbol 'risky-local-variable (cadr prop)))
495 (if (setq prop (memq :set rest))
496 (put symbol 'custom-set (cadr prop)))
489 ;; Note this is the _only_ initialize property we handle. 497 ;; Note this is the _only_ initialize property we handle.
490 (if (eq (cadr (memq :initialize rest)) 'custom-initialize-delay) 498 (if (eq (cadr (memq :initialize rest)) 'custom-initialize-delay)
491 (push symbol custom-delayed-init-variables)) 499 (push symbol custom-delayed-init-variables))
492 ;; If this is NOT while dumping Emacs, 500 ;; If this is NOT while dumping Emacs, set up the rest of the
493 ;; set up the rest of the customization info. 501 ;; customization info. This is the stuff that is not needed
502 ;; until someone does M-x customize etc.
494 (unless purify-flag 503 (unless purify-flag
495 ;; Add it to the right group(s). 504 ;; Add it to the right group(s).
496 (if (listp group) 505 (if (listp group)
@@ -504,9 +513,7 @@ since it could result in memory overflow and make Emacs crash."
504 (setq prop (car rest) 513 (setq prop (car rest)
505 propval (cadr rest) 514 propval (cadr rest)
506 rest (nthcdr 2 rest)) 515 rest (nthcdr 2 rest))
507 (cond ((memq prop '(:risky :safe))) ; handled above 516 (cond ((memq prop '(:risky :safe :set))) ; handled above
508 ((eq prop :set)
509 (put symbol 'custom-set propval))
510 ((eq prop :tag) 517 ((eq prop :tag)
511 (put symbol 'custom-tag propval)))))))) 518 (put symbol 'custom-tag propval))))))))
512 519