emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r111335: * keyboard.c (record_asynch_


From: Dmitry Antipov
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111335: * keyboard.c (record_asynch_buffer_change): Initialize an event
Date: Wed, 26 Dec 2012 13:40:45 +0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111335
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Wed 2012-12-26 13:40:45 +0400
message:
  * keyboard.c (record_asynch_buffer_change): Initialize an event
  only if it's really needed.
  * frame.h (enum output_method): Remove output_mac member since
  it's a leftover from the deleted code.
  * frame.c (Fframep): Adjust user here ...
  * terminal.c (Fterminal_live_p): ... and here.
  * coding.c (Qmac): Now here because it's only used to denote
  end-of-line encoding type.
  (syms_of_coding): DEFSYM it.
  * frame.h (Qmac): Remove duplicated declaration.
modified:
  src/ChangeLog
  src/coding.c
  src/frame.c
  src/frame.h
  src/keyboard.c
  src/terminal.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-12-26 02:45:43 +0000
+++ b/src/ChangeLog     2012-12-26 09:40:45 +0000
@@ -1,3 +1,16 @@
+2012-12-26  Dmitry Antipov  <address@hidden>
+
+       * keyboard.c (record_asynch_buffer_change): Initialize an event
+       only if it's really needed.
+       * frame.h (enum output_method): Remove output_mac member since
+       it's a leftover from the deleted code.
+       * frame.c (Fframep): Adjust user here ...
+       * terminal.c (Fterminal_live_p): ... and here.
+       * coding.c (Qmac): Now here because it's only used to denote
+       end-of-line encoding type.
+       (syms_of_coding): DEFSYM it.
+       * frame.h (Qmac): Remove duplicated declaration.
+
 2012-12-26  Paul Eggert  <address@hidden>
 
        * window.c (select_window_1): Now static, since it's used only here.

=== modified file 'src/coding.c'
--- a/src/coding.c      2012-12-19 15:52:48 +0000
+++ b/src/coding.c      2012-12-26 09:40:45 +0000
@@ -301,7 +301,7 @@
 
 static Lisp_Object Qcoding_system, Qeol_type;
 static Lisp_Object Qcoding_aliases;
-Lisp_Object Qunix, Qdos;
+Lisp_Object Qunix, Qdos, Qmac;
 Lisp_Object Qbuffer_file_coding_system;
 static Lisp_Object Qpost_read_conversion, Qpre_write_conversion;
 static Lisp_Object Qdefault_char;
@@ -10303,6 +10303,7 @@
   DEFSYM (Qeol_type, "eol-type");
   DEFSYM (Qunix, "unix");
   DEFSYM (Qdos, "dos");
+  DEFSYM (Qmac, "mac");
 
   DEFSYM (Qbuffer_file_coding_system, "buffer-file-coding-system");
   DEFSYM (Qpost_read_conversion, "post-read-conversion");

=== modified file 'src/frame.c'
--- a/src/frame.c       2012-12-07 08:13:49 +0000
+++ b/src/frame.c       2012-12-26 09:40:45 +0000
@@ -60,7 +60,7 @@
 Lisp_Object Qframep, Qframe_live_p;
 Lisp_Object Qicon, Qmodeline;
 Lisp_Object Qonly, Qnone;
-Lisp_Object Qx, Qw32, Qmac, Qpc, Qns;
+Lisp_Object Qx, Qw32, Qpc, Qns;
 Lisp_Object Qvisible;
 Lisp_Object Qdisplay_type;
 static Lisp_Object Qbackground_mode;
@@ -225,8 +225,6 @@
       return Qw32;
     case output_msdos_raw:
       return Qpc;
-    case output_mac:
-      return Qmac;
     case output_ns:
       return Qns;
     default:

=== modified file 'src/frame.h'
--- a/src/frame.h       2012-12-06 13:48:11 +0000
+++ b/src/frame.h       2012-12-26 09:40:45 +0000
@@ -46,7 +46,6 @@
   output_x_window,
   output_msdos_raw,
   output_w32,
-  output_mac,
   output_ns
 };
 
@@ -1178,7 +1177,7 @@
 extern Lisp_Object Qleft_fringe, Qright_fringe;
 extern Lisp_Object Qheight, Qwidth;
 extern Lisp_Object Qminibuffer, Qmodeline;
-extern Lisp_Object Qx, Qw32, Qmac, Qpc, Qns;
+extern Lisp_Object Qx, Qw32, Qpc, Qns;
 extern Lisp_Object Qvisible;
 extern Lisp_Object Qdisplay_type;
 

=== modified file 'src/keyboard.c'
--- a/src/keyboard.c    2012-12-11 06:08:53 +0000
+++ b/src/keyboard.c    2012-12-26 09:40:45 +0000
@@ -6700,37 +6700,35 @@
 void
 record_asynch_buffer_change (void)
 {
-  struct input_event event;
-  Lisp_Object tem;
-  EVENT_INIT (event);
-
-  event.kind = BUFFER_SWITCH_EVENT;
-  event.frame_or_window = Qnil;
-  event.arg = Qnil;
-
   /* We don't need a buffer-switch event unless Emacs is waiting for input.
      The purpose of the event is to make read_key_sequence look up the
      keymaps again.  If we aren't in read_key_sequence, we don't need one,
      and the event could cause trouble by messing up (input-pending-p).
      Note: Fwaiting_for_user_input_p always returns nil when async
      subprocesses aren't supported.  */
-  tem = Fwaiting_for_user_input_p ();
-  if (NILP (tem))
-    return;
-
-  /* Make sure no interrupt happens while storing the event.  */
+  if (!NILP (Fwaiting_for_user_input_p ()))
+    {
+      struct input_event event;
+
+      EVENT_INIT (event);
+      event.kind = BUFFER_SWITCH_EVENT;
+      event.frame_or_window = Qnil;
+      event.arg = Qnil;
+
+      /* Make sure no interrupt happens while storing the event.  */
 #ifdef USABLE_SIGIO
-  if (interrupt_input)
-    kbd_buffer_store_event (&event);
-  else
+      if (interrupt_input)
+       kbd_buffer_store_event (&event);
+      else
 #endif
-    {
-      stop_polling ();
-      kbd_buffer_store_event (&event);
-      start_polling ();
+       {
+         stop_polling ();
+         kbd_buffer_store_event (&event);
+         start_polling ();
+       }
     }
 }
-
+
 /* Read any terminal input already buffered up by the system
    into the kbd_buffer, but do not wait.
 

=== modified file 'src/terminal.c'
--- a/src/terminal.c    2012-11-06 13:26:20 +0000
+++ b/src/terminal.c    2012-12-26 09:40:45 +0000
@@ -398,8 +398,6 @@
       return Qw32;
     case output_msdos_raw:
       return Qpc;
-    case output_mac:
-      return Qmac;
     case output_ns:
       return Qns;
     default:


reply via email to

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