2000-06-26 Gerd Moellmann <gerd@gnu.org>
+ * keymap.c (get_keyelt): For menu-items containing a `:filter
+ FILTER', apply FILTER to the menu-item's definition to get the
+ real definition to use.
+
+ * lisp.h (QCfilter): External declaration.
+
* xfns.c (Fimage_size): New function.
(syms_of_xfns): Defsubr it.
include time.h, done by systime.h.
[__FreeBSD__]: Remove redundant includes.
- * callproc.c: (setpgrp): Undefine before defining.
+ * callproc.c (setpgrp): Undefine before defining.
(delete_temp_file): Return Qnil to avoid warning.
* config.in (HAVE_TERM_H, HAVE_STRUCT_TIMEZONE): Add.
/* If the keymap contents looks like (menu-item name . DEFN)
or (menu-item name DEFN ...) then use DEFN.
- This is a new format menu item.
- */
+ This is a new format menu item. */
else if (EQ (XCAR (object), Qmenu_item))
{
if (CONSP (XCDR (object)))
{
+ Lisp_Object tem;
+
object = XCDR (XCDR (object));
+ tem = object;
if (CONSP (object))
object = XCAR (object);
+
+ /* If there's a `:filter FILTER', apply FILTER to the
+ menu-item's definition to get the real definition to
+ use. */
+ for (; CONSP (tem) && CONSP (XCDR (tem)); tem = XCDR (tem))
+ if (EQ (XCAR (tem), QCfilter))
+ {
+ Lisp_Object filter;
+ filter = XCAR (XCDR (tem));
+ filter = list2 (filter, list2 (Qquote, object));
+ object = menu_item_eval_property (filter);
+ break;
+ }
}
else
/* Invalid keymap */