* lisp/printing.el (pr-global-menubar): Fix duplicate menu problem.
In Emacs 27.1 Print menu items were moved to a submenu of the File menu. The Printing package (lisp/printing.el) replaces the Print menu (via the function: pr-global-menubar). The latter needs to be updated to reflect the changes; otherwise, a second Print (sub)menu is created at the end of the File menu. Copyright-paperwork-exempt: yes
This commit is contained in:
parent
006628df18
commit
7be75f17e7
1 changed files with 9 additions and 18 deletions
|
@ -1081,24 +1081,15 @@ Used by `pr-menu-bind' and `pr-update-menus'.")
|
|||
"Specify Printing menu-bar entry.")
|
||||
|
||||
(defun pr-global-menubar (menu-spec)
|
||||
(let ((menu-file '("menu-bar" "file")))
|
||||
(cond
|
||||
(pr-menu-print-item
|
||||
(easy-menu-add-item global-map menu-file
|
||||
(easy-menu-create-menu "Print" menu-spec)
|
||||
"print-buffer")
|
||||
(dolist (item '("print-buffer" "print-region"
|
||||
"ps-print-buffer-faces" "ps-print-region-faces"
|
||||
"ps-print-buffer" "ps-print-region"))
|
||||
(easy-menu-remove-item global-map menu-file item))
|
||||
(setq pr-menu-print-item nil
|
||||
pr-menu-bar (vector 'menu-bar
|
||||
(easy-menu-intern (nth 1 menu-file))
|
||||
(easy-menu-intern "Print"))))
|
||||
(t
|
||||
(easy-menu-add-item global-map menu-file
|
||||
(easy-menu-create-menu "Print" menu-spec)))
|
||||
)))
|
||||
(let ((menu-file '("menu-bar" "file"))
|
||||
(submenu-path [menu-bar file Print])
|
||||
(submenu (easy-menu-create-menu "Print" menu-spec)))
|
||||
(cond (pr-menu-print-item
|
||||
(easy-menu-add-item global-map menu-file submenu "Print")
|
||||
(easy-menu-remove-item global-map menu-file "print")
|
||||
(setq pr-menu-print-item nil
|
||||
pr-menu-bar submenu-path))
|
||||
(t (easy-menu-add-item global-map menu-file submenu)))))
|
||||
|
||||
(defun pr-menu-position (entry index horizontal)
|
||||
(let ((pos (cdr (mouse-pixel-position))))
|
||||
|
|
Loading…
Add table
Reference in a new issue