Mercurial > emacs
diff lisp/menu-bar.el @ 110357:41bf9b6f3b91
Merge changes from emacs-23 branch.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Tue, 14 Sep 2010 16:41:53 +0200 |
parents | 314f04d4d276 ba563485f83b |
children | 8d106071e2c8 |
line wrap: on
line diff
--- a/lisp/menu-bar.el Tue Sep 14 13:44:44 2010 +0000 +++ b/lisp/menu-bar.el Tue Sep 14 16:41:53 2010 +0200 @@ -664,13 +664,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 @@ -2037,6 +2047,16 @@ (run-with-idle-timer 0 nil 'message "Menu-bar mode disabled. Use M-x menu-bar-mode to make the menu bar appear."))) +;;;###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."