From: martin rudalics <rudalics@gmx.at>
To: 34317@debbugs.gnu.org
Subject: bug#34317: 26.1.90; Wrong unbinding order in x_consider_frame_title
Date: Mon, 04 Feb 2019 19:49:54 +0100 [thread overview]
Message-ID: <5C588952.1080706@gmx.at> (raw)
[-- Attachment #1: Type: text/plain, Size: 513 bytes --]
The unbinding order in x_consider_frame_title is botched. Hence,
while do_switch_frame will not resize the minibuffer window when the
frame of the title bar gets selected, it will still resize when the
old frame gets reselected in the unbind form.
The behavior can be seen with emacs -Q evaluating the following two
forms in row:
(make-frame '((minibuffer . nil)))
(y-or-n-p "\n")
The attached trivial patch cures it. Obviously, there's no guarantee
that some other client relies on the wrong order.
martin
[-- Attachment #2: x_consider_frame_title.diff~ --]
[-- Type: text/plain, Size: 1487 bytes --]
diff --git a/src/xdisp.c b/src/xdisp.c
index 274ab8d..0d084f8 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -12002,12 +12002,6 @@ static void ATTRIBUTE_FORMAT_PRINTF (1, 0)
/* Set global variable indicating that multiple frames exist. */
multiple_frames = CONSP (tail);
- /* Switch to the buffer of selected window of the frame. Set up
- mode_line_target so that display_mode_element will output into
- mode_line_noprop_buf; then display the title. */
- record_unwind_protect (unwind_format_mode_line,
- format_mode_line_unwind_data
- (f, current_buffer, selected_window, false));
/* select-frame calls resize_mini_window, which could resize the
mini-window and by that undo the effect of this redisplay
cycle wrt minibuffer and echo-area display. Binding
@@ -12015,6 +12009,12 @@ static void ATTRIBUTE_FORMAT_PRINTF (1, 0)
no-op, thus avoiding the adverse side effects. */
specbind (Qinhibit_redisplay, Qt);
+ /* Switch to the buffer of selected window of the frame. Set up
+ mode_line_target so that display_mode_element will output into
+ mode_line_noprop_buf; then display the title. */
+ record_unwind_protect (unwind_format_mode_line,
+ format_mode_line_unwind_data
+ (f, current_buffer, selected_window, false));
Fselect_window (f->selected_window, Qt);
set_buffer_internal_1
(XBUFFER (XWINDOW (f->selected_window)->contents));
next reply other threads:[~2019-02-04 18:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-04 18:49 martin rudalics [this message]
2019-02-19 9:07 ` bug#34317: 26.1.90; Wrong unbinding order in x_consider_frame_title martin rudalics
2019-02-23 9:43 ` Eli Zaretskii
2019-02-23 14:00 ` martin rudalics
2019-02-23 16:46 ` Eli Zaretskii
2019-02-24 8:43 ` martin rudalics
2019-02-24 16:08 ` Eli Zaretskii
2019-02-24 18:30 ` martin rudalics
2019-02-24 18:57 ` Eli Zaretskii
2019-03-04 10:14 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5C588952.1080706@gmx.at \
--to=rudalics@gmx.at \
--cc=34317@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.