From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lute Kamstra Newsgroups: gmane.emacs.gnus.general,gmane.emacs.devel Subject: Re: run-hooks vs. run-mode-hooks. Date: Fri, 27 May 2005 03:40:54 +0200 Message-ID: <87hdgp4fa1.fsf@xs4all.nl> References: <874qcro5gv.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 1117158070 16228 80.91.229.2 (27 May 2005 01:41:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 27 May 2005 01:41:10 +0000 (UTC) Cc: emacs-devel@gnu.org, ding@gnus.org Original-X-From: ding-owner+M8878@lists.math.uh.edu Fri May 27 03:41:06 2005 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DbTq4-0006im-1f for ding-account@gmane.org; Fri, 27 May 2005 03:40:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1DbTqZ-0003Rg-00; Thu, 26 May 2005 20:41:11 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1DbTqS-0003Ra-00 for ding@lists.math.uh.edu; Thu, 26 May 2005 20:41:04 -0500 Original-Received: from quimby.gnus.org ([80.91.224.244]) by util2.math.uh.edu with esmtp (Exim 4.30) id 1DbTqQ-0000Va-1v for ding@lists.math.uh.edu; Thu, 26 May 2005 20:41:02 -0500 Original-Received: from smtp-vbr14.xs4all.nl ([194.109.24.34]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1DbTqP-0002n5-00 for ; Fri, 27 May 2005 03:41:01 +0200 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 j4R1esE9052945; Fri, 27 May 2005 03:40:59 +0200 (CEST) (envelope-from Lute.Kamstra@xs4all.nl) Original-Received: from lute by pijl with local (Exim 3.36 #1 (Debian)) id 1DbTqI-00018K-00; Fri, 27 May 2005 03:40:54 +0200 Original-To: Katsumi Yamaoka In-Reply-To: (Katsumi Yamaoka's message of "Fri, 27 May 2005 09:58:42 +0900") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Original-Lines: 23 X-Virus-Scanned: by XS4ALL Virus Scanner X-Spam-Score: -4.9 (----) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:60351 gmane.emacs.devel:37745 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:37745 Katsumi Yamaoka writes: > run-mode-hooks is only available in Emacs 22, while Gnus v5.11 > still supports Emacs 20 and 21 (and No Gnus supports Emacs 21). > > 2005-05-26 Lute Kamstra > > * score-mode.el (gnus-score-mode): Use run-mode-hooks. Sorry about that. > Is it possible to use run-hooks in those Emacs versions? Maybe Gnus can do something like: (or (fboundp 'run-mode-hooks) (defalias 'run-mode-hooks 'run-hooks)) I saw that most hooks are run with gnus-run-hooks, which calls run-hooks. Maybe you can also define a gnus-run-mode-hooks that uses run-mode-hooks instead and use that function for Gnus' major modes? Lute.