From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.devel Subject: Re: fundamental-mode-hook Date: Thu, 08 Feb 2007 19:25:57 +0100 Message-ID: <45CB6B35.3090203@gmail.com> References: <45CA70FA.6020002@gmail.com> <877iutvu8v.fsf@floss.red-bean.com> <45CA7F9B.5080808@gmail.com> <87k5ysveyh.fsf@floss.red-bean.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1170959185 5908 80.91.229.12 (8 Feb 2007 18:26:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 8 Feb 2007 18:26:25 +0000 (UTC) Cc: Juanma Barranquero , Emacs Devel To: kfogel@red-bean.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 08 19:26:23 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HFDyP-0000IK-OY for ged-emacs-devel@m.gmane.org; Thu, 08 Feb 2007 19:26:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HFDyP-0005lE-5y for ged-emacs-devel@m.gmane.org; Thu, 08 Feb 2007 13:26:21 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HFDyD-0005ky-PW for emacs-devel@gnu.org; Thu, 08 Feb 2007 13:26:09 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HFDyC-0005ka-BA for emacs-devel@gnu.org; Thu, 08 Feb 2007 13:26:09 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HFDyC-0005kX-5w for emacs-devel@gnu.org; Thu, 08 Feb 2007 13:26:08 -0500 Original-Received: from ch-smtp01.sth.basefarm.net ([80.76.149.212]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HFDyB-00075G-NM for emacs-devel@gnu.org; Thu, 08 Feb 2007 13:26:08 -0500 Original-Received: from c83-254-145-24.bredband.comhem.se ([83.254.145.24]:63615 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.63) (envelope-from ) id 1HFDy9-0006bh-3X; Thu, 08 Feb 2007 19:26:05 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.666 In-Reply-To: <87k5ysveyh.fsf@floss.red-bean.com> X-Antivirus: avast! (VPS 000712-1, 2007-02-08), Outbound message X-Antivirus-Status: Clean X-Scan-Result: No virus found in message 1HFDy9-0006bh-3X. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1HFDy9-0006bh-3X 9842a6d8fdcf3e62540a7e33a720590f X-detected-kernel: Linux 2.6? (barebone, rare!) 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:66127 Archived-At: Karl Fogel wrote: > "Lennart Borgman (gmail)" writes: >> Juanma Barranquero wrote: >> I thought that a hook like (the now non-existent) >> fundamental-mode-hook was meant for adding things for minor mode for >> example. >> >> I can not really understand the rational for not having it. There can >> still be minor mode active in a buffer with in fundamental-mode, or? >> >> (And currently Info is incorrect.) > > I've added the hook now. Thanks, Juanma Barranquero, for the timely > archive pointers! > > 2007-02-08 Karl Fogel > > * emacs/lisp/simple.el (fundamental-mode-hook): Declare new hook. > (fundamental-mode): Run the new dedicated hook, and don't run > after-change-major-mode-hooks manually anymore. > > $ cvs ci -F msg simple.el ChangeLog > /cvsroot/emacs/emacs/lisp/simple.el,v <-- simple.el > new revision: 1.844; previous revision: 1.843 > /cvsroot/emacs/emacs/lisp/ChangeLog,v <-- ChangeLog > new revision: 1.10663; previous revision: 1.10662 > Mailing notification to emacs-commit@gnu.org... sent. > Mailing diffs to emacs-diffs@gnu.org... 2 sent. > $ Thanks. I just recompiled from CVS and tested. I can find the hook, but it does not seem to be run. Or I am doing something bad. This is what I used for testing: (defun temp-fund() (message "temp-fund here") (sit-for 2)) (temp-fund) (add-hook 'fundamental-mode-hook 'temp-fund) (get-buffer-create "Test fund") (with-temp-buffer (message "%s, major-mode=%s" (current-buffer) major-mode))