view lib-src/leditcfns.c @ 22945:58a8427745ec

(Vthis_command): Renamed from this_command. (real_this_command): New variable, but not a Lisp variable; updated like Vthis_command, but never altered by Lisp programs. (command_loop_1): Use real_this_command to set Vreal_last_command. (read_char): When input method returns no chars, call cancel_echoing. Restore the previous echo area message and this_command_keys, too. (Vinput_method_previous_message): New variable. (syms_of_keyboard): Set up lisp variable. (Qinput_method_exit_on_first_char, Qinput_method_use_echo_area): New variables. (syms_of_keyboard): Initialize them. (Fread_key_sequence): New arg COMMAND_LOOP. Bind those variables.
author Richard M. Stallman <rms@gnu.org>
date Sat, 08 Aug 1998 03:13:39 +0000
parents da530eb93c1a
children 695cf19ef79e
line wrap: on
line source

#include <sgtty.h>
#include <signal.h>
#define STRLEN 100
static char str[STRLEN+1] = "%?emacs"; /* extra char for the null */

switch_to_proc(){
    char *ptr = str;
    while (*ptr) ioctl(0, TIOCSTI, ptr++);
    ioctl(0, TIOCSTI, "\n");
    kill(getpid(), SIGTSTP);
    }

set_proc_str(ptr) char *ptr; {
    if (strlen(ptr) <= STRLEN)
	strcpy(str, ptr);
    else
	printf("string too long for set-proc-str: %s\n", ptr);
    }