unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Rolf Ade <rolf@pointsman.de>, help-gnu-emacs@gnu.org
Subject: RE: Hook doesn't run as expected, if buffer mode is set from major-mode
Date: Fri, 8 Jan 2016 13:20:54 -0800 (PST)	[thread overview]
Message-ID: <842b6bc4-5c24-462c-ac00-dce675f40cef@default> (raw)
In-Reply-To: <87h9in4zee.fsf@linux-qg7d.fritz.box>

> If the major mode of a new buffer is determined by the variable
> major-mode (nothing from auto-mode-alist et. al matches), then the hooks
> of that major mode doesn't run, as I expect.

`major-mode' is a buffer-local variable.
It is set by the newly current major mode.
IOW, you cannot use it to set the mode, as the mode sets it.



  reply	other threads:[~2016-01-08 21:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-08 19:58 Hook doesn't run as expected, if buffer mode is set from major-mode Rolf Ade
2016-01-08 21:20 ` Drew Adams [this message]
2016-01-08 23:32 ` Michael Heerdegen
     [not found] ` <mailman.1999.1452288065.843.help-gnu-emacs@gnu.org>
2016-01-09  0:15   ` Rolf Ade
2016-01-09  2:07     ` Drew Adams
     [not found] ` <mailman.2004.1452295936.843.help-gnu-emacs@gnu.org>
2016-01-09  0:36   ` Rolf Ade
2016-01-09  2:09     ` Drew Adams
2016-01-09  2:19     ` Michael Heerdegen
     [not found]     ` <mailman.2012.1452305981.843.help-gnu-emacs@gnu.org>
2016-01-09 22:14       ` Rolf Ade
2016-01-10  4:29         ` 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

  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=842b6bc4-5c24-462c-ac00-dce675f40cef@default \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@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.
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).