emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/keyboard.c,v


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/src/keyboard.c,v
Date: Sat, 10 Mar 2007 04:57:19 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      07/03/10 04:57:19

Index: keyboard.c
===================================================================
RCS file: /sources/emacs/emacs/src/keyboard.c,v
retrieving revision 1.893
retrieving revision 1.894
diff -u -b -r1.893 -r1.894
--- keyboard.c  8 Mar 2007 22:58:08 -0000       1.893
+++ keyboard.c  10 Mar 2007 04:57:18 -0000      1.894
@@ -2450,6 +2450,17 @@
 static Lisp_Object kbd_buffer_get_event ();
 static void record_char ();
 
+static Lisp_Object help_form_saved_window_configs;
+static Lisp_Object
+read_char_help_form_unwind (arg)
+{
+  Lisp_Object window_config = XCAR (help_form_saved_window_configs);
+  help_form_saved_window_configs = XCDR (help_form_saved_window_configs);
+  if (!NILP (window_config))
+    Fset_window_configuration (window_config);
+  return Qnil;
+}
+
 #ifdef MULTI_KBOARD
 static jmp_buf wrong_kboard_jmpbuf;
 #endif
@@ -3319,8 +3330,10 @@
       Lisp_Object tem0;
       count = SPECPDL_INDEX ();
 
-      record_unwind_protect (Fset_window_configuration,
-                            Fcurrent_window_configuration (Qnil));
+      help_form_saved_window_configs
+       = Fcons (Fcurrent_window_configuration (Qnil),
+                help_form_saved_window_configs);
+      record_unwind_protect (read_char_help_form_unwind, Qnil);
 
       tem0 = Feval (Vhelp_form);
       if (STRINGP (tem0))
@@ -3328,7 +3341,12 @@
 
       cancel_echoing ();
       do
+       {
        c = read_char (0, 0, 0, Qnil, 0, NULL);
+         if (EVENT_HAS_PARAMETERS (c)
+             && EQ (EVENT_HEAD_KIND (EVENT_HEAD (c)), Qmouse_click))
+           XSETCAR (help_form_saved_window_configs, Qnil);
+       }
       while (BUFFERP (c));
       /* Remove the help from the frame */
       unbind_to (count, Qnil);
@@ -11335,6 +11353,9 @@
   menu_bar_items_vector = Qnil;
   staticpro (&menu_bar_items_vector);
 
+  help_form_saved_window_configs = Qnil;
+  staticpro (&help_form_saved_window_configs);
+
   defsubr (&Scurrent_idle_time);
   defsubr (&Sevent_convert_list);
   defsubr (&Sread_key_sequence);




reply via email to

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