From: Michael Heerdegen <michael_heerdegen@web.de>
To: Glenn Morris <rgm@gnu.org>
Cc: Rolf Ade <rolf@pointsman.de>, 22348@debbugs.gnu.org
Subject: bug#22348: 24.5; Mode hooks doesn't run as expected if the major mode of a new buffer is determined by the default major mode
Date: Wed, 13 Jan 2016 05:05:50 +0100 [thread overview]
Message-ID: <87lh7u2kf5.fsf@web.de> (raw)
In-Reply-To: <1jio2z7lm9.fsf@fencepost.gnu.org> (Glenn Morris's message of "Mon, 11 Jan 2016 18:16:30 -0500")
Glenn Morris <rgm@gnu.org> writes:
> I'm saying the solution is probably as simple as:
>
> --- a/src/buffer.c
> +++ b/src/buffer.c
> @@ -1999,7 +1999,7 @@ the current buffer's major mode. */)
> /* To select a nonfundamental mode,
> select the buffer temporarily and then call the mode function. */
>
> - record_unwind_protect (save_excursion_restore, save_excursion_save ());
> + record_unwind_current_buffer ();
>
> Fset_buffer (buffer);
> call0 (function);
I can confirm that this fixes the issue.
Michael.
prev parent reply other threads:[~2016-01-13 4:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-11 12:43 bug#22348: 24.5; Mode hooks doesn't run as expected if the major mode of a new buffer is determined by the default major mode Rolf Ade
2016-01-11 22:27 ` Glenn Morris
2016-01-11 22:56 ` Rolf Ade
2016-01-11 23:16 ` Glenn Morris
2016-01-12 17:34 ` Eli Zaretskii
2016-01-13 17:52 ` Glenn Morris
2016-01-13 4:05 ` Michael Heerdegen [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lh7u2kf5.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=22348@debbugs.gnu.org \
--cc=rgm@gnu.org \
--cc=rolf@pointsman.de \
/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.