From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#25581: 25.1; Incorrect statement in (elisp) `Hooks' Date: Mon, 24 Aug 2020 09:18:27 -0700 (PDT) Message-ID: <9a1b7301-09fd-4df0-be17-e20b4ebbe36e@default> References: <8e81acfe-ecaa-4fac-9484-24541b232ba1@default> <87k0xo83ww.fsf@gnus.org> 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="7207"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 25581@debbugs.gnu.org To: Stefan Kangas , Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 24 18:22:44 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 1kAFF6-0001mO-4d for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 24 Aug 2020 18:22:44 +0200 Original-Received: from localhost ([::1]:40514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kAFF4-0001MT-TB for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 24 Aug 2020 12:22:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAFDS-00082D-Tx for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2020 12:21:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47511) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kAFDS-0004i2-Iv for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2020 12:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kAFDS-0002mG-Dq for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2020 12:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Aug 2020 16:21:02 +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.159828605510635 (code B ref 25581); Mon, 24 Aug 2020 16:21:02 +0000 Original-Received: (at 25581) by debbugs.gnu.org; 24 Aug 2020 16:20:55 +0000 Original-Received: from localhost ([127.0.0.1]:59055 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAFDK-0002lS-Ad for submit@debbugs.gnu.org; Mon, 24 Aug 2020 12:20:55 -0400 Original-Received: from userp2130.oracle.com ([156.151.31.86]:42526) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAFD4-0002ku-7v for 25581@debbugs.gnu.org; Mon, 24 Aug 2020 12:20:53 -0400 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 07OGIZcT135528; Mon, 24 Aug 2020 16:20:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=GBvjnbGWHzrdbLsTGvtCAfMcDqTTIStgMb1kGKzumkU=; b=cJWuA2bdjMnoxB92usSvYHlsqBzqJxfsEEHKgRF1mrquMRlnroeGY3gKq/mVN/2aYkwc OIrT8xz6fkAzhsXmo6N2vU0KDE/PcZtAXDIV377gMopq/QklYJi6eK7WaIbfzLCCJmi3 3t0loN6Qux/2q/PBDh9nHA8bRbMTazynv+dCiJCBXLUe/MxAgzkjRXL4O3g+DixWDoz6 tGwMmEP7VV4N8UfG6Zj8aigph8LvQBaOMM/vTbZyeLDcC37EhkqlMVWnqWYN4PcpypkD zFc9fGzHqLJTjFODLUg8aHm7/Duf+4AiVDVTKBfj5tSrcqWzSZPgxqfxtbSUXmQrgfB7 gw== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 333cshwk6r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 24 Aug 2020 16:20:32 +0000 Original-Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 07OGFGMB082269; Mon, 24 Aug 2020 16:18:32 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3030.oracle.com with ESMTP id 333r9hffan-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 24 Aug 2020 16:18:31 +0000 Original-Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 07OGITXR031215; Mon, 24 Aug 2020 16:18:30 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5044.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9723 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 phishscore=0 suspectscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008240131 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9723 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 bulkscore=0 clxscore=1015 spamscore=0 priorityscore=1501 impostorscore=0 adultscore=0 lowpriorityscore=0 suspectscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008240131 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:186185 Archived-At: > I think the confusing thing here is that there are two ways to modify > these single function hooks: setq and add-function. `setq' can always be used to change a variable's value. But that doesn't mean it's always the best thing to use. See earlier posts in this thread, about variables whose value is a "single function". They can be hooks, but need not be hooks (and this, regardless of their names). Some vars are _intended_ to only ever have a single function as their value. Some vars are _intended_ to have a value that can be a single function or a list of functions. Some of the latter kind of variables are hooks. (Maybe _all_ of the latter can be treated as hooks; maybe not.) `add-hook' is the best way to add a function to a hook. This is so, regardless of its name. That you can use `setq' or something else instead doesn't make that TRT.