all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: Rolf Ade <rolf@pointsman.de>
Cc: 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: Mon, 11 Jan 2016 18:16:30 -0500	[thread overview]
Message-ID: <1jio2z7lm9.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <5694330C.8080602@pointsman.de> (Rolf Ade's message of "Mon, 11 Jan 2016 23:56:12 +0100")


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);





  reply	other threads:[~2016-01-11 23:16 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 [this message]
2016-01-12 17:34       ` Eli Zaretskii
2016-01-13 17:52         ` Glenn Morris
2016-01-13  4:05       ` Michael Heerdegen

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=1jio2z7lm9.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=22348@debbugs.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.