From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lute Kamstra Newsgroups: gmane.emacs.devel Subject: Re: Fundamental mode. Date: Thu, 16 Jun 2005 14:41:49 +0200 Message-ID: <87r7f2a2ya.fsf@xs4all.nl> References: <87br68f111.fsf@xs4all.nl> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1118925570 2257 80.91.229.2 (16 Jun 2005 12:39:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 16 Jun 2005 12:39:30 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 16 14:39:22 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DitdE-0007Mz-FM for ged-emacs-devel@m.gmane.org; Thu, 16 Jun 2005 14:38:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ditid-00054z-L4 for ged-emacs-devel@m.gmane.org; Thu, 16 Jun 2005 08:43:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DitiR-000542-1K for emacs-devel@gnu.org; Thu, 16 Jun 2005 08:43:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DitiN-00052R-Qr for emacs-devel@gnu.org; Thu, 16 Jun 2005 08:43:24 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DitiN-00052A-G6 for emacs-devel@gnu.org; Thu, 16 Jun 2005 08:43:23 -0400 Original-Received: from [194.109.24.34] (helo=smtp-vbr14.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Ditib-0004x5-5w; Thu, 16 Jun 2005 08:43:37 -0400 Original-Received: from pijl (a80-127-67-124.adsl.xs4all.nl [80.127.67.124]) by smtp-vbr14.xs4all.nl (8.13.3/8.13.3) with ESMTP id j5GCfntA010217; Thu, 16 Jun 2005 14:41:49 +0200 (CEST) (envelope-from Lute.Kamstra@xs4all.nl) Original-Received: from lute by pijl with local (Exim 3.36 #1 (Debian)) id 1Ditgr-0000bq-00; Thu, 16 Jun 2005 14:41:49 +0200 Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Thu, 16 Jun 2005 00:07:42 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Original-Lines: 47 X-Virus-Scanned: by XS4ALL Virus Scanner X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:38953 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:38953 Richard Stallman 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.