Commit graph

66 commits

Author SHA1 Message Date
Richard M. Stallman
da6e3103c4 (easy-menu-intern):
Don't downcase; rather, case-flip the first letter of each word.
2004-11-02 09:26:28 +00:00
Richard M. Stallman
67d170f2d2 (easy-menu-add): Do call x-popup-menu, but only if it's defined. 2004-04-21 19:14:49 +00:00
Stefan Monnier
b1b2ae8162 (easy-menu-add): Make it work in non-X Emacs. 2004-04-09 16:41:36 +00:00
Eli Zaretskii
dffafab086 (easy-menu-define): Doc fix. 2003-12-29 12:05:15 +00:00
Miles Bader
ab5796a9f9 Add arch taglines 2003-09-01 15:45:59 +00:00
Stefan Monnier
dca6b77cab (easy-menu-get-map): Correctly handle non-submap bindings. 2003-04-30 20:53:04 +00:00
Richard M. Stallman
efc13f4638 (easy-menu-define): Don't make a defvar for nil.
(easy-menu-convert-item-1): Doc fix.
(easy-menu-change): Call easy-menu-create-menu.
2003-04-03 23:15:47 +00:00
Stefan Monnier
4a1186d388 (easy-menu-add-item): Align the docstring with the code. 2003-03-24 17:29:20 +00:00
John Paul Wallington
4b0cbff969 (easy-menu-add-item): Don't default to the global map. 2003-03-24 12:21:02 +00:00
Stefan Monnier
26647ce218 (easy-menu-name-match): Catch any error that member-ignore-case might signal.
(easy-menu-add-item): Default to the global map, as documented.
(easy-menu-convert-item-1): Use match-string.
2003-03-16 00:39:23 +00:00
Richard M. Stallman
74c7e66da4 (easy-menu-do-define): Handle nil for SYMBOL.
(easy-menu-define): Doc fix, say SYMBOL can be nil.
2002-12-23 17:59:04 +00:00
Stefan Monnier
0f18f01cab (easy-menu-remove): Add docstring. 2002-09-19 05:12:24 +00:00
Juanma Barranquero
07c209a089 (easy-menu-define): Fix spacing. 2002-09-06 07:13:06 +00:00
Stefan Monnier
e899e3de1e (easy-menu-filter-return):
Handle the case where the filter returns a single menu entry.
(easy-menu-add): Improve docstring.
(easy-menu-current-active-maps): Remove.
(easy-menu-get-map): Use current-active-maps.
2002-08-30 21:55:07 +00:00
Richard M. Stallman
259bf181b5 (easy-menu-popup-menu): Function deleted. 2002-07-07 09:56:08 +00:00
Richard M. Stallman
89fd3098d8 (easy-menu-popup-menu): New function. 2002-07-02 18:49:03 +00:00
Stefan Monnier
9567300236 (easy-menu-make-symbol): Don't treat (lambda () ...) as an expression. 2002-05-15 22:14:16 +00:00
Eli Zaretskii
08ad334280 (easy-menu-add): Doc fix. 2002-05-15 16:49:54 +00:00
Jason Rumney
dd9b56636e (easy-menu-name-match): Match both
displayed text and internal name as string.
2002-05-14 21:20:24 +00:00
Richard M. Stallman
9ef2bee6d0 (easy-menu-intern): Downcase before interning.
(easy-menu-define-key-intern): Function deleted; callers intern
and then call easy-menu-define-key.
(easy-menu-do-add-item): Explicitly intern the key, but not BEFORE.
(easy-menu-define-key): Use easy-menu-name-match to match BEFORE.
(easy-menu-name-match): New function.
(add-submenu): New function.
(easy-menu-get-map-look-for-name): Use easy-menu-name-match.
2002-04-24 23:18:42 +00:00
Stefan Monnier
0847e165c4 (easy-menu-intern): New fun.
(easy-menu-do-define, easy-menu-convert-item-1)
(easy-menu-define-key-intern, easy-menu-get-map): Use it.
(easy-menu-return-item): Only return nil if there is no binding.
2001-12-13 19:03:12 +00:00
Pavel Janík
6a05d05faf Fixes to follow coding conventions. 2001-07-16 11:39:42 +00:00
Gerd Moellmann
5e5b3d4114 (easy-menu-current-active-maps): Test
if symbol is bound before getting its value.
2000-12-14 10:36:42 +00:00
Stefan Monnier
5edf6b5556 (easy-menu-define): Setup indentation.
(easy-menu-current-active-maps): New function.
(easy-menu-get-map): Use it.
Make a proper menu entry when creating a new keymap.
2000-12-13 16:14:49 +00:00
Stefan Monnier
115f38ae50 (easy-menu-convert-item-1): Only intern if the label is a string. 2000-07-14 08:43:32 +00:00
Stefan Monnier
3a4f3f86ef (easy-menu-convert-item-1): Intern the label. 2000-07-14 08:39:48 +00:00
Dave Love
4d6d04b504 Doc fixes.
(easy-menu-remove): Defalias to ignore.
2000-07-13 19:06:25 +00:00
Stefan Monnier
d0acce1e29 (easy-menu-define): Docstring fix.
(easy-menu-do-define): Use `menu-item' format.
Handle case where easy-menu-create-menu returns a symbol.
Manually call the potential top-level filter in the function binding.
(easy-menu-filter-return): New arg NAME.
Convert to a keymap if MENU is an XEmacs menu.
(easy-menu-convert-item-1): New.  Extracted from easy-menu-do-add-item.
(easy-menu-converted-items-table, easy-menu-convert-item): New.
(easy-menu-do-add-item): Use it.
(easy-menu-create-menu): Use easy-menu-convert-item.
Wrap easy-menu-filter-return around any :filter specification.
Don't convert the menu if a filter was specified.
Tell easy-menu-make-symbol not to check for MENU being an expression.
(easy-menu-make-symbol): New arg NOEXP.
2000-07-05 15:40:03 +00:00
Dave Love
b9f5db901f (easy-menu-create-menu, easy-menu-do-add-item): Use keywordp. 2000-05-21 17:26:47 +00:00
Gerd Moellmann
25112054fe (easy-menu-create-menu): Process menu
item help string.
(easy-menu-do-add-item): Ditto.
(easy-menu-define): Extend doc string.
2000-04-09 10:59:46 +00:00
Sam Steingold
6c2599ed01 * emacs-lisp/debug.el (debugger-env-macro):
Use the new backquote syntax.

* emacs-lisp/easymenu.el (easy-menu-make-symbol):
Use the new backquote syntax.
1999-11-12 18:19:39 +00:00
Karl Heuer
fd43ede060 (easy-menu-get-map-look-for-name): New fn.
(easy-menu-get-map): New arg TO-MODIFY helps choose
between local and global maps.
(easy-menu-add-item): Pass TO-MODIFY arg to easy-menu-get-map.
(easy-menu-change): Doc fix.
1999-08-10 16:54:00 +00:00
Gerd Moellmann
2c5c9cb936 (easy-menu-do-add-item): Support for new seperator types. 1999-07-21 21:43:03 +00:00
Richard M. Stallman
3373a131db (easy-menu-get-map): Don't crash if (current-local-map) is nil. 1999-02-18 01:10:46 +00:00
Richard M. Stallman
bec64ef6b8 (easy-menu-get-map): Fix bugs in prev change. 1999-01-15 03:21:44 +00:00
Richard M. Stallman
3de63fb635 (easy-menu-define): Doc fix.
(easy-menu-create-menu): New keyword :included.
(easy-menu-do-add-item): New keyword :included.  SUFFIX may
be an expression, not only a string.  Simulate style `button'.
Use easy-menu-define-key-intern instead of easy-menu-define-key.
(easy-menu-define-key-intern): New function.
(easy-menu-add-item): Understand value returned from
easy-menu-item-present-p and easy-menu-remove-item.
(easy-menu-return-item): New function.
(easy-menu-item-present-p, easy-menu-remove-item): Use it.
1999-01-04 18:53:32 +00:00
Richard M. Stallman
a2c896c3c4 (easy-menu-get-map): Change global map only if this menu exists in the
global map already, and not in the local map.
(easy-menu-do-add-item): Fix error message.
1998-12-29 22:54:37 +00:00
Richard M. Stallman
5e6656e0e6 (easy-menu-get-map): If MENU is nil, use global menu-bar map.
(easy-menu-add-item, easy-menu-remove-item): Argument renamed.
(easy-menu-item-present-p, easy-menu-get-map): Argument renamed.
1998-12-25 06:17:31 +00:00
Richard M. Stallman
545128a805 (easy-menu-do-add-item): Small simplifications.
(easy-menu-precalculate-equivalent-keybindings): New customization variable.
(easy-menu-add): Precalculate key bindings if
`easy-menu-precalculate-equivalent-keybindings' is on.
1998-05-23 04:26:39 +00:00
Richard M. Stallman
168b2d0d5a (easy-menu-change): Add autoload cookie. 1998-05-11 23:34:25 +00:00
Richard M. Stallman
d886825394 (easy-menu-define-key): Fixed bug with BEFORE
argument.  Now it works also if you repeat an identical call to
easy-menu-define-key.
1998-04-28 20:03:07 +00:00
Richard M. Stallman
c78fb6a6fb Use new menu item format. Don't simulate button prefix.
(easy-menu-create-menu): Understand also keywords :active,
:label and :visible.  Don't worry about button prefix.
(easy-menu-button-prefix): Modified value.
(easy-menu-do-add-item): Extensive changes to use new menu item format.
(easy-menu-define-key, easy-menu-always-true): New functions.
(easy-menu-make-symbol): Don't use indirection for symbols.
Property `menu-alias' not set.
(easy-menu-filter, easy-menu-update-button): Deleted.
(easy-menu-add-item): Don't worry about button prefix.
(easy-menu-remove-item): Don't worry about button prefix.
Use `easy-menu-define-key'.
(easy-menu-is-button, easy-menu-have-button): Deleted.
(easy-menu-real-binding, easy-menu-change-prefix): Deleted.
1998-04-24 01:54:09 +00:00
Richard M. Stallman
d016f81992 (easy-menu-do-add-item):
Do the right thing when nil is specified as criterion for activeness.
Fix string used to report an invalid item.
1998-04-21 04:54:46 +00:00
Richard M. Stallman
61ee73836b (easy-menu-change): Handle case of no keywords. 1998-03-03 01:01:55 +00:00
Richard M. Stallman
d566098596 (easy-menu-add-item); The BEFORE argument works
now.  Done by letting `easy-menu-do-add-item' handle it.
(easy-menu-do-add-item): Take argument BEFORE instead of PREV.
Inserts directly in keymap, instead of calling `define-key-after'.
(easy-menu-create-menu): Don't reverse items as
`easy-menu-do-add-item' now puts things at the end of keymaps.
1998-01-30 02:15:13 +00:00
Richard M. Stallman
024bda024c easy-menu-define): Use ` and , read-macros
instead of (` and (,.  Implement :filter.  Doc fix.
(easy-menu-do-define): Call `easy-menu-create-menu' instead of
`easy-menu-create-keymaps'.
(easy-menu-create-keymaps): Replaced by `easy-menu-create-menu'.
(easy-menu-create-menu): New public function.  Replaces
`easy-menu-create-keymaps', but with large changes.
(easy-menu-button-prefix): New constant.
(easy-menu-do-add-item, easy-menu-make-symbol): New functions.
(easy-menu-update-button): Doc fix.
(easy-menu-change): New optional argument BEFORE.
Now just a call to `easy-menu-add-item'.
(easy-menu-add-item, easy-menu-item-present-p)
(easy-menu-remove-item): New public functions.
(easy-menu-get-map, easy-menu-is-button-p, easy-menu-have-button-p)
(easy-menu-real-binding, easy-menu-change-prefix, easy-menu-filter):
New functions.
1998-01-27 20:43:57 +00:00
Richard M. Stallman
f070b8ae20 (easy-menu-create-keymaps):
If two distinct items have the same string, make different
keyx events for them.
1997-09-05 05:45:02 +00:00
Richard M. Stallman
a9f8f395d5 (easy-menu-create-keymaps): If nil is
given as the enable condition, always disable the command.
1997-08-28 03:04:18 +00:00
Richard M. Stallman
e6a6d69799 (easy-menu-create-keymaps): Menu item STYLE toggle (checkbox)
and radio (radio button) are prefixed by "[X] " or
"(*) " respectively, when selected and "[ ] " or "( ) ", when not
selected. In a menu that contain these prefixes, "    " is used
as prefix for items that have no other prefix.

(easy-menu-update-button): New function used as `menu-enable'
property for checkboxes and radio buttons to update the prefixes.

(easy-menu-define): Change documentation string to describe the
new prefixes.
1997-01-02 20:20:22 +00:00
Richard M. Stallman
94ddbbff9b (easy-menu-do-define): Use `x-popup-menu' instead of
non-existing `easy-popup-menu'.
1996-09-11 03:47:43 +00:00