all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lute Kamstra <Lute.Kamstra.lists@xs4all.nl>
Cc: emacs-devel@gnu.org
Subject: Re: Fundamental mode.
Date: Thu, 16 Jun 2005 14:41:49 +0200	[thread overview]
Message-ID: <87r7f2a2ya.fsf@xs4all.nl> (raw)
In-Reply-To: <E1DilfK-0003Fm-6G@fencepost.gnu.org> (Richard Stallman's message of "Thu, 16 Jun 2005 00:07:42 -0400")

Richard Stallman <rms@gnu.org> writes:

>     Modes derived from fundamental mode run after-change-major-mode-hook
>     twice because fundamental mode runs it unconditionally.  Fundamental
>     mode should only run after-change-major-mode-hook if delay-mode-hooks
>     is nil.  We can either test this directly or use (run-mode-hooks
>     'fundamental-mode-hook).  The latter also introduces
>     fundamental-mode-hook, of course.  I see no problem with that, but I'm
>     a bit surprised it hasn't been done already.
>
> 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.
>
> Could you do that explicitly?

I committed the patch below.

Lute.


Index: lisp/simple.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/simple.el,v
retrieving revision 1.728
diff -c -r1.728 simple.el
*** lisp/simple.el	8 Jun 2005 15:35:05 -0000	1.728
--- lisp/simple.el	16 Jun 2005 12:37:30 -0000
***************
*** 327,333 ****
  Other major modes are defined by comparison with this one."
    (interactive)
    (kill-all-local-variables)
!   (run-hooks 'after-change-major-mode-hook))
  
  ;; Making and deleting lines.
  
--- 327,334 ----
  Other major modes are defined by comparison with this one."
    (interactive)
    (kill-all-local-variables)
!   (unless delay-mode-hooks
!     (run-hooks 'after-change-major-mode-hook)))
  
  ;; Making and deleting lines.

  reply	other threads:[~2005-06-16 12:41 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 [this message]
2005-06-18 15:04   ` Johan Bockgård
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=87r7f2a2ya.fsf@xs4all.nl \
    --to=lute.kamstra.lists@xs4all.nl \
    --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.