X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/669de2fb7f2c4a99718e67c65bda03f521e979cb..c90e7e43b102a9732ea4ef7a292f51cec881d463:/src/keyboard.c diff --git a/src/keyboard.c b/src/keyboard.c index f016a1283e..268d782e47 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -131,8 +131,8 @@ KBOARD the_only_kboard; #endif /* Non-nil disable property on a command means - do not execute it; call disabled-command-hook's value instead. */ -Lisp_Object Qdisabled, Qdisabled_command_hook; + do not execute it; call disabled-command-function's value instead. */ +Lisp_Object Qdisabled, Qdisabled_command_function; #define NUM_RECENT_KEYS (100) int recent_keys_index; /* Index for storing next element into recent_keys */ @@ -607,7 +607,7 @@ int flow_control; /* We are unable to use interrupts if FIONREAD is not available, so flush SIGIO so we won't try. */ -#ifndef FIONREAD +#if !defined (FIONREAD) || defined(HAVE_CARBON) #ifdef SIGIO #undef SIGIO #endif @@ -802,6 +802,21 @@ echo_dash () == SCHARS (current_kboard->echo_string)) return; + /* Do nothing if we have already put a dash at the end. */ + if (SCHARS (current_kboard->echo_string) > 1) + { + Lisp_Object last_char, prev_char, idx; + + idx = make_number (SCHARS (current_kboard->echo_string) - 2); + prev_char = Faref (current_kboard->echo_string, idx); + + idx = make_number (SCHARS (current_kboard->echo_string) - 1); + last_char = Faref (current_kboard->echo_string, idx); + + if (XINT (last_char) == '-' && XINT (prev_char) != ' ') + return; + } + /* Put a dash at the end of the buffer temporarily, but make it go away when the next character is added. */ current_kboard->echo_string = concat2 (current_kboard->echo_string, @@ -1074,6 +1089,19 @@ single_kboard_state () #endif } +/* If we're in single_kboard state for kboard KBOARD, + get out of it. */ + +void +not_single_kboard_state (kboard) + KBOARD *kboard; +{ +#ifdef MULTI_KBOARD + if (kboard == current_kboard) + single_kboard = 0; +#endif +} + /* Maintain a stack of kboards, so other parts of Emacs can switch temporarily to the kboard of a given frame and then revert to the previous status. */ @@ -9637,9 +9665,9 @@ a special event, so ignore the prefix argument and don't clear it. */) tem = Fget (cmd, Qdisabled); if (!NILP (tem) && !NILP (Vrun_hooks)) { - tem = Fsymbol_value (Qdisabled_command_hook); + tem = Fsymbol_value (Qdisabled_command_function); if (!NILP (tem)) - return call1 (Vrun_hooks, Qdisabled_command_hook); + return call1 (Vrun_hooks, Qdisabled_command_function); } } @@ -10160,9 +10188,7 @@ void stuff_buffered_input (stuffstring) Lisp_Object stuffstring; { -/* stuff_char works only in BSD, versions 4.2 and up. */ -#ifdef BSD_SYSTEM -#ifndef BSD4_1 +#ifdef SIGTSTP /* stuff_char is defined if SIGTSTP. */ register unsigned char *p; if (STRINGP (stuffstring)) @@ -10178,7 +10204,10 @@ stuff_buffered_input (stuffstring) /* Anything we have read ahead, put back for the shell to read. */ /* ?? What should this do when we have multiple keyboards?? - Should we ignore anything that was typed in at the "wrong" kboard? */ + Should we ignore anything that was typed in at the "wrong" kboard? + + rms: we should stuff everything back into the kboard + it came from. */ for (; kbd_fetch_ptr != kbd_store_ptr; kbd_fetch_ptr++) { @@ -10191,8 +10220,7 @@ stuff_buffered_input (stuffstring) } input_pending = 0; -#endif -#endif /* BSD_SYSTEM and not BSD4_1 */ +#endif /* SIGTSTP */ } void @@ -10754,8 +10782,8 @@ syms_of_keyboard () Qtimer_event_handler = intern ("timer-event-handler"); staticpro (&Qtimer_event_handler); - Qdisabled_command_hook = intern ("disabled-command-hook"); - staticpro (&Qdisabled_command_hook); + Qdisabled_command_function = intern ("disabled-command-function"); + staticpro (&Qdisabled_command_function); Qself_insert_command = intern ("self-insert-command"); staticpro (&Qself_insert_command); @@ -11252,6 +11280,7 @@ The elements of the list are event types that may have menu bar bindings. */); doc: /* Per-terminal keymap that overrides all other local keymaps. If this variable is non-nil, it is used as a keymap instead of the buffer's local map, and the minor mode keymaps and text property keymaps. +It also overrides `overriding-local-map'. This variable is intended to let commands such as `universal-argument' set up a different keymap for reading the next command. */); @@ -11343,8 +11372,8 @@ It's called with one argument, the help string to display. */); After a command is executed, if point is moved into a region that has special properties (e.g. composition, display), we adjust point to -the boundary of the region. But, several special commands sets this -variable to non-nil, then we suppress the point adjustment. +the boundary of the region. But, when a command sets this variable to +non-nil, we suppress the point adjustment. This variable is set to nil before reading a command, and is checked just after executing the command. */);