/[emacs]/emacs/lisp/emacs-lisp/easymenu.el
ViewVC logotype

Diff of /emacs/lisp/emacs-lisp/easymenu.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.45.4.1 by eliz, Wed May 15 16:44:32 2002 UTC revision 1.45.4.2 by rms, Thu Aug 15 20:21:32 2002 UTC
# Line 514  NAME should be a string, the name of the Line 514  NAME should be a string, the name of the
514    "In menu MENU try to look for menu item with name NAME.    "In menu MENU try to look for menu item with name NAME.
515  If a menu item is found, return (NAME . item), otherwise return nil.  If a menu item is found, return (NAME . item), otherwise return nil.
516  If item is an old format item, a new format item is returned."  If item is an old format item, a new format item is returned."
517    (let ((item (lookup-key menu (vector (intern name))))    (let ((item (lookup-key menu (vector (intern name))))b
518          ret enable cache label)          ret enable cache label)
519      (cond      (cond
      ((or (keymapp item) (eq (car-safe item) 'menu-item))  
       (cons name item))                 ; Keymap or new menu format  
520       ((stringp (car-safe item))       ((stringp (car-safe item))
521        ;; This is the old menu format. Convert it to new format.        ;; This is the old menu format. Convert it to new format.
522        (setq label (car item))        (setq label (car item))
# Line 532  If item is an old format item, a new for Line 530  If item is an old format item, a new for
530        (and (symbolp item) (setq enable (get item 'menu-enable)) ; Got enable        (and (symbolp item) (setq enable (get item 'menu-enable)) ; Got enable
531             (setq ret (cons :enable (cons enable ret))))             (setq ret (cons :enable (cons enable ret))))
532        (if cache (setq ret (cons cache ret)))        (if cache (setq ret (cons cache ret)))
533        (cons name (cons 'menu-enable (cons label (cons item ret))))))))        (cons name (cons 'menu-enable (cons label (cons item ret)))))
534         (item ; (or (symbolp item) (keymapp item) (eq (car-safe item) 'menu-item))
535          (cons name item)))))
536    
537  (defun easy-menu-get-map-look-for-name (name submap)  (defun easy-menu-get-map-look-for-name (name submap)
538    (while (and submap (not (or (equal (car-safe (cdr-safe (car submap))) name)    (while (and submap (not (or (equal (car-safe (cdr-safe (car submap))) name)

Legend:
Removed from v.1.45.4.1  
changed lines
  Added in v.1.45.4.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26