/[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.59 by monnier, Mon Mar 24 17:28:10 2003 UTC revision 1.60 by rms, Thu Apr 3 23:15:05 2003 UTC
# Line 148  as a solid horizontal line. Line 148  as a solid horizontal line.
148    
149  A menu item can be a list with the same format as MENU.  This is a submenu."  A menu item can be a list with the same format as MENU.  This is a submenu."
150    `(progn    `(progn
151       (defvar ,symbol nil ,doc)       ,(if symbol `(defvar ,symbol nil ,doc))
152       (easy-menu-do-define (quote ,symbol) ,maps ,doc ,menu)))       (easy-menu-do-define (quote ,symbol) ,maps ,doc ,menu)))
153    
154  ;;;###autoload  ;;;###autoload
# Line 266  would always fail because the key is `eq Line 266  would always fail because the key is `eq
266                 easy-menu-converted-items-table)))                 easy-menu-converted-items-table)))
267    
268  (defun easy-menu-convert-item-1 (item)  (defun easy-menu-convert-item-1 (item)
269    "Parse an item description and add the item to a keymap.    "Parse an item description and convert it to a menu keymap element.
270  This is the function that is used for item definition by the other easy-menu  ITEM defines an item as in `easy-menu-define'."
 functions.  
 MENU is a sparse keymap i.e. a list starting with the symbol `keymap'.  
 ITEM defines an item as in `easy-menu-define'.  
 Optional argument BEFORE is nil or a key in MENU.  If BEFORE is not nil  
 put item before BEFORE in MENU, otherwise if item is already present in  
 MENU, just change it, otherwise put it last in MENU."  
271    (let (name command label prop remove help)    (let (name command label prop remove help)
272      (cond      (cond
273       ((stringp item)                    ; An item or separator.       ((stringp item)                    ; An item or separator.
# Line 460  the submenu named BEFORE, otherwise add Line 454  the submenu named BEFORE, otherwise add
454    
455  Either call this from `menu-bar-update-hook' or use a menu filter,  Either call this from `menu-bar-update-hook' or use a menu filter,
456  to implement dynamic menus."  to implement dynamic menus."
457    (easy-menu-add-item nil path (cons name items) before))    (easy-menu-add-item nil path (easy-menu-create-menu name items) before))
458    
459  ;; XEmacs needs the following two functions to add and remove menus.  ;; XEmacs needs the following two functions to add and remove menus.
460  ;; In Emacs this is done automatically when switching keymaps, so  ;; In Emacs this is done automatically when switching keymaps, so

Legend:
Removed from v.1.59  
changed lines
  Added in v.1.60

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