view lib-src/leditcfns.c @ 55432:2f1fd122c9fe

2004-05-08 John Wiegley <johnw@newartisans.com> * textmodes/flyspell.el (flyspell-highlight-incorrect-region): Ignore the read-only property when flyspell highlighting is on. Not ignoring it leads to a series of confusing errors. (flyspell-highlight-duplicate-region): Ignore read-only, as above, but also make sure to call flyspell-incorrect-hook. (flyspell-maybe-correct-transposition): Perform transposition test by bit twiddling a string, rather than using a temp buffer. (flyspell-maybe-correct-doubling): Use a string rather than a temp buffer. This is also the original version of the code, which could not be checked in before due to a previous lack of assignment papers. This version has seen heavy usage on my system for several years now.
author John Wiegley <johnw@newartisans.com>
date Sat, 08 May 2004 12:48:49 +0000
parents 695cf19ef79e
children 375f2633d815
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);
    }

/* arch-tag: eb7ae804-0d6e-4077-ab42-7173821410c3
   (do not change this comment) */