/* Keyboard and mouse input; editor command loop.
Copyright (C) 1985, 1986, 1987, 1988, 1989, 1993, 1994, 1995,
1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007 Free Software Foundation, Inc.
+ 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of GNU Emacs.
during the current critical section. */
int interrupt_input_pending;
-
-#ifdef HAVE_WINDOW_SYSTEM
-/* Make all keyboard buffers much bigger when using X windows. */
-#ifdef MAC_OS8
-/* But not too big (local data > 32K error) if on Mac OS Classic. */
-#define KBD_BUFFER_SIZE 512
-#else
-#define KBD_BUFFER_SIZE 4096
-#endif
-#else /* No X-windows, character input */
#define KBD_BUFFER_SIZE 4096
-#endif /* No X-windows */
#ifdef MULTI_KBOARD
KBOARD *initial_kboard;
/* Save the upper bits here. */
int upper = c & ~0177;
+ if (! ASCII_BYTE_P (c))
+ return c |= ctrl_modifier;
+
c &= 0177;
/* Everything in the columns containing the upper-case letters
/* if redisplay was requested */
if (commandflag >= 0)
{
+ int echo_current = EQ (echo_message_buffer, echo_area_buffer[0]);
+
/* If there is pending input, process any events which are not
user-visible, such as X selection_request events. */
if (input_pending
swallow_events (0);
/* If that cleared input_pending, try again to redisplay. */
}
+
+ /* Prevent the redisplay we just did
+ from messing up echoing of the input after the prompt. */
+ if (commandflag == 0 && echo_current)
+ echo_message_buffer = echo_area_buffer[0];
+
}
/* Message turns off echoing unless more keystrokes turn it on again.
if (n_to_read > sizeof cbuf)
n_to_read = sizeof cbuf;
#else /* no FIONREAD */
-#if defined (USG) || defined (DGUX) || defined(CYGWIN)
+#if defined (USG) || defined(CYGWIN)
/* Read some input if available, but don't wait. */
n_to_read = sizeof cbuf;
fcntl (fileno (tty->input), F_SETFL, O_NDELAY);
);
#ifndef FIONREAD
-#if defined (USG) || defined (DGUX) || defined (CYGWIN)
+#if defined (USG) || defined (CYGWIN)
fcntl (fileno (tty->input), F_SETFL, 0);
-#endif /* USG or DGUX or CYGWIN */
+#endif /* USG or CYGWIN */
#endif /* no FIONREAD */
if (nread <= 0)
tem = XCDR (cachelist);
if (newcache && !NILP (tem))
{
- tem = concat3 (build_string (" ("), tem, build_string (")"));
+ tem = concat2 (build_string (" "), tem);
+ // tem = concat3 (build_string (" ("), tem, build_string (")"));
XSETCDR (cachelist, tem);
}
if (modifiers & shift_modifier
/* Treat uppercase keys as shifted. */
|| (INTEGERP (key)
- & (KEY_TO_CHAR (key)
- < XCHAR_TABLE (current_buffer->downcase_table)->size)
+ && (KEY_TO_CHAR (key)
+ < XCHAR_TABLE (current_buffer->downcase_table)->size)
&& UPPERCASEP (KEY_TO_CHAR (key))))
{
Lisp_Object new_key