emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pretest next week


From: Adrian Robert
Subject: Re: Pretest next week
Date: Sat, 24 Jan 2009 10:43:33 +0200


On Jan 22, 2009, at 9:33 PM, Stefan Monnier wrote:

1) Complete removal of all Feval() calls in bad places as discussed earlier
on this list.  A quick check reveals four places, relating  to: emacs
termination, deadkey input handling, toolbar toggle, and preferences-help.

- Mostly straightforward (but taking some time) by using custom
nonascii-keystroke' events,

Sound right.

except for the case of input-method handling when in isearch mode,
where passing such an event breaks out of the isearch entry; I could
use some help on this.

Most likely those events should not be handled by the global-map, but
instead either directly by the C code (e.g. in kbd_buffer_get_event), or
via special-event-map, or via input-decode-map.

I tried using special-event-map, following the example of delete- frame, but I still get a "Wrong type argument: commandp, ns-echo- working-text" message. I'm trying to get ns-echo-working-text called non-interactively so it can make some text changes in the echo area. Is there any way to do this?

(See ns-win.el for defn of ns-echo-working-text.)


Index: keyboard.c
===================================================================
RCS file: /sources/emacs/emacs/src/keyboard.c,v
retrieving revision 1.990
diff -u -p -r1.990 keyboard.c
--- keyboard.c  12 Jan 2009 09:21:19 -0000      1.990
+++ keyboard.c  24 Jan 2009 08:36:25 -0000
@@ -477,6 +477,9 @@ Lisp_Object Qsave_session;
 #ifdef HAVE_DBUS
 Lisp_Object Qdbus_event;
 #endif
+#ifdef HAVE_NS
+Lisp_Object Qns_echo_working_text;
+#endif
 /* Lisp_Object Qmouse_movement; - also an event header */

 /* Properties of event headers.  */
@@ -4113,6 +4116,14 @@ kbd_buffer_get_event (kbp, used_mouse_me
 #endif
        }

+#if defined (HAVE_NS)
+      else if (event->kind == NS_TEXT_EVENT)
+        {
+         obj = Fcons (intern ("ns-echo-working-text"), Qnil);
+         kbd_fetch_ptr = event + 1;
+        }
+#endif
+
 #if defined (HAVE_X11) || defined (HAVE_NTGUI) \
     || defined (HAVE_NS)
       else if (event->kind == DELETE_WINDOW_EVENT)
@@ -11596,6 +11607,9 @@ struct event_head head_table[] = {
   {&Qdelete_frame,        "delete-frame",        &Qdelete_frame},
   {&Qiconify_frame,       "iconify-frame",       &Qiconify_frame},
{&Qmake_frame_visible, "make-frame-visible", &Qmake_frame_visible},
+#ifdef HAVE_NS
+ {&Qns_echo_working_text,"ns-echo-working- text",&Qns_echo_working_text},
+#endif
   /* `select-window' should be handled just like `switch-frame'
      in read_key_sequence.  */
   {&Qselect_window,       "select-window",       &Qswitch_frame}
@@ -11682,6 +11696,11 @@ syms_of_keyboard ()
   staticpro (&Qdbus_event);
 #endif

+#ifdef HAVE_NS
+  Qns_echo_working_text = intern("ns-echo-working-text");
+  staticpro (&Qns_echo_working_text);
+#endif
+
   Qmenu_enable = intern ("menu-enable");
   staticpro (&Qmenu_enable);
   Qmenu_alias = intern ("menu-alias");
@@ -12382,6 +12401,8 @@ keys_of_keyboard ()

   initial_define_lispy_key (Vspecial_event_map, "delete-frame",
                            "handle-delete-frame");
+  initial_define_lispy_key (Vspecial_event_map, "ns-echo-working-text",
+                           "ns-echo-working-text");
/* Here we used to use `ignore-event' which would simple set prefix-arg to
      current-prefix-arg, as is done in `handle-switch-frame'.
      But `handle-switch-frame is not run from the special-map.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]