From dfd11da7903c32515c8a886e33db9e04290d9cd6 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 19 Aug 1994 07:06:30 +0000 Subject: [PATCH] (read_char): Don't show buffer-events to the user. Handle chars over 255 in dribble files. --- src/keyboard.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/keyboard.c b/src/keyboard.c index ff26a4e414b..e916bc7ee09 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1715,9 +1715,13 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) start_polling (); - /* Don't wipe the echo area for a trivial event. */ - if (XTYPE (c) != Lisp_Buffer) - echo_area_glyphs = 0; + /* Buffer switch events are only for internal wakeups + so don't show them to the user. */ + if (XTYPE (c) == Lisp_Buffer) + return c; + + /* Wipe the echo area. */ + echo_area_glyphs = 0; /* Handle things that only apply to characters. */ if (XTYPE (c) == Lisp_Int) @@ -1742,7 +1746,12 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) if (dribble) { if (XTYPE (c) == Lisp_Int) - putc (XINT (c), dribble); + { + if (XUINT (c) < 0x100) + putc (XINT (c), dribble); + else + fprintf (dribble, " 0x%x", XUINT (c)); + } else { Lisp_Object dribblee; -- 2.39.5