view lib-src/leditcfns.c @ 4649:3972966a4588

Kill buffer if directory name misspelled and user doesn't want to create it. Robert Delius Royar, Rodney Sparapani and I want this behaviour, as far as I can tell; Stephen Turnbull doesn't. lisp/ChangeLog addition: 2009-07-12 Aidan Kehoe <kehoea@parhasard.net> * files.el (after-find-file): If the answer to "The directory containing %s does not exist. Create?" is no, kill the current buffer, since the user probably just misspelled the directory name. Thank you Rodney Sparapani!
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 12 Jul 2009 14:20:55 +0100
parents 376386a54a3c
children
line wrap: on
line source

/* Synched up with: FSF 19.28. */

#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);
    }