help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Hook doesn't run as expected, if buffer mode is set from major-mode


From: Drew Adams
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)

> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]