[Top][All Lists]

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

Re: Fundamental mode vs. special mode

From: Chong Yidong
Subject: Re: Fundamental mode vs. special mode
Date: Tue, 25 Oct 2011 10:38:22 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux)

Johan Bockgård <address@hidden> writes:

>> It's not a good idea to add anything to Fundamental mode.  The point of
>> it is to be fundamental.
> 2010-04-28  Stefan Monnier  <address@hidden>
> Make it possible to locally disable a globally enabled mode.
> * simple.el (fundamental-mode): Run fundamental-mode-hook.
> * emacs-lisp/derived.el (define-derived-mode): Use fundamental-mode
> rather than kill-all-local-variables so it runs fundamental-mode-hook.
> * emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
> Use fundamental-mode-hook to run MODE-enable-in-buffers earlier, so
> that subsequent hooks get a chance to disable it.

Thanks for pointing this out.  I think this change is problematic.
IIUC, it introduces a nontrivial backward incompatibility: major modes
defined with define-derived-mode now run fundamental-mode-hook, and thus
behave differently from major modes that are defined directly according
to previous Emacs guidelines for major modes (which was to simply call

reply via email to

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