all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@gnu.org>
To: emacs-devel@gnu.org
Subject: Re: Fundamental mode vs. special mode
Date: Tue, 25 Oct 2011 10:38:22 +0800	[thread overview]
Message-ID: <878vo9vlr5.fsf@gnu.org> (raw)
In-Reply-To: <878vob4zq0.fsf@gnu.org> ("Johan \=\?utf-8\?Q\?Bockg\=C3\=A5rd\=22's\?\= message of "Sun, 23 Oct 2011 15:14:15 +0200")

Johan Bockgård <bojohan@gnu.org> writes:

>> It's not a good idea to add anything to Fundamental mode.  The point of
>> it is to be fundamental.
>
> FWIW,
>
> 2010-04-28  Stefan Monnier  <monnier@iro.umontreal.ca>
>
> 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
kill-all-local-variables).



  reply	other threads:[~2011-10-25  2:38 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-22 20:13 Fundamental mode vs. special mode Christoph Scholtes
2011-10-23  7:21 ` Chong Yidong
2011-10-23  9:19   ` martin rudalics
2011-10-23 13:28     ` Juri Linkov
2011-10-23 18:59       ` martin rudalics
2011-10-24  5:07         ` Juri Linkov
2011-10-24 16:39         ` Richard Stallman
2011-10-23 13:14   ` Johan Bockgård
2011-10-25  2:38     ` Chong Yidong [this message]
2011-10-25  3:51       ` Chong Yidong
2011-10-25 12:30         ` Stefan Monnier
2011-10-25 13:53           ` Juanma Barranquero
2011-10-25 15:11             ` Paul Eggert
2011-10-25 20:02               ` Stefan Monnier
2011-10-25 20:30                 ` Alan Mackenzie
2011-10-26  1:11                   ` Chong Yidong
2011-10-26 12:11                     ` Nix
2011-10-26 11:50                   ` Richard Stallman
2011-10-27  2:25                     ` Chong Yidong
2011-10-23 14:58   ` Christoph Scholtes
2011-10-24  5:11     ` Juri Linkov
2011-10-24 12:46       ` Stefan Monnier
2011-10-24 17:17       ` Alan Mackenzie
2011-10-25  4:30         ` Juri Linkov
2011-10-25 20:49           ` Alan Mackenzie
2011-10-26  1:18             ` Chong Yidong

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=878vo9vlr5.fsf@gnu.org \
    --to=cyd@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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.