view lib-src/leditcfns.c @ 39689:0572449a62be

(Fkeymap_prompt, Fcurrent_active_maps): New funs. (accessible_keymaps_1): New function. (Faccessible_keymaps, accessible_keymaps_char_table): Use it. (Fwhere_is_internal): Use Fcurrent_active_maps. (Fdescribe_buffer_bindings): Renamed from describe_buffer_bindings. Insert in current buffer rather than standard-output. Don't call `help-mode'. Export to elisp. (describe_buffer_bindings): New wrapper. (syms_of_keymap): Defsubr Skeymap_prompt, Scurrent_active_maps and Sdescribe_buffer_bindings.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 08 Oct 2001 09:47:10 +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);
    }