diff src/gui-x.c @ 280:7df0dd720c89 r21-0b38

Import from CVS: tag r21-0b38
author cvs
date Mon, 13 Aug 2007 10:32:22 +0200
parents c5d627a313b1
children 558f606b08ae
line wrap: on
line diff
--- a/src/gui-x.c	Mon Aug 13 10:31:30 2007 +0200
+++ b/src/gui-x.c	Mon Aug 13 10:32:22 2007 +0200
@@ -36,6 +36,7 @@
 #include "frame.h"
 #include "gui.h"
 #include "opaque.h"
+#include "bytecode.h"		/* for struct Lisp_Compiled_Function */
 
 #ifdef HAVE_POPUPS
 Lisp_Object Qmenu_no_selection_hook;
@@ -258,7 +259,12 @@
       fn = Qrun_hooks;
       arg = Qmenu_no_selection_hook;
     }
-  else if (SYMBOLP (data))
+  else if (SYMBOLP (data)
+	   /* poor man's commandp */
+	   || (COMPILED_FUNCTIONP (data)
+	       && XCOMPILED_FUNCTION (data)->flags.interactivep)
+	   || (EQ (XCAR (data), Qlambda)
+	       && !NILP (Fassq (Qinteractive, Fcdr (Fcdr (data))))))
     {
       fn = Qcall_interactively;
       arg = data;