[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#22348: 24.5; Mode hooks doesn't run as expected if the major mode of
From: |
Michael Heerdegen |
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 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
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.