mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-07 04:39:37 +00:00
* lisp/tab-bar.el (tab-bar-menu-bar): New command (bug#51247).
(tab-bar-format): Rename option 'tab-bar-format-menu-global' to 'tab-bar-format-menu-bar'. (tab-bar-format-menu-bar): Rename from 'tab-bar-format-menu-global'.
This commit is contained in:
parent
8358da9c4c
commit
06fe499614
1 changed files with 17 additions and 16 deletions
|
@ -715,7 +715,7 @@ it will display time aligned to the right on the tab bar instead
|
||||||
of the mode line. Replacing `tab-bar-format-tabs' with
|
of the mode line. Replacing `tab-bar-format-tabs' with
|
||||||
`tab-bar-format-tabs-groups' will group tabs on the tab bar."
|
`tab-bar-format-tabs-groups' will group tabs on the tab bar."
|
||||||
:type 'hook
|
:type 'hook
|
||||||
:options '(tab-bar-format-menu-global
|
:options '(tab-bar-format-menu-bar
|
||||||
tab-bar-format-history
|
tab-bar-format-history
|
||||||
tab-bar-format-tabs
|
tab-bar-format-tabs
|
||||||
tab-bar-format-tabs-groups
|
tab-bar-format-tabs-groups
|
||||||
|
@ -730,22 +730,23 @@ of the mode line. Replacing `tab-bar-format-tabs' with
|
||||||
:group 'tab-bar
|
:group 'tab-bar
|
||||||
:version "28.1")
|
:version "28.1")
|
||||||
|
|
||||||
(defun tab-bar-format-menu-global ()
|
(defun tab-bar-menu-bar (event)
|
||||||
"Produce the Menu button for the tab bar that shows a global menu."
|
"Pop up the same menu as displayed by the menu bar.
|
||||||
`((add-tab menu-item (propertize "Menu" 'face 'tab-bar-tab-inactive)
|
Used by `tab-bar-format-menu-bar'."
|
||||||
(lambda (event) (interactive "e")
|
(interactive "e")
|
||||||
(let ((menu (make-sparse-keymap
|
(let ((menu (make-sparse-keymap (propertize "Menu Bar" 'hide t))))
|
||||||
(propertize "Global Menu" 'hide t))))
|
|
||||||
|
|
||||||
(run-hooks 'activate-menubar-hook 'menu-bar-update-hook)
|
(run-hooks 'activate-menubar-hook 'menu-bar-update-hook)
|
||||||
(map-keymap (lambda (key binding)
|
(map-keymap (lambda (key binding)
|
||||||
(when (consp binding)
|
(when (consp binding)
|
||||||
(define-key-after menu (vector key)
|
(define-key-after menu (vector key)
|
||||||
(copy-sequence binding))))
|
(copy-sequence binding))))
|
||||||
(lookup-key global-map [menu-bar]))
|
(menu-bar-keymap))
|
||||||
|
|
||||||
(popup-menu menu event)))
|
(popup-menu menu event)))
|
||||||
:help "Global Menu")))
|
|
||||||
|
(defun tab-bar-format-menu-bar ()
|
||||||
|
"Produce the Menu button for the tab bar that shows the menu bar."
|
||||||
|
`((menu-bar menu-item (propertize "Menu" 'face 'tab-bar-tab-inactive)
|
||||||
|
tab-bar-menu-bar :help "Menu Bar")))
|
||||||
|
|
||||||
(defun tab-bar-format-history ()
|
(defun tab-bar-format-history ()
|
||||||
"Produce back and forward buttons for the tab bar.
|
"Produce back and forward buttons for the tab bar.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue