Mercurial > hg > xemacs-beta
diff lisp/easymenu.el @ 5473:ac37a5f7e5be
Merge with trunk.
author | Mats Lidell <matsl@xemacs.org> |
---|---|
date | Thu, 17 Mar 2011 23:42:59 +0100 |
parents | b9167d522a9a f00192e1cd49 |
children | cc6f0266bc36 |
line wrap: on
line diff
--- a/lisp/easymenu.el Tue Feb 22 22:56:02 2011 +0100 +++ b/lisp/easymenu.el Thu Mar 17 23:42:59 2011 +0100 @@ -192,7 +192,7 @@ ; (default-value 'mode-popup-menu) easy-menu-all-popups) (when (featurep 'menubar) ;; Save the existing mode-popup-menu, if it's been changed. - (when (and (zerop (length easy-menu-all-popups)) + (when (and (eql (length easy-menu-all-popups) 0) (not (equal (default-value 'mode-popup-menu) mode-popup-menu))) (push mode-popup-menu easy-menu-all-popups)) ;; Add the menu to our list of all the popups for the buffer. @@ -200,7 +200,7 @@ ;; If there are multiple popup menus available, make the popup menu ;; normally shown with button-3 a menu of them. If there is just one, ;; make that button show it, and no super-menu. - (setq mode-popup-menu (if (= 1 (length easy-menu-all-popups)) + (setq mode-popup-menu (if (eql 1 (length easy-menu-all-popups)) (car easy-menu-all-popups) (cons (easy-menu-title) (reverse easy-menu-all-popups)))) @@ -227,13 +227,13 @@ ;; If there are multiple popup menus available, make the popup menu ;; normally shown with button-3 a menu of them. If there is just one, ;; make that button show it, and no super-menu. - mode-popup-menu (if (= 1 (length easy-menu-all-popups)) + mode-popup-menu (if (eql 1 (length easy-menu-all-popups)) (car easy-menu-all-popups) (cons (easy-menu-title) (reverse easy-menu-all-popups)))) ;; If we've just set mode-popup-menu to an empty menu, change that menu ;; to its default value (without intervention from easy-menu). - (if (zerop (length easy-menu-all-popups)) + (if (eql (length easy-menu-all-popups) 0) (setq mode-popup-menu (default-value 'mode-popup-menu))) (and current-menubar (assoc (car menu) current-menubar)