Fix "Buffers->Frames" submenu in daemon sessions
* lisp/menu-bar.el (menu-bar-update-buffers): Detect the initial frame by its special terminal's name. (Bug#53740) * src/terminal.c (init_initial_terminal): Add comment about using the initial-terminal's name in menu-bar.el.
This commit is contained in:
parent
9b0cdf461c
commit
abd59ad923
2 changed files with 4 additions and 1 deletions
|
|
@ -2346,7 +2346,8 @@ It must accept a buffer as its only required argument.")
|
|||
;; Ignore the initial frame if present. It can happen if
|
||||
;; Emacs was started as a daemon. (bug#53740)
|
||||
(dolist (frame (frame-list))
|
||||
(unless (eq frame frame-initial-frame)
|
||||
(unless (equal (terminal-name (frame-terminal frame))
|
||||
"initial_terminal")
|
||||
(push frame frames)))
|
||||
;; Make the menu of buffers proper.
|
||||
(setq buffers-menu
|
||||
|
|
|
|||
|
|
@ -622,6 +622,8 @@ init_initial_terminal (void)
|
|||
emacs_abort ();
|
||||
|
||||
initial_terminal = create_terminal (output_initial, NULL);
|
||||
/* Note: menu-bar.el:menu-bar-update-buffers knows about this
|
||||
special name of the initial terminal. */
|
||||
initial_terminal->name = xstrdup ("initial_terminal");
|
||||
initial_terminal->kboard = initial_kboard;
|
||||
initial_terminal->delete_terminal_hook = &delete_initial_terminal;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue