all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: bojohan+news@dd.chalmers.se (Johan Bockgård)
Subject: Re: Fundamental mode.
Date: Sat, 18 Jun 2005 17:04:45 +0200	[thread overview]
Message-ID: <yoijk6kru2nm.fsf@linus003.dd.chalmers.se> (raw)
In-Reply-To: E1DilfK-0003Fm-6G@fencepost.gnu.org


I have some questions.

Richard Stallman <rms@gnu.org> writes:

> Lute Kamstra wrote:

>> Modes derived from fundamental mode run after-change-major-mode-hook
>> twice because fundamental mode runs it unconditionally.

I don't understand this. As define-derived-mode is currently defined modes
derived from fundamental-mode do not automatically call the fundamental-mode
function.

[define-derived-mode]

      (when (eq parent 'fundamental-mode) (setq parent nil))
      [...]
      (,(or parent 'kill-all-local-variables))

> Fundamental mode does not run a mode hook because what it means is "put
> settings in their default values". But it needs to run
> after-change-major-mode-hook, since the minor modes that should apply to
> all buffers apply to these buffers too.

Which are "these buffers" that this refers to? A buffer that defaults to
fundamental-mode (as created through C-x C-f on some unknown file type or
through C-x b) does not run the `fundamental-mode' lisp function. Currently
set-buffer-major-mode does not call the major-mode function when the default
mode is fundamental-mode.

[Fset_buffer_major_mode]

      if (NILP (function) || EQ (function, Qfundamental_mode))
        return Qnil;
      [...]
      call0 (function);

-- 
Johan Bockgård

  parent reply	other threads:[~2005-06-18 15:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-15  8:59 Fundamental mode Lute Kamstra
2005-06-15  9:19 ` Juanma Barranquero
2005-06-16  4:07 ` Richard Stallman
2005-06-16 12:41   ` Lute Kamstra
2005-06-18 15:04   ` Johan Bockgård [this message]
2005-06-19  0:49     ` Lute Kamstra

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=yoijk6kru2nm.fsf@linus003.dd.chalmers.se \
    --to=bojohan+news@dd.chalmers.se \
    /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.