diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 6befa6d234..c8eb565942 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -981,43 +981,39 @@ menu-bar-no-horizontal-scroll-bar (customize-set-variable 'horizontal-scroll-bar-mode nil)) (defvar menu-bar-showhide-scroll-bar-menu - (let ((menu (make-sparse-keymap "Scroll-bar")) - (vsb (frame-parameter nil 'vertical-scroll-bars)) - (hsb (frame-parameter nil 'horizontal-scroll-bars))) + (let ((menu (make-sparse-keymap "Scroll Bar"))) + (bindings--define-key menu [horizontal] - `(menu-item "Horizontal" - menu-bar-horizontal-scroll-bar - :help "Horizontal scroll bar" - :visible (horizontal-scroll-bars-available-p) - :button (:radio . ,hsb))) - - (bindings--define-key menu [none-horizontal] - `(menu-item "None-horizontal" - menu-bar-no-horizontal-scroll-bar - :help "Turn off horizontal scroll bars" - :visible (horizontal-scroll-bars-available-p) - :button (:radio . (not ,hsb)))) + (menu-bar-make-mm-toggle horizontal-scroll-bar-mode + "Horizontal" + "Horizontal scroll bar")) + + (bindings--define-key menu [scrollbar-separator] + menu-bar-separator) (bindings--define-key menu [right] - `(menu-item "On the Right" - menu-bar-right-scroll-bar - :help "Scroll-bar on the right side" + '(menu-item "On the Right" menu-bar-right-scroll-bar + :help "Scroll bar on the right side" :visible (display-graphic-p) - :button (:radio . (eq ,vsb 'right)))) + :button (:radio . (and scroll-bar-mode + (eq (frame-parameter + nil 'vertical-scroll-bars) + 'right))))) (bindings--define-key menu [left] - `(menu-item "On the Left" - menu-bar-left-scroll-bar - :help "Scroll-bar on the left side" + '(menu-item "On the Left" menu-bar-left-scroll-bar + :help "Scroll bar on the left side" :visible (display-graphic-p) - :button (:radio . (eq ,vsb 'left)))) + :button (:radio . (and scroll-bar-mode + (eq (frame-parameter + nil 'vertical-scroll-bars) + 'left))))) (bindings--define-key menu [none] - `(menu-item "None" - menu-bar-no-scroll-bar - :help "Turn off scroll-bar" + '(menu-item "No Vertical Scroll Bar" menu-bar-no-scroll-bar + :help "Turn off vertical scroll bar" :visible (display-graphic-p) - :button (:radio . (not ,vsb)))) + :button (:radio . (eq scroll-bar-mode nil)))) menu)) (defun menu-bar-frame-for-menubar () @@ -1057,24 +1053,24 @@ menu-bar-showhide-tool-bar-menu-customize-enable-bottom (when (featurep 'move-toolbar) (defvar menu-bar-showhide-tool-bar-menu - (let ((menu (make-sparse-keymap "Tool-bar"))) + (let ((menu (make-sparse-keymap "Tool Bar"))) (bindings--define-key menu [showhide-tool-bar-left] '(menu-item "On the Left" menu-bar-showhide-tool-bar-menu-customize-enable-left - :help "Tool-bar at the left side" + :help "Tool bar at the left side" :visible (display-graphic-p) :button (:radio . (and tool-bar-mode - (eq (frame-parameter + (frame-parameter (menu-bar-frame-for-menubar) 'tool-bar-position) - 'left))))) + 'left)))) (bindings--define-key menu [showhide-tool-bar-right] '(menu-item "On the Right" menu-bar-showhide-tool-bar-menu-customize-enable-right - :help "Tool-bar at the right side" + :help "Tool bar at the right side" :visible (display-graphic-p) :button (:radio . (and tool-bar-mode @@ -1086,7 +1082,7 @@ menu-bar-showhide-tool-bar-menu-customize-enable-bottom (bindings--define-key menu [showhide-tool-bar-bottom] '(menu-item "On the Bottom" menu-bar-showhide-tool-bar-menu-customize-enable-bottom - :help "Tool-bar at the bottom" + :help "Tool bar at the bottom" :visible (display-graphic-p) :button (:radio . (and tool-bar-mode @@ -1098,7 +1094,7 @@ menu-bar-showhide-tool-bar-menu-customize-enable-bottom (bindings--define-key menu [showhide-tool-bar-top] '(menu-item "On the Top" menu-bar-showhide-tool-bar-menu-customize-enable-top - :help "Tool-bar at the top" + :help "Tool bar at the top" :visible (display-graphic-p) :button (:radio . (and tool-bar-mode @@ -1110,7 +1106,7 @@ menu-bar-showhide-tool-bar-menu-customize-enable-bottom (bindings--define-key menu [showhide-tool-bar-none] '(menu-item "None" menu-bar-showhide-tool-bar-menu-customize-disable - :help "Turn tool-bar off" + :help "Turn tool bar off" :visible (display-graphic-p) :button (:radio . (eq tool-bar-mode nil)))) menu))) @@ -1168,7 +1164,7 @@ menu-bar-showhide-menu :visible (display-graphic-p))) (bindings--define-key menu [showhide-scroll-bar] - `(menu-item "Scroll-bar" ,menu-bar-showhide-scroll-bar-menu + `(menu-item "Scroll Bar" ,menu-bar-showhide-scroll-bar-menu :visible (display-graphic-p))) (bindings--define-key menu [showhide-tooltip-mode] @@ -1178,8 +1174,8 @@ menu-bar-showhide-menu :button (:toggle . tooltip-mode))) (bindings--define-key menu [menu-bar-mode] - '(menu-item "Menu-bar" toggle-menu-bar-mode-from-frame - :help "Turn menu-bar on/off" + '(menu-item "Menu Bar" toggle-menu-bar-mode-from-frame + :help "Turn menu bar on/off" :button (:toggle . (menu-bar-positive-p (frame-parameter (menu-bar-frame-for-menubar) @@ -1188,12 +1184,12 @@ menu-bar-showhide-menu (if (and (boundp 'menu-bar-showhide-tool-bar-menu) (keymapp menu-bar-showhide-tool-bar-menu)) (bindings--define-key menu [showhide-tool-bar] - `(menu-item "Tool-bar" ,menu-bar-showhide-tool-bar-menu + `(menu-item "Tool Bar" ,menu-bar-showhide-tool-bar-menu :visible (display-graphic-p))) ;; else not tool bar that can move. (bindings--define-key menu [showhide-tool-bar] - '(menu-item "Tool-bar" toggle-tool-bar-mode-from-frame - :help "Turn tool-bar on/off" + '(menu-item "Tool Bar" toggle-tool-bar-mode-from-frame + :help "Turn tool bar on/off" :visible (display-graphic-p) :button (:toggle . (menu-bar-positive-p @@ -2268,11 +2264,11 @@ menu-bar-mode (assq-delete-all 'menu-bar-lines default-frame-alist))))) ;; Make the message appear when Emacs is idle. We can not call message - ;; directly. The minor-mode message "Menu-bar mode disabled" comes + ;; directly. The minor-mode message "Menu Bar mode disabled" comes ;; after this function returns, overwriting any message we do here. (when (and (called-interactively-p 'interactive) (not menu-bar-mode)) (run-with-idle-timer 0 nil 'message - "Menu-bar mode disabled. Use M-x menu-bar-mode to make the menu bar appear."))) + "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.)