comparison lisp/easymenu.el @ 2545:9caf26dd924f

[xemacs-hg @ 2005-02-03 05:03:36 by ben] behavior ws #2: menu-related changes menubar.c: New fun to compare menu itext as if the two were normalized. menubar.c: Rename; there are no external callers of this function. Remove unneeded BUFFER argument. Don't downcase. (This will be done in compare-menu-text.) Document that return value may be same string. easymenu.el, map-ynp.el: Use normalize-menu-text not normalize-menu-item-name. menubar-items.el, menubar.el: Move to menubar.el and rewrite for cleanliness. menubar-items.el: Use menu-split-long-menu-and-sort. menubar-items.el, menubar.el: Move to menubar.el. menubar.el: New funs. menubar.el: Split up find-menu-item w/find-menu-item-1, since PARENT is not an external item. Rewrite to use compare-menu-text. menubar.el: Don't normalize items as find-menu-item does not need it. menubar-items.el: Delete old Behavior menu defn, replaced by behavior-menu-filter. Planning to [[Delete many menus from Tools menu -- they have been integrated as part of the behavior system.]] Currently the new Tools menu (very short, just a call to the behavior-menu-filter) is commented out, and the old Toold menu defn remains. Once the new packages are in place (c. 1 or 2 weeks), I'll make the switchover. Use menu-split-long-menu-and-sort.
author ben
date Thu, 03 Feb 2005 05:03:45 +0000
parents 7039e6323819
children 263a354405ed
comparison
equal deleted inserted replaced
2544:b4a8cd0dd8df 2545:9caf26dd924f
179 (setq mode-popup-menu (if (> (length easy-menu-all-popups) 1) 179 (setq mode-popup-menu (if (> (length easy-menu-all-popups) 1)
180 (cons (easy-menu-title) 180 (cons (easy-menu-title)
181 (reverse easy-menu-all-popups)) 181 (reverse easy-menu-all-popups))
182 (let ((same-as-menu 182 (let ((same-as-menu
183 (car easy-menu-all-popups))) 183 (car easy-menu-all-popups)))
184 (cons (normalize-menu-item-name 184 (cons (normalize-menu-text
185 (car same-as-menu)) 185 (car same-as-menu))
186 (cdr same-as-menu))))) 186 (cdr same-as-menu)))))
187 187
188 (cond ((null current-menubar) 188 (cond ((null current-menubar)
189 ;; Don't add it to a non-existing menubar. 189 ;; Don't add it to a non-existing menubar.
206 mode-popup-menu (if (< (length easy-menu-all-popups) 1) 206 mode-popup-menu (if (< (length easy-menu-all-popups) 1)
207 (cons (easy-menu-title) 207 (cons (easy-menu-title)
208 (reverse easy-menu-all-popups)) 208 (reverse easy-menu-all-popups))
209 (let ((same-as-menu 209 (let ((same-as-menu
210 (car easy-menu-all-popups))) 210 (car easy-menu-all-popups)))
211 (cons (normalize-menu-item-name 211 (cons (normalize-menu-text
212 (car same-as-menu)) 212 (car same-as-menu))
213 (cdr same-as-menu))))) 213 (cdr same-as-menu)))))
214 214
215 (and current-menubar 215 (and current-menubar
216 (assoc (car menu) current-menubar) 216 (assoc (car menu) current-menubar)