diff options
| author | Eli Zaretskii | 2024-05-04 13:12:21 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2024-05-04 13:12:21 +0300 |
| commit | fa0f65aa342e181e0e98f55cbf5d9a9be5ed3be6 (patch) | |
| tree | f4f143f00f32a1cfb141aef2279b1bafdcdc9b5d /src/term.c | |
| parent | 1121f17d7c4bc3b71edcd0799b894f50aa3a715e (diff) | |
| download | emacs-fa0f65aa342e181e0e98f55cbf5d9a9be5ed3be6.tar.gz emacs-fa0f65aa342e181e0e98f55cbf5d9a9be5ed3be6.zip | |
Fix implementation of the --terminal command-line switch
It sounds like this has been broken ever since multi-tty was
added to Emacs.
* src/keyboard.c (dev_tty): New global variable.
* src/keyboard.h: Declare 'dev_tty'.
* src/emacs.c (main): Initialize 'dev_tty'.
* src/term.c (Fcontrolling_tty_p, Fresume_tty, init_tty):
* src/process.c (dissociate_controlling_tty):
* src/keyboard.c (handle_interrupt_signal, handle_interrupt)
(Fset_quit_char): Use 'dev_tty' instead of 'DEV_TTY'. (Bug#70519)
Diffstat (limited to 'src/term.c')
| -rw-r--r-- | src/term.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/term.c b/src/term.c index 6cb57592643..903444ef69f 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -2312,7 +2312,7 @@ TERMINAL is not on a tty device. */) | |||
| 2312 | { | 2312 | { |
| 2313 | struct terminal *t = decode_tty_terminal (terminal); | 2313 | struct terminal *t = decode_tty_terminal (terminal); |
| 2314 | 2314 | ||
| 2315 | return (t && !strcmp (t->display_info.tty->name, DEV_TTY) ? Qt : Qnil); | 2315 | return (t && !strcmp (t->display_info.tty->name, dev_tty) ? Qt : Qnil); |
| 2316 | } | 2316 | } |
| 2317 | 2317 | ||
| 2318 | DEFUN ("tty-no-underline", Ftty_no_underline, Stty_no_underline, 0, 1, 0, | 2318 | DEFUN ("tty-no-underline", Ftty_no_underline, Stty_no_underline, 0, 1, 0, |
| @@ -2467,7 +2467,7 @@ frame's terminal). */) | |||
| 2467 | open_errno); | 2467 | open_errno); |
| 2468 | } | 2468 | } |
| 2469 | 2469 | ||
| 2470 | if (!O_IGNORE_CTTY && strcmp (t->display_info.tty->name, DEV_TTY) != 0) | 2470 | if (!O_IGNORE_CTTY && strcmp (t->display_info.tty->name, dev_tty) != 0) |
| 2471 | dissociate_if_controlling_tty (fd); | 2471 | dissociate_if_controlling_tty (fd); |
| 2472 | #endif /* MSDOS */ | 2472 | #endif /* MSDOS */ |
| 2473 | 2473 | ||
| @@ -4075,7 +4075,7 @@ dissociate_if_controlling_tty (int fd) | |||
| 4075 | /* Create a termcap display on the tty device with the given name and | 4075 | /* Create a termcap display on the tty device with the given name and |
| 4076 | type. | 4076 | type. |
| 4077 | 4077 | ||
| 4078 | If NAME is NULL, then use the controlling tty, i.e., DEV_TTY. | 4078 | If NAME is NULL, then use the controlling tty, i.e., dev_tty. |
| 4079 | Otherwise NAME should be a path to the tty device file, | 4079 | Otherwise NAME should be a path to the tty device file, |
| 4080 | e.g. "/dev/pts/7". | 4080 | e.g. "/dev/pts/7". |
| 4081 | 4081 | ||
| @@ -4114,9 +4114,9 @@ init_tty (const char *name, const char *terminal_type, bool must_succeed) | |||
| 4114 | "Unknown terminal type"); | 4114 | "Unknown terminal type"); |
| 4115 | 4115 | ||
| 4116 | if (name == NULL) | 4116 | if (name == NULL) |
| 4117 | name = DEV_TTY; | 4117 | name = dev_tty; |
| 4118 | #ifndef DOS_NT | 4118 | #ifndef DOS_NT |
| 4119 | if (!strcmp (name, DEV_TTY)) | 4119 | if (!strcmp (name, dev_tty)) |
| 4120 | ctty = 1; | 4120 | ctty = 1; |
| 4121 | #endif | 4121 | #endif |
| 4122 | 4122 | ||