Richard Stallman <[EMAIL PROTECTED]> 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.
  


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to