From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bojohan+news@dd.chalmers.se (Johan =?iso-8859-1?Q?Bockg=E5rd?=) Newsgroups: gmane.emacs.devel Subject: Re: Fundamental mode. Date: Sat, 18 Jun 2005 17:04:45 +0200 Message-ID: References: <87br68f111.fsf@xs4all.nl> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1119106932 28255 80.91.229.2 (18 Jun 2005 15:02:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 18 Jun 2005 15:02:12 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 18 17:02:09 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DjepJ-00007E-EL for ged-emacs-devel@m.gmane.org; Sat, 18 Jun 2005 17:01:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Djev8-0006Ri-Tq for ged-emacs-devel@m.gmane.org; Sat, 18 Jun 2005 11:07:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Djeui-0006QU-I0 for emacs-devel@gnu.org; Sat, 18 Jun 2005 11:07:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Djeuf-0006Og-8t for emacs-devel@gnu.org; Sat, 18 Jun 2005 11:07:14 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Djeuf-0006Na-4K for emacs-devel@gnu.org; Sat, 18 Jun 2005 11:07:13 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1DjevL-0003xm-Nw for emacs-devel@gnu.org; Sat, 18 Jun 2005 11:07:56 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DjenX-0008Kl-B2 for emacs-devel@gnu.org; Sat, 18 Jun 2005 16:59:51 +0200 Original-Received: from linus003.dd.chalmers.se ([129.16.117.203]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 18 Jun 2005 16:59:51 +0200 Original-Received: from bojohan+news by linus003.dd.chalmers.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 18 Jun 2005 16:59:51 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-To: emacs-devel@gnu.org Original-Lines: 40 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: linus003.dd.chalmers.se Mail-Copies-To: never User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:3VoY3X0pXd0O9f2omu7jCvtxXKE= 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:39084 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:39084 I have some questions. Richard Stallman 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