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: Strange code in derived.el. Date: Thu, 09 Jun 2005 18:02:07 +0200 Message-ID: <87u0k7jz7k.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 1118333121 7132 80.91.229.2 (9 Jun 2005 16:05:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 9 Jun 2005 16:05:21 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 09 18:05:13 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DgPTN-0003HM-8V for ged-emacs-devel@m.gmane.org; Thu, 09 Jun 2005 18:01:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DgPaJ-0006Al-U1 for ged-emacs-devel@m.gmane.org; Thu, 09 Jun 2005 12:08:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DgPYy-0005V8-00 for emacs-devel@gnu.org; Thu, 09 Jun 2005 12:07:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DgPYl-0005N3-So for emacs-devel@gnu.org; Thu, 09 Jun 2005 12:07:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DgPYl-0005Kp-NO for emacs-devel@gnu.org; Thu, 09 Jun 2005 12:07:11 -0400 Original-Received: from [194.109.24.33] (helo=smtp-vbr13.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DgPU5-0001s0-5u for emacs-devel@gnu.org; Thu, 09 Jun 2005 12:02:21 -0400 Original-Received: from pijl (a80-127-67-124.adsl.xs4all.nl [80.127.67.124]) by smtp-vbr13.xs4all.nl (8.13.3/8.13.3) with ESMTP id j59G28t5062007 for ; Thu, 9 Jun 2005 18:02:08 +0200 (CEST) (envelope-from Lute.Kamstra@xs4all.nl) Original-Received: from lute by pijl with local (Exim 3.36 #1 (Debian)) id 1DgPTs-00061m-00 for ; Thu, 09 Jun 2005 18:02:08 +0200 Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Original-Lines: 49 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:38452 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:38452 I don't understand this piece of code at the end of define-derived-mode in lisp/emacs-lisp/derived.el: ,---- | ;; Run the hooks, if any. | ;; Make the generated code work in older Emacs versions | ;; that do not yet have run-mode-hooks. | (if (fboundp 'run-mode-hooks) | (run-mode-hooks ',hook) | (run-hooks ',hook)))))) `---- Is the expansion of this define-derive-mode macro ever run in older Emacsen? Wouldn't delay-mode-hooks (used unconditionally) be missing as well, then? Shall I just delete the test? Lute. Index: lisp/emacs-lisp/derived.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/derived.el,v retrieving revision 1.6 diff -c -r1.6 derived.el *** lisp/emacs-lisp/derived.el 21 May 2005 22:35:35 -0000 1.6 --- lisp/emacs-lisp/derived.el 9 Jun 2005 15:39:48 -0000 *************** *** 235,245 **** ,@body ) ;; Run the hooks, if any. ! ;; Make the generated code work in older Emacs versions ! ;; that do not yet have run-mode-hooks. ! (if (fboundp 'run-mode-hooks) ! (run-mode-hooks ',hook) ! (run-hooks ',hook)))))) ;; PUBLIC: find the ultimate class of a derived mode. --- 235,241 ---- ,@body ) ;; Run the hooks, if any. ! (run-mode-hooks ',hook))))) ;; PUBLIC: find the ultimate class of a derived mode.