From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Adrian Robert Newsgroups: gmane.emacs.devel Subject: Re: Pretest next week Date: Sat, 24 Jan 2009 10:43:33 +0200 Message-ID: <6362553F-3B8F-4A06-83B5-F59ED69DA70E@gmail.com> References: <87y6x4ue2u.fsf@cyd.mit.edu><87mydjv4bd.fsf@cyd.mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1232786632 13319 80.91.229.12 (24 Jan 2009 08:43:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Jan 2009 08:43:52 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 24 09:45:05 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LQe8T-000089-S8 for ged-emacs-devel@m.gmane.org; Sat, 24 Jan 2009 09:45:02 +0100 Original-Received: from localhost ([127.0.0.1]:44057 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LQe7C-0003Ir-A7 for ged-emacs-devel@m.gmane.org; Sat, 24 Jan 2009 03:43:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LQe76-0003Id-V8 for emacs-devel@gnu.org; Sat, 24 Jan 2009 03:43:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LQe74-0003IR-Dc for emacs-devel@gnu.org; Sat, 24 Jan 2009 03:43:35 -0500 Original-Received: from [199.232.76.173] (port=57260 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LQe74-0003IO-92 for emacs-devel@gnu.org; Sat, 24 Jan 2009 03:43:34 -0500 Original-Received: from nf-out-0910.google.com ([64.233.182.187]:50672) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LQe73-0002NJ-NY for emacs-devel@gnu.org; Sat, 24 Jan 2009 03:43:34 -0500 Original-Received: by nf-out-0910.google.com with SMTP id c7so927511nfi.26 for ; Sat, 24 Jan 2009 00:43:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:mime-version:in-reply-to :references:content-type:message-id:content-transfer-encoding:from :subject:date:to:x-mailer; bh=B8Q7M9Irm0fSXayhC+YtZnXezL5jYJo7erx6UR7AkVc=; b=GKq9N4aB5/Ck39cWqh8bd/aWCrl8xyzJHEJxCFis8SGe8pmrTIDgUqot3L3PY0hWog X7hM2M/RyKZQqGTw0eXTVd7N/LL7f2wATeYeNaUyhNdaAdb76hLMVDsqDPUdKP7xLnR8 zuCyl3xM8gQqkkfpCoFexqndTcYABKHE0gl+g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:content-type:message-id :content-transfer-encoding:from:subject:date:to:x-mailer; b=lg6PnT2n7vzH2RetBSUxJSPTyWxdEY26B0Pp7XKy0rFTdNznaUxZ1IPa5GUvA46E3e AARuqyiBo+J7T+iPuHTT183/OGnGSsJOwkIYfAOWQTnZSkPktqN/5KVVYUUCRqVJ2t/d tbP5Atw2YG9PHYsHK4Z43ynx+jJll79cQp178= Original-Received: by 10.210.125.13 with SMTP id x13mr762701ebc.56.1232786611764; Sat, 24 Jan 2009 00:43:31 -0800 (PST) Original-Received: from ?192.168.1.101? (h015184.gprs.dnafinland.fi [87.93.15.184]) by mx.google.com with ESMTPS id 7sm11854957eyb.41.2009.01.24.00.43.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 24 Jan 2009 00:43:30 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.753.1) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:108179 Archived-At: 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.