annotate lisp/utils/easymenu.el @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents bcdc7deadc19
children c7528f8e288d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 ;;; easymenu.el - Easy menu support for Emacs 19 and XEmacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 ;;
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 12
diff changeset
3 ;; $Id: easymenu.el,v 1.1.1.1 1996/12/18 22:43:01 steve Exp $
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 ;; LCD Archive Entry:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 ;; easymenu|Per Abrahamsen|abraham@iesd.auc.dk|
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 ;; Easy menu support for XEmacs|
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 12
diff changeset
8 ;; $Date: 1996/12/18 22:43:01 $|$Revision: 1.1.1.1 $|~/misc/easymenu.el.gz|
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 ;; Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 12
diff changeset
11 ;;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 12
diff changeset
12 ;; This program is free software; you can redistribute it and/or modify
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 12
diff changeset
13 ;; it under the terms of the GNU General Public License as published by
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 ;; the Free Software Foundation; either version 2, or (at your option)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 ;; any later version.
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 12
diff changeset
16 ;;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 12
diff changeset
17 ;; This program is distributed in the hope that it will be useful,
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 12
diff changeset
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 12
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 12
diff changeset
20 ;; GNU General Public License for more details.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 12
diff changeset
21 ;;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 12
diff changeset
23 ;; along with this program; if not, write to the Free Software
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 12
diff changeset
24 ;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 ;;; Synched up with: Not synched with FSF.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 ;;; In RMS's typical lame-ass way, he removed all support for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 ;;; what he calls "other Emacs versions" from the version of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 ;;; easymenu.el included in FSF. He also incorrectly claims
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 ;;; himself as the author rather than Per Abrahamsen.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 ;; Commentary:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 ;; Easymenu allows you to define menus for both Emacs 19 and XEmacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 ;; This file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 ;; The advantages of using easymenu are:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 ;; - Easier to use than either the Emacs 19 and XEmacs menu syntax.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 ;; - Common interface for Emacs 18, Emacs 19, and XEmacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 ;; (The code does nothing when run under Emacs 18).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 ;; The public functions are:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 ;; - Function: easy-menu-define SYMBOL MAPS DOC MENU
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 ;; SYMBOL is both the name of the variable that holds the menu and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 ;; the name of a function that will present a the menu.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 ;; MAPS is a list of keymaps where the menu should appear in the menubar.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 ;; DOC is the documentation string for the variable.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 ;; MENU is an XEmacs style menu description.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 ;; See the documentation for easy-menu-define for details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 ;; - Function: easy-menu-change PATH NAME ITEMS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 ;; Change an existing menu.
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 12
diff changeset
57 ;; The menu must already exist and be visible on the menu bar.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 ;; PATH is a list of strings used for locating the menu on the menu bar.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 ;; NAME is the name of the menu.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 ;; ITEMS is a list of menu items, as defined in `easy-menu-define'.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 ;; - Function: easy-menu-add MENU [ MAP ]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 ;; Add MENU to the current menubar in MAP.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 ;; - Function: easy-menu-remove MENU
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 ;; Remove MENU from the current menubar.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 ;; Emacs 19 never uses `easy-menu-add' or `easy-menu-remove', menus
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 ;; automatically appear and disappear when the keymaps specified by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 ;; the MAPS argument to `easy-menu-define' are activated.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 ;; XEmacs will bind the map to button3 in each MAPS, but you must
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 ;; explicitly call `easy-menu-add' and `easy-menu-remove' to add and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 ;; remove menus from the menu bar.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 ;;; Code:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 ;;;###autoload
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 (defmacro easy-menu-define (symbol maps doc menu)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 "Define a menu bar submenu in maps MAPS, according to MENU.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 The arguments SYMBOL and DOC are ignored; they are present for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 compatibility only. SYMBOL is not evaluated. In other Emacs versions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 these arguments may be used as a variable to hold the menu data, and a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 doc string for that variable.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 The first element of MENU must be a string. It is the menu bar item name.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 The rest of the elements are menu items.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 A menu item is usually a vector of three elements: [NAME CALLBACK ENABLE]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 NAME is a string--the menu item name.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 CALLBACK is a command to run when the item is chosen,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 or a list to evaluate when the item is chosen.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 ENABLE is an expression; the item is enabled for selection
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 whenever this expression's value is non-nil.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 Alternatively, a menu item may have the form:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 [ NAME CALLBACK [ KEYWORD ARG ] ... ]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 Where KEYWORD is one of the symbol defined below.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 :keys KEYS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 KEYS is a string; a complex keyboard equivalent to this menu item.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 :active ENABLE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 ENABLE is an expression; the item is enabled for selection
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 whenever this expression's value is non-nil.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 :suffix NAME
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 NAME is a string; the name of an argument to CALLBACK.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 :style STYLE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 STYLE is a symbol describing the type of menu item. The following are
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 defined:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 toggle: A checkbox.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 Currently just prepend the name with the string \"Toggle \".
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 radio: A radio button.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 nil: An ordinary menu item.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 :selected SELECTED
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 SELECTED is an expression; the checkbox or radio button is selected
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 whenever this expression's value is non-nil.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 Currently just disable radio buttons, no effect on checkboxes.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 A menu item can be a string. Then that string appears in the menu as
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 unselectable text. A string consisting solely of hyphens is displayed
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 as a solid horizontal line.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 A menu item can be a list. It is treated as a submenu.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 The first element should be the submenu name. That's used as the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 menu item in the top-level menu. The cdr of the submenu list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 is a list of menu items, as above."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 (` (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 (defvar (, symbol) nil (, doc))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 (easy-menu-do-define (quote (, symbol)) (, maps) (, doc) (, menu)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 (defun easy-menu-do-define (symbol maps doc menu)
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
147 (if (featurep 'menubar)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
148 (progn
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
149 (set symbol menu)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
150 (fset symbol (list 'lambda '(e)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
151 doc
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
152 '(interactive "@e")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
153 '(run-hooks 'activate-menubar-hook)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
154 '(setq zmacs-region-stays 't)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
155 (list 'popup-menu symbol))))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157 (fset 'easy-menu-change (symbol-function 'add-menu))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
159 ;; This variable hold the easy-menu mode menus of all major and
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
160 ;; minor modes currently in effect.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 (defvar easy-menu-all-popups nil)
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
162 (make-variable-buffer-local 'easy-menu-all-popups)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 (defun easy-menu-add (menu &optional map)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 "Add MENU to the current menu bar."
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
166 (if (featurep 'menubar)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
167 (progn
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
168 (if easy-menu-all-popups
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
169 (setq easy-menu-all-popups (cons menu easy-menu-all-popups))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
170 (setq easy-menu-all-popups (list menu mode-popup-menu)))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
171 (setq mode-popup-menu menu)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
173 (cond ((null current-menubar)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
174 ;; Don't add it to a non-existing menubar.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
175 nil)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
176 ((assoc (car menu) current-menubar)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
177 ;; Already present.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
178 nil)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
179 ((equal current-menubar '(nil))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
180 ;; Set at left if only contains right marker.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
181 (set-buffer-menubar (list menu nil)))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
182 (t
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
183 ;; Add at right.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
184 (set-buffer-menubar (copy-sequence current-menubar))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
185 (add-menu nil (car menu) (cdr menu)))))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187 (defun easy-menu-remove (menu)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188 "Remove MENU from the current menu bar."
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
189 (if (featurep 'menubar)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
190 (progn
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
191 (setq easy-menu-all-popups (delq menu easy-menu-all-popups)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
192 mode-popup-menu (car easy-menu-all-popups))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
193 (and current-menubar
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
194 (assoc (car menu) current-menubar)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
195 (delete-menu-item (list (car menu)))))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197 (provide 'easymenu)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199 ;;; easymenu.el ends here