From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#25581: 25.1; Incorrect statement in (elisp) `Hooks' Date: Mon, 24 Aug 2020 17:22:23 +0200 Message-ID: <87k0xo83ww.fsf@gnus.org> References: <8e81acfe-ecaa-4fac-9484-24541b232ba1@default> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15086"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 25581@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 24 17:23:09 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAEJR-0003or-F6 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 24 Aug 2020 17:23:09 +0200 Original-Received: from localhost ([::1]:40198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kAEJQ-0002pX-EO for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 24 Aug 2020 11:23:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAEJK-0002pL-Ds for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2020 11:23:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47370) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kAEJK-0003JN-4h for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2020 11:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kAEJJ-0005DN-W7 for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2020 11:23:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Aug 2020 15:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25581 X-GNU-PR-Package: emacs Original-Received: via spool by 25581-submit@debbugs.gnu.org id=B25581.159828255819993 (code B ref 25581); Mon, 24 Aug 2020 15:23:01 +0000 Original-Received: (at 25581) by debbugs.gnu.org; 24 Aug 2020 15:22:38 +0000 Original-Received: from localhost ([127.0.0.1]:58916 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAEIv-0005CP-PI for submit@debbugs.gnu.org; Mon, 24 Aug 2020 11:22:38 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:58900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAEIt-0005C4-F5 for 25581@debbugs.gnu.org; Mon, 24 Aug 2020 11:22:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Ci4eBB09CMkx2M6SPR4m3vgHJHYRc9xLomWW0w/bEzM=; b=DzSjUoTpgtHVmOE7w48wnO2kgl voooL4REFzY7rKWxqRCY9Zqnkse8ivMBsGM7qTNFBPlTLl3FkltSP5Y01eRFgZX8aJRhpT3a8axC9 DLrZ7kA6Q2aXwJR1Iz+udCloSSh+vJmR+j+V4ZUkZBTaWq9lNZ2IVbC6xoq3X/0Upcc0=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAEIi-00082S-Fa; Mon, 24 Aug 2020 17:22:28 +0200 X-Now-Playing: Sevdaliza's _ISON_: "Angel" In-Reply-To: <8e81acfe-ecaa-4fac-9484-24541b232ba1@default> (Drew Adams's message of "Mon, 30 Jan 2017 08:51:20 -0800 (PST)") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:186169 Archived-At: Drew Adams writes: > The second sentence here is incorrect: > > If the variable=E2=80=99s name ends in =E2=80=98-function=E2=80=99, then= its value is just a > single function, not a list of functions. =E2=80=98add-hook=E2=80=99 ca= nnot be used to > modify such a _single function hook_, and you have to use =E2=80=98add-f= unction=E2=80=99 > instead (*note Advising Functions::). > > You CAN use `add-hook' to modify such a single-function hook. > Nothing prevents you from doing so. And nothing even suggests > that you should not. And you have always been able to do so. Well, the name -function suggests that you shouldn't. I think the confusing thing here is that foo-function isn't a hook at all -- variables ending with -function are normally not executed with run-hooks at all, so using add-hook on such a variable will normally break. So I'm not sure what that section is doing in the Hooks node at all. It origin starts here, where unfortunately vc-region-history gives up. My preference here would be just to remove the paragraph, which is pretty confusing. commit b8d4c8d0e9326f8ed2d1f6fc0a38fb89ec29ed27 Author: Glenn Morris AuthorDate: Thu Sep 6 04:25:08 2007 +0000 Commit: Glenn Morris CommitDate: Thu Sep 6 04:25:08 2007 +0000 Move here from ../../lispref diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi --- /dev/null +++ b/doc/lispref/modes.texi @@ -0,0 +76,3 @@ + By convention, abnormal hook names end in @samp{-functions} or +@samp{-hooks}. If the variable's name ends in @samp{-function}, then +its value is just a single function, not a list of functions. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no