From: Bill Wohler <wohler@newt.com>
To: emacs-devel@gnu.org
Subject: Re: 23.1: Is delete-windows-on supposed to change the current buffer?
Date: Fri, 31 Jul 2009 13:17:44 -0700 [thread overview]
Message-ID: <87my6k1uaf.fsf@olgas.newt.com> (raw)
In-Reply-To: jwvtz0sr8dn.fsf-monnier+emacs@gnu.org
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> `delete-windows-on' deletes all windows showing `mh-show-buffer'. If,
>> for example, `mh-show-buffer' is shown in the selected window and that
>> window is the only window on its frame, and that frame is the only
>> frame, another buffer is shown in that window and becomes the current
>> buffer. window_loop handles this as
>
>> if (EQ (window, selected_window))
>> Fset_buffer (w->buffer);
>
>> unchanged since the past release.
>
> My guess is that the switch from Fdisplay_buffer to the Elisp version of
> code, causes the windows to be created slightly differently, and this in
> turn causes delete-windows-on in this particular case to cycle through
> the windows in a different order.
> In any case, the answer is that delete-windows-on should be expected to
> change the current-buffer, so if you want it to stay unchanged, you need
> save-excursion.
Thanks, Stefan.
Another solution would be to save the content of current-buffer first,
and then use set-buffer or with-current-buffer to access it. Are one
or the other of these two functions preferred?
--
Bill Wohler <wohler@newt.com> http://www.newt.com/wohler/ GnuPG ID:610BD9AD
prev parent reply other threads:[~2009-07-31 20:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-30 22:13 23.1: Is delete-windows-on supposed to change the current buffer? Jeffrey C Honig
2009-07-31 9:08 ` martin rudalics
2009-07-31 15:49 ` Jeffrey C Honig
2009-07-31 16:11 ` martin rudalics
2009-07-31 17:11 ` Bill Wohler
2009-07-31 18:56 ` Stefan Monnier
2009-07-31 20:17 ` Bill Wohler [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87my6k1uaf.fsf@olgas.newt.com \
--to=wohler@newt.com \
--cc=emacs-devel@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).