1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-24 07:20:37 +00:00

Fix easy menu separator in oldXMenu

* lisp/emacs-lisp/easymenu.el (easy-menu-convert-item-1): Replace a
string of dash with a menu separator as the doc says.  (Bug#59370)
This commit is contained in:
Manuel Giraud 2022-11-18 22:58:19 +01:00 committed by Stefan Kangas
parent b0fa3b1a1f
commit 2b123edcf6

View File

@ -390,10 +390,13 @@ ITEM defines an item as in `easy-menu-define'."
(let ((key (easy-menu-intern name)))
(cons key
(and (not remove)
(cons 'menu-item
(cons label
(and name
(cons command prop)))))))))
(if (and (stringp label)
(seq-every-p (lambda (c) (char-equal c ?-)) label))
menu-bar-separator
(cons 'menu-item
(cons label
(and name
(cons command prop))))))))))
(defun easy-menu-define-key (menu key item &optional before)
"Add binding in MENU for KEY => ITEM. Similar to `define-key-after'.