diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 3 | ||||
| -rw-r--r-- | src/term.c | 1 | ||||
| -rw-r--r-- | src/termhooks.h | 1 | ||||
| -rw-r--r-- | src/terminal.c | 9 |
4 files changed, 13 insertions, 1 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 1c1f1514ae8..35d74f4a795 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -3554,6 +3554,7 @@ kbd_buffer_store_buffered_event (union buffered_input_event *event, | |||
| 3554 | case ICONIFY_EVENT: ignore_event = Qiconify_frame; break; | 3554 | case ICONIFY_EVENT: ignore_event = Qiconify_frame; break; |
| 3555 | case DEICONIFY_EVENT: ignore_event = Qmake_frame_visible; break; | 3555 | case DEICONIFY_EVENT: ignore_event = Qmake_frame_visible; break; |
| 3556 | case SELECTION_REQUEST_EVENT: ignore_event = Qselection_request; break; | 3556 | case SELECTION_REQUEST_EVENT: ignore_event = Qselection_request; break; |
| 3557 | case BUFFER_SWITCH_EVENT: ignore_event = Qbuffer_switch; break; | ||
| 3557 | default: ignore_event = Qnil; break; | 3558 | default: ignore_event = Qnil; break; |
| 3558 | } | 3559 | } |
| 3559 | 3560 | ||
| @@ -11082,6 +11083,8 @@ syms_of_keyboard (void) | |||
| 11082 | /* Menu and tool bar item parts. */ | 11083 | /* Menu and tool bar item parts. */ |
| 11083 | DEFSYM (Qmenu_enable, "menu-enable"); | 11084 | DEFSYM (Qmenu_enable, "menu-enable"); |
| 11084 | 11085 | ||
| 11086 | DEFSYM (Qbuffer_switch, "buffer-switch"); | ||
| 11087 | |||
| 11085 | #ifdef HAVE_NTGUI | 11088 | #ifdef HAVE_NTGUI |
| 11086 | DEFSYM (Qlanguage_change, "language-change"); | 11089 | DEFSYM (Qlanguage_change, "language-change"); |
| 11087 | DEFSYM (Qend_session, "end-session"); | 11090 | DEFSYM (Qend_session, "end-session"); |
diff --git a/src/term.c b/src/term.c index ce24f6915fc..852dc23bd60 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -4008,6 +4008,7 @@ init_tty (const char *name, const char *terminal_type, bool must_succeed) | |||
| 4008 | char const *diagnostic | 4008 | char const *diagnostic |
| 4009 | = (fd < 0) ? "Could not open file: %s" : "Not a tty device: %s"; | 4009 | = (fd < 0) ? "Could not open file: %s" : "Not a tty device: %s"; |
| 4010 | emacs_close (fd); | 4010 | emacs_close (fd); |
| 4011 | delete_terminal_internal (terminal); | ||
| 4011 | maybe_fatal (must_succeed, terminal, diagnostic, diagnostic, name); | 4012 | maybe_fatal (must_succeed, terminal, diagnostic, diagnostic, name); |
| 4012 | } | 4013 | } |
| 4013 | 4014 | ||
diff --git a/src/termhooks.h b/src/termhooks.h index 211429169ba..4e341055100 100644 --- a/src/termhooks.h +++ b/src/termhooks.h | |||
| @@ -733,6 +733,7 @@ extern struct terminal *get_named_terminal (const char *); | |||
| 733 | extern struct terminal *create_terminal (enum output_method, | 733 | extern struct terminal *create_terminal (enum output_method, |
| 734 | struct redisplay_interface *); | 734 | struct redisplay_interface *); |
| 735 | extern void delete_terminal (struct terminal *); | 735 | extern void delete_terminal (struct terminal *); |
| 736 | extern void delete_terminal_internal (struct terminal *); | ||
| 736 | extern Lisp_Object terminal_glyph_code (struct terminal *, int); | 737 | extern Lisp_Object terminal_glyph_code (struct terminal *, int); |
| 737 | 738 | ||
| 738 | /* The initial terminal device, created by initial_term_init. */ | 739 | /* The initial terminal device, created by initial_term_init. */ |
diff --git a/src/terminal.c b/src/terminal.c index 18982fe7044..e4803592575 100644 --- a/src/terminal.c +++ b/src/terminal.c | |||
| @@ -314,7 +314,6 @@ create_terminal (enum output_method type, struct redisplay_interface *rif) | |||
| 314 | void | 314 | void |
| 315 | delete_terminal (struct terminal *terminal) | 315 | delete_terminal (struct terminal *terminal) |
| 316 | { | 316 | { |
| 317 | struct terminal **tp; | ||
| 318 | Lisp_Object tail, frame; | 317 | Lisp_Object tail, frame; |
| 319 | 318 | ||
| 320 | /* Protect against recursive calls. delete_frame calls the | 319 | /* Protect against recursive calls. delete_frame calls the |
| @@ -335,6 +334,14 @@ delete_terminal (struct terminal *terminal) | |||
| 335 | } | 334 | } |
| 336 | } | 335 | } |
| 337 | 336 | ||
| 337 | delete_terminal_internal (terminal); | ||
| 338 | } | ||
| 339 | |||
| 340 | void | ||
| 341 | delete_terminal_internal (struct terminal *terminal) | ||
| 342 | { | ||
| 343 | struct terminal **tp; | ||
| 344 | |||
| 338 | for (tp = &terminal_list; *tp != terminal; tp = &(*tp)->next_terminal) | 345 | for (tp = &terminal_list; *tp != terminal; tp = &(*tp)->next_terminal) |
| 339 | if (! *tp) | 346 | if (! *tp) |
| 340 | emacs_abort (); | 347 | emacs_abort (); |