diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2016-09-06 17:27:24 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-09-06 17:29:07 -0700 |
commit | 5d2ac7435de679559aae0ede1d8b6f1750c09e68 (patch) | |
tree | 8b4059b578a0a2d812b91dc242d507708c00fea2 /src/keyboard.c | |
parent | 644f77b517180c5f75a9eaac4d76b12a1f334ce6 (diff) | |
download | emacs-5d2ac7435de679559aae0ede1d8b6f1750c09e68.tar.gz |
Use DEV_TTY more consistently
* src/conf_post.h (DEV_TTY): Move from here ...
* src/keyboard.c, src/keyboard.h: ... to here, as it doesn’t need
to be visible everywhere. Make it a constant.
* src/keyboard.c (handle_interrupt, Fset_quit_char):
* src/process.c (create_process): Prefer DEV_TTY to "/dev/tty".
Diffstat (limited to 'src/keyboard.c')
-rw-r--r-- | src/keyboard.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 3ef797c11c3..b8bc3610eb0 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -75,6 +75,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ # pragma GCC diagnostic ignored "-Wclobbered" #endif +#ifdef WINDOWSNT +char const DEV_TTY[] = "CONOUT$"; +#else +char const DEV_TTY[] = "/dev/tty"; +#endif + /* Variables for blockinput.h: */ /* Positive if interrupt input is blocked right now. */ @@ -10310,7 +10316,7 @@ handle_interrupt (bool in_signal_handler) cancel_echoing (); /* XXX This code needs to be revised for multi-tty support. */ - if (!NILP (Vquit_flag) && get_named_terminal ("/dev/tty")) + if (!NILP (Vquit_flag) && get_named_terminal (DEV_TTY)) { if (! in_signal_handler) { @@ -10609,7 +10615,7 @@ process. See also `current-input-mode'. */) (Lisp_Object quit) { - struct terminal *t = get_named_terminal ("/dev/tty"); + struct terminal *t = get_named_terminal (DEV_TTY); struct tty_display_info *tty; if (!t) |