emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100027: Close bug#6211.


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100027: Close bug#6211.
Date: Thu, 09 Sep 2010 20:04:26 -0700
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100027
committer: Glenn Morris <address@hidden>
branch nick: emacs-23
timestamp: Thu 2010-09-09 20:04:26 -0700
message:
  Close bug#6211.
  * lisp/menu-bar.el (menu-bar-options-save): Fix handling of menu-bar
  and tool-bar modes.  (Bug#6211)
  (menu-bar-mode): Move setting of standard-value after the
  minor-mode definition, otherwise it seems to have no effect.
modified:
  lisp/ChangeLog
  lisp/menu-bar.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-09-08 02:45:12 +0000
+++ b/lisp/ChangeLog    2010-09-10 03:04:26 +0000
@@ -1,3 +1,10 @@
+2010-09-10  Glenn Morris  <address@hidden>
+
+       * menu-bar.el (menu-bar-options-save): Fix handling of menu-bar
+       and tool-bar modes.  (Bug#6211)
+       (menu-bar-mode): Move setting of standard-value after the
+       minor-mode definition, otherwise it seems to have no effect.
+
 2010-09-08  Masatake YAMATO  <address@hidden>
 
        * progmodes/antlr-mode.el (antlr-font-lock-additional-keywords):

=== modified file 'lisp/menu-bar.el'
--- a/lisp/menu-bar.el  2010-08-21 02:11:34 +0000
+++ b/lisp/menu-bar.el  2010-09-10 03:04:26 +0000
@@ -674,13 +674,23 @@
     ;; put on a customized-value property.
     (dolist (elt '(line-number-mode column-number-mode size-indication-mode
                   cua-mode show-paren-mode transient-mark-mode
-                  blink-cursor-mode display-time-mode display-battery-mode))
+                  blink-cursor-mode display-time-mode display-battery-mode
+                  ;; These are set by other functions that don't set
+                  ;; the customized state.  Having them here has the
+                  ;; side-effect that turning them off via X
+                  ;; resources acts like having customized them, but
+                  ;; that seems harmless.
+                  menu-bar-mode tool-bar-mode))
+      ;; FIXME ? It's a little annoying that running this command
+      ;; always loads cua-base, paren, time, and battery, even if they
+      ;; have not been customized in any way.  (Due to custom-load-symbol.)
       (and (customize-mark-to-save elt)
           (setq need-save t)))
     ;; These are set with `customize-set-variable'.
     (dolist (elt '(scroll-bar-mode
                   debug-on-quit debug-on-error
-                  tooltip-mode menu-bar-mode tool-bar-mode
+                  ;; Somehow this works, when tool-bar and menu-bar don't.
+                  tooltip-mode
                   save-place uniquify-buffer-name-style fringe-mode
                   indicate-empty-lines indicate-buffer-boundaries
                   case-fold-search font-use-system-font
@@ -1923,15 +1933,6 @@
     `(menu-item ,(purecopy "Previous History Item") previous-history-element
                :help ,(purecopy "Put previous minibuffer history element in 
the minibuffer"))))
 
-;;;###autoload
-;; This comment is taken from tool-bar.el near
-;; (put 'tool-bar-mode ...)
-;; We want to pretend the menu bar by standard is on, as this will make
-;; customize consider disabling the menu bar a customization, and save
-;; that.  We could do this for real by setting :init-value below, but
-;; that would overwrite disabling the tool bar from X resources.
-(put 'menu-bar-mode 'standard-value '(t))
-
 (define-minor-mode menu-bar-mode
   "Toggle display of a menu bar on each frame.
 This command applies to all frames that exist and frames to be
@@ -1954,6 +1955,16 @@
                         "Menu-bar mode disabled.  Use M-x menu-bar-mode to 
make the menu bar appear."))
   menu-bar-mode)
 
+;;;###autoload
+;; (This does not work right unless it comes after the above definition.)
+;; This comment is taken from tool-bar.el near
+;; (put 'tool-bar-mode ...)
+;; We want to pretend the menu bar by standard is on, as this will make
+;; customize consider disabling the menu bar a customization, and save
+;; that.  We could do this for real by setting :init-value above, but
+;; that would overwrite disabling the menu bar from X resources.
+(put 'menu-bar-mode 'standard-value '(t))
+
 (defun toggle-menu-bar-mode-from-frame (&optional arg)
   "Toggle menu bar on or off, based on the status of the current frame.
 See `menu-bar-mode' for more information."


reply via email to

[Prev in Thread] Current Thread [Next in Thread]