From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#36618: 26.2; Misnamed `*-hooks' variables Date: Fri, 12 Jul 2019 08:16:56 -0700 (PDT) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="203414"; mail-complaints-to="usenet@blaine.gmane.org" To: 36618@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 12 17:19:33 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hlxKf-000qhB-1Z for geb-bug-gnu-emacs@m.gmane.org; Fri, 12 Jul 2019 17:19:33 +0200 Original-Received: from localhost ([::1]:50488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlxJH-0004PS-FW for geb-bug-gnu-emacs@m.gmane.org; Fri, 12 Jul 2019 11:18:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58731) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlxJE-0004P4-6H for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2019 11:18:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hlxJD-0006AC-0k for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2019 11:18:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59977) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hlxJC-0006A5-T8 for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2019 11:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hlxJC-0004y5-NP for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2019 11:18: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: Fri, 12 Jul 2019 15:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 36618 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.156294463217663 (code B ref -1); Fri, 12 Jul 2019 15:18:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Jul 2019 15:17:12 +0000 Original-Received: from localhost ([127.0.0.1]:40565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlxIN-0004aV-GV for submit@debbugs.gnu.org; Fri, 12 Jul 2019 11:17:12 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:53573) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlxIK-0004YH-Qy for submit@debbugs.gnu.org; Fri, 12 Jul 2019 11:17:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58450) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlxIJ-0004JA-S1 for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2019 11:17:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hlxII-0005PO-S4 for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2019 11:17:07 -0400 Original-Received: from userp2130.oracle.com ([156.151.31.86]:51194) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hlxII-0005O0-J4 for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2019 11:17:06 -0400 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x6CFBLLb158049 for ; Fri, 12 Jul 2019 15:16:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=/SdA7o/Kai2dOOzEOvhSPCHddaYamef7efPbSa/pCuE=; b=1VKZJ4jI2EP/dnskxqwxpNdUL7AiPUcK62xpQJOQxdjNoGdrFL0cbUAHach0bzKJGlgL qFMgrV/yqaFt70PC5GkKjAs34BIsEGGSgxFBsNvlppUArJIbKPAWSfvjTR0V2j27z0PP 1C7vFkatwdOjqa4r97P+cVO1sBZs3X7e/C/IKMV5BIlcUiUOylMat6W5pj0bxeSZo86d aI/T220riTc90IHs6m/WrAcpMXRtF++OsYTcb51TtdWDO+qkEeKg5kVY0RfoBa6O2vdd HIqMziJ7ypzS1CEK65F6eBXeUzjSaH5E2ZkhybS1nbsEFnuNRechruNsn7w/iu5foYQq Mg== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 2tjk2u6ada-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 12 Jul 2019 15:16:59 +0000 Original-Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x6CFDOgM130957 for ; Fri, 12 Jul 2019 15:16:59 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 2tn1j273pe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 12 Jul 2019 15:16:59 +0000 Original-Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x6CFGvlg004379 for ; Fri, 12 Jul 2019 15:16:58 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4861.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9316 signatures=668688 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907120164 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9316 signatures=668688 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907120164 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:162783 Archived-At: The following variable names end in `-hooks', instead of `-hook' or `-functions' (there may be more - just noticed these in one of my sessions): bookmark-exit-hooks (OBS) delay-mode-hooks (Bool) delayed-mode-hooks XXX ediff-before-session-group-setup-hooks XXX find-file-hooks (OBS) find-file-not-found-hooks (OBS) inhibit-modification-hooks (Bool) inhibit-point-motion-hooks (Bool) inhibit-startup-hooks (Bool) local-write-file-hooks (OBS) mail-yank-hooks (OBS) recentf-used-hooks XXX unload-feature-special-hooks (aliased) write-contents-hooks (OBS) write-file-hooks (OBS) Those marked "OBS" are declared to be obsolete. Nothing need be done now for those. I suggest that `unload-feature-special-hooks', which is already aliased to `load-hist-hook-functions', be made obsolete. The ones marked "Bool" are not hooks. They are Boolean values indicating whether some behavior associated with particular hooks takes place - e.g., whether mode hooks should be delayed. I suggest that these be renamed to indicate this. We could, for example, follow the convention (still encouraged by RMS) of adding the suffix `-flag'. The ones marked "XXX" are also not hooks. They're lists of hooks. I suggest they be re-suffixed `-functions' and the old names declared obsolete. [A code comment for `ediff-before-session-group-setup-hooks' says this: ;FIXME: Bad name (should be -hook or -functions) and never run??] There's some ambiguity in the use of suffix `-functions'. (elisp) `Standard Hooks' says that it _usually_ means an abnormal hook. But it seems that sometimes it means just a list of hooks that some code will do something with (not necessarily invoke them as abnormal hooks). If we wanted to use a different suffix, to distinguish actual abnormal hooks from such other lists of hooks (normal and abnormal) then those marked "XXX" here fall into the latter group. In GNU Emacs 26.2 (build 1, x86_64-w64-mingw32) of 2019-04-13 Repository revision: fd1b34bfba8f3f6298df47c8e10b61530426f749 Windowing system distributor `Microsoft Corp.', version 10.0.17134 Configured using: `configure --without-dbus --host=3Dx86_64-w64-mingw32 --without-compress-install 'CFLAGS=3D-O2 -static -g3''