From unknown Fri Aug 15 04:04:31 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#21563 <21563@debbugs.gnu.org> To: bug#21563 <21563@debbugs.gnu.org> Subject: Status: 24.5; discourage load-hook variables Reply-To: bug#21563 <21563@debbugs.gnu.org> Date: Fri, 15 Aug 2025 11:04:31 +0000 retitle 21563 24.5; discourage load-hook variables reassign 21563 emacs submitter 21563 "Roland Winkler" severity 21563 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 25 15:00:37 2015 Received: (at submit) by debbugs.gnu.org; 25 Sep 2015 19:00:37 +0000 Received: from localhost ([127.0.0.1]:43785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZfYEX-0005P3-Dw for submit@debbugs.gnu.org; Fri, 25 Sep 2015 15:00:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57462) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZfYEW-0005Ow-Ge for submit@debbugs.gnu.org; Fri, 25 Sep 2015 15:00:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfYEU-0003a8-Ss for submit@debbugs.gnu.org; Fri, 25 Sep 2015 15:00:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52873) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfYEU-0003Zz-Pl for submit@debbugs.gnu.org; Fri, 25 Sep 2015 15:00:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39175) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfYET-0001Zx-Gu for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 15:00:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfYEN-0003T2-Ki for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 15:00:32 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55954) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfYEN-0003NE-9m for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 15:00:27 -0400 Received: from [131.156.157.22] (port=39021 helo=lukas) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1ZfYB2-0002b1-NH for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 14:57:01 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <39185.7955.374134.22021@gargle.gargle.HOWL> Date: Fri, 25 Sep 2015 13:57:21 -0500 From: "Roland Winkler" To: bug-gnu-emacs@gnu.org Subject: 24.5; discourage load-hook variables X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Somewhere in my emacs init file I was setting the variable dired-load-hook. (I guess I wrote this code years ago when I did not know much about emacs.) Yet suddenly this did not work for me anymore, as I had rearranged my init file so that dired got loaded before I was setting dired-load-hook. I suggest to discourage the usage of any such load-hook variables: I believe eval-after-load is considered to be the cleaner alternative: it does not give rise to the type of problems I ran into. Also it does not require user variables for each package. (Apropos gives me the variables align-load-hook, cal-menu-load-hook, calendar-load-hook, dired-load-hook, ediff-load-hook, and table-load-hook. There might be more.) In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8) of 2015-05-29 on lukas Windowing system distributor `The X.Org Foundation', version 11.0.11501000 System Description: Ubuntu 14.04.3 LTS From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 15 14:32:28 2020 Received: (at 21563) by debbugs.gnu.org; 15 Jan 2020 19:32:28 +0000 Received: from localhost ([127.0.0.1]:35584 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iroOu-0007jn-Nn for submit@debbugs.gnu.org; Wed, 15 Jan 2020 14:32:28 -0500 Received: from ted.gofardesign.uk ([67.225.143.91]:36250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iroOq-0007cx-1u for 21563@debbugs.gnu.org; Wed, 15 Jan 2020 14:32:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=nRKQUPJbr8e02+pieSg0yoXkGjMtMttkfR9Vnj+OWx4=; b=NIezu5nLaGRAB7bgXi4goc0Bby j+tlS+khg2L+leqhr5seSpeChCw7X6nyHXqYcwNTGxjf8hp/kYqjaQtAqOgoHhK+M3QoZ9SiRUW4f XTUrP9IYFnJbiJw1RnKw0Q8X2iaijBDYM+PkmcMNfwsAcdyCEuuxT9Xl08dgN0wTQpmENl0piHzpq HRHAMwZZQO5T2602/7DMh4AwxNU/CgX3SNeCdFgsalYTUy1VO30UibJSBfa7dBAMbh5mhqSb1sYRW DGULjgnxeeWElagnlqCgN2+cqL/uEzHYol6wOneJnl47o4B6zakCzlo3pIy2H01g3Kmq45F+G6Lwy Cw8pce6w==; Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:46792 helo=localhost) by ted.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iroOk-001lro-Cf; Wed, 15 Jan 2020 14:32:14 -0500 From: Stefan Kangas To: "Roland Winkler" Subject: Re: bug#21563: 24.5; discourage load-hook variables In-Reply-To: <39185.7955.374134.22021@gargle.gargle.HOWL> (Roland Winkler's message of "Fri, 25 Sep 2015 13:57:21 -0500") References: <39185.7955.374134.22021@gargle.gargle.HOWL> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Date: Wed, 15 Jan 2020 20:32:12 +0100 Message-ID: <87tv4w1poj.fsf@marxist.se> MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ted.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: ted.gofardesign.uk: stefan@marxist.se X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21563 Cc: 21563@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) "Roland Winkler" writes: > Somewhere in my emacs init file I was setting the variable > dired-load-hook. (I guess I wrote this code years ago when I did > not know much about emacs.) Yet suddenly this did not work for me > anymore, as I had rearranged my init file so that dired got loaded > before I was setting dired-load-hook. I suggest to discourage the > usage of any such load-hook variables: I believe eval-after-load is > considered to be the cleaner alternative: it does not give rise to > the type of problems I ran into. Also it does not require user > variables for each package. > > (Apropos gives me the variables align-load-hook, cal-menu-load-hook, > calendar-load-hook, dired-load-hook, ediff-load-hook, and > table-load-hook. There might be more.) This suggests that all such variables should be considered obsolete, since eval-after-load is cleaner. I think I agree, but I have only ever used eval-after-load so I might be missing something. I would suggest to declare the above variables obsolete and point users to eval-after-load instead. Does anyone disagree with that? Best regards, Stefan Kangas From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 15 15:22:02 2020 Received: (at 21563) by debbugs.gnu.org; 15 Jan 2020 20:22:02 +0000 Received: from localhost ([127.0.0.1]:35646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irpAs-0002mp-CL for submit@debbugs.gnu.org; Wed, 15 Jan 2020 15:22:02 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:60552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irpAm-0002mY-Et for 21563@debbugs.gnu.org; Wed, 15 Jan 2020 15:21:57 -0500 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 00FKHkX4021792; Wed, 15 Jan 2020 20:21:45 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-2019-08-05; bh=3atnFR9UHB8TGw1PGZY88CDBAR+UWcLLQqv4EwXBvuM=; b=r6lhjkpffitsC0PSkQojeHRTo3J6wFCkjbSkluUb44CGF2HC8oXAwq5pHm86vmHJTBEL O2uCStwijZrgjqV2+PuJEdHjiv4lnz/HweRJfDme7gPpfqMVN1vWTlS+BDJ5WtO9KnO9 pa6TY2pFHrZZaN6PT3tjNsdbAcQhaJjFFKDQai3BaSx/MBm9YsjMZUa5n4V56Qd5KS8x ZnAZdE6YXw9uoxNBlGfkt7hOSbPyCaFrpKS1Qrzmzjw4xKxKretcmvrVP7YPmsPpylXm 2RbCjPz1cRxUHPPj6uGuYsJvnRyPwghCIwMTwS03N7Aik/dWz2GnpsivNjs/tOhB0WDd Pg== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 2xf74seh0s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Jan 2020 20:21:45 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 00FKJD08040786; Wed, 15 Jan 2020 20:21:45 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3020.oracle.com with ESMTP id 2xj1prsp19-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Jan 2020 20:21:44 +0000 Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 00FKLg0a003970; Wed, 15 Jan 2020 20:21:43 GMT MIME-Version: 1.0 Message-ID: Date: Wed, 15 Jan 2020 12:21:41 -0800 (PST) From: Drew Adams To: Stefan Kangas , Roland Winkler Subject: RE: bug#21563: 24.5; discourage load-hook variables References: <39185.7955.374134.22021@gargle.gargle.HOWL> <87tv4w1poj.fsf@marxist.se> In-Reply-To: <87tv4w1poj.fsf@marxist.se> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4939.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9501 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 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-1911140001 definitions=main-2001150154 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9501 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2001150154 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 21563 Cc: 21563@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> I had rearranged my init file so that dired got loaded >> before I was setting dired-load-hook. IOW, simple pilot error. > I would suggest to declare the above variables obsolete > and point users to eval-after-load instead. Why? If the only reason (only one given so far) is that a user set a hook after loading and expected the hook setting to be effective, then I'd say that's not a great reason. Pilot error can also happen for `(with-)eval-after-load'. And there was talk at one time of discouraging that as well, I believe. It's still discouraged for code that's to be included in Emacs - see (emacs) `Coding Standards'. (But see also (emacs) `Foldout'.) And see (elisp) `Hooks for Loading': "Normally, well-designed Lisp programs should not use 'with-eval-after-load'." Granted, that's about "Lisp programs" and not init files. Still... > Does anyone disagree with that? I think I do. I see something like `dired-load-hook' as a different tool than `(with-)eval-after-load'. Not worse or better, either generally or always. Setting or changing the explicit hook value has no effect if the library was already loaded, whereas `(with-)eval-after-load' has an immediate effect in=20 that case. (Sure, the latter could test in its body whether it's loaded and act conditionally...) I see no good reason why, because there is more than one way to do something, and some users might shoot themselves in the foot with some of those ways, we should remove those that let you do that. Emacs and Emacs Lisp provide tons of ways to do things, and many ways to shoot yourself in the foot. We can instead make clear in the doc anything that might need pointing out. In this case, I doubt that Roland was just lacking a statement that the load hook would have no effect if the library had already been loaded. But we could certainly make that fact explicit, if it helps in general. Note too that `C-h f dired-mode' explicitly lists the hooks: Hooks (use C-h v to see their documentation): 'dired-before-readin-hook' 'dired-after-readin-hook' 'dired-mode-hook' 'dired-load-hook' When you use apropos or similar to find a Dired hook you find one for after-loading. Removing that hook means you won't find it. This doc would then need to be changed to list the other hooks but also say that if you want a function to be invoked after loading then use `(with-)eval-after-load' and invoke the function in the body. IOW, no parallelism or discoverability. Many users won't know about `(with-)eval-after-load'. In addition, users can easily get confused between 'dired-after-readin-hook' and 'dired-load-hook'. Having both, with their documentation, helps users DTRT. What does it really hurt, to keep such hooks? From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 15 15:42:49 2020 Received: (at 21563) by debbugs.gnu.org; 15 Jan 2020 20:42:49 +0000 Received: from localhost ([127.0.0.1]:35690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irpV3-0003Je-2c for submit@debbugs.gnu.org; Wed, 15 Jan 2020 15:42:49 -0500 Received: from ted.gofardesign.uk ([67.225.143.91]:44676) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irpV1-0003JP-1D for 21563@debbugs.gnu.org; Wed, 15 Jan 2020 15:42:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=jvX3/AEMw2Dgdi6rfla8iI3nmc0qpShRYCoHP/6s/Hk=; b=KWj57mgoXZcLjCl8raPjw474jo 7ah7O+cWxhcdAhRmE9rADGjvGTHn/0Kz4FmPzKkKZ22YojKrFYYo3RK9apohGLzDemip5Af2jGWwv zZ9tNaZ48dMxrJY6xzbihq8Ww3qe0k2cvSDfumO8OIuu5yQ/Q5cw6l+tUZgKoLcfvHKSOJsh0VbNH uMec3DzNmD3H8dgV13XOT/nxl4gyu2iiJUyd6ww3PFuzMexZR1RWx0EXXcGc5cTjP3RwHoIVrvnDq Ju8OtNaOo5nXGNaFn1xRTRm7sgxxD1M23hOBZVPEv8oSut3pWzCNFhsGDcGogVCcVVpPEGbl61pdB lG3L46uA==; Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:58374 helo=localhost) by ted.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1irpUv-0007pW-3u; Wed, 15 Jan 2020 15:42:41 -0500 From: Stefan Kangas To: Drew Adams Subject: Re: bug#21563: 24.5; discourage load-hook variables In-Reply-To: (Drew Adams's message of "Wed, 15 Jan 2020 12:21:41 -0800 (PST)") References: <39185.7955.374134.22021@gargle.gargle.HOWL> <87tv4w1poj.fsf@marxist.se> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Date: Wed, 15 Jan 2020 21:42:39 +0100 Message-ID: <87zheozc1s.fsf@marxist.se> MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ted.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: ted.gofardesign.uk: stefan@marxist.se X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21563 Cc: Roland Winkler , 21563@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Drew Adams writes: >> I would suggest to declare the above variables obsolete >> and point users to eval-after-load instead. > > Why? If the only reason (only one given so far) is > that a user set a hook after loading and expected > the hook setting to be effective, then I'd say that's > not a great reason. I think the idea here was mainly to get rid of redundancy. But see below. > And there was talk at one time of discouraging that as > well, I believe. It's still discouraged for code that's > to be included in Emacs - see (emacs) `Coding Standards'. > (But see also (emacs) `Foldout'.) > > And see (elisp) `Hooks for Loading': > "Normally, well-designed Lisp programs should not > use 'with-eval-after-load'." > > Granted, that's about "Lisp programs" and not init > files. Still... > >> Does anyone disagree with that? > > I think I do. I see something like `dired-load-hook' > as a different tool than `(with-)eval-after-load'. > Not worse or better, either generally or always. > > Setting or changing the explicit hook value has > no effect if the library was already loaded, whereas > `(with-)eval-after-load' has an immediate effect in > that case. (Sure, the latter could test in its body > whether it's loaded and act conditionally...) Good point. So it seems like load-hooks and eval-after-load are slightly different and could both be useful. In that case, I guess this should be closed as a wontfix? Best regards, Stefan Kangas From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 15 17:06:46 2020 Received: (at 21563) by debbugs.gnu.org; 15 Jan 2020 22:06:46 +0000 Received: from localhost ([127.0.0.1]:36426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irqoG-0005cu-8e for submit@debbugs.gnu.org; Wed, 15 Jan 2020 17:06:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irqoB-0005ce-N6 for 21563@debbugs.gnu.org; Wed, 15 Jan 2020 17:06:43 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44592) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1irqo6-0004ei-CC; Wed, 15 Jan 2020 17:06:34 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1irqo3-0007TR-HB; Wed, 15 Jan 2020 17:06:31 -0500 From: Glenn Morris To: Stefan Kangas Subject: Re: bug#21563: 24.5; discourage load-hook variables References: <39185.7955.374134.22021@gargle.gargle.HOWL> <87tv4w1poj.fsf@marxist.se> X-Spook: Air Marshal Authorities Telecommunications Storm PLF X-Ran: v`}B;Po7_1Q%eG'\9;{np^vwWjueLxn-Xft_x'ep40\1[o{Hu9]5}\':bbC^Epv4dbIHa% X-Hue: blue X-Debbugs-No-Ack: yes X-Attribution: GM Date: Wed, 15 Jan 2020 17:06:31 -0500 In-Reply-To: <87tv4w1poj.fsf@marxist.se> (Stefan Kangas's message of "Wed, 15 Jan 2020 20:32:12 +0100") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 21563 Cc: Roland Winkler , 21563@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Stefan Kangas wrote: > This suggests that all such variables should be considered obsolete, > since eval-after-load is cleaner. I think I agree, but I have only > ever used eval-after-load so I might be missing something. > > I would suggest to declare the above variables obsolete and point > users to eval-after-load instead. I did this years ago for a few modes; eg dd210a6, 041e909, but never got round to doing the rest. As I said in https://debbugs.gnu.org/24491#8, I see no need to keep any *-load-hooks. From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 15 19:03:47 2020 Received: (at 21563) by debbugs.gnu.org; 16 Jan 2020 00:03:47 +0000 Received: from localhost ([127.0.0.1]:36494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irsdX-0008SW-Hp for submit@debbugs.gnu.org; Wed, 15 Jan 2020 19:03:47 -0500 Received: from ted.gofardesign.uk ([67.225.143.91]:60700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irsdW-0008SJ-2x for 21563@debbugs.gnu.org; Wed, 15 Jan 2020 19:03:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=8L1dqeAAhJR1VrwhO3x1uAfgusHB3zFqq4ro5jg6hR8=; b=GW26yRViNBDSJO9FY1JWf3Vuk2 eCWkHvbk1JvH5dtXxRguO8XDZnO7D1WYnb8MIASLPldDZdkMNqL69fP+zB0ra8XlDIQcAsyel/+RB 0zhDJcfEr7WbgKfUfeMe9PxKzONv65/JmBbRr2UkZhiWEzlIt0Tjmv+0a6C1u1u7C32cXnY5/HVcV 8DVQfsCTty4MUo+YELbGnoWyBBKAC6CXkZssms1aHrz+heyTRvJZpusAc4lGKgK978dOl5Ztqo4hq tYQLkSYnziGlP/iRupQhdK2cI5XrCxwEwH4sR/O/eg6RHj9XvwoY4ZJ4AbCsLw4crgC8GmIDy25gX 7/RXS0rQ==; Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:51352 helo=localhost) by ted.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1irsdP-000qBb-Hw; Wed, 15 Jan 2020 19:03:39 -0500 From: Stefan Kangas To: Glenn Morris Subject: Re: bug#21563: 24.5; discourage load-hook variables In-Reply-To: (Glenn Morris's message of "Wed, 15 Jan 2020 17:06:31 -0500") References: <39185.7955.374134.22021@gargle.gargle.HOWL> <87tv4w1poj.fsf@marxist.se> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Date: Thu, 16 Jan 2020 01:03:37 +0100 Message-ID: <87muaoz2qu.fsf@marxist.se> MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ted.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: ted.gofardesign.uk: stefan@marxist.se X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21563 Cc: Roland Winkler , 21563@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Glenn Morris writes: > Stefan Kangas wrote: > >> This suggests that all such variables should be considered obsolete, >> since eval-after-load is cleaner. I think I agree, but I have only >> ever used eval-after-load so I might be missing something. >> >> I would suggest to declare the above variables obsolete and point >> users to eval-after-load instead. > > I did this years ago for a few modes; eg dd210a6, 041e909, but never got > round to doing the rest. As I said in https://debbugs.gnu.org/24491#8, I > see no need to keep any *-load-hooks. Interesting. Since they also seem to be prone to cause problems like in Bug#24491, perhaps it is indeed better to get rid of them. They do look crufty and redundant once you start reviewing them in context -- with no clear benefit. I believe Drew already pointed out that any use of them could be easily replaced by (with-)?eval-after-load. I'll be happy to do (at least parts of) this, but should such changes be announced in NEWS? I noticed that you didn't do that in dd210a6 or 041e909. Best regards, Stefan Kangas From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 15 19:24:21 2020 Received: (at 21563) by debbugs.gnu.org; 16 Jan 2020 00:24:21 +0000 Received: from localhost ([127.0.0.1]:36506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irsxR-0000Vi-J4 for submit@debbugs.gnu.org; Wed, 15 Jan 2020 19:24:21 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:41782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irsxP-0000VT-Dc for 21563@debbugs.gnu.org; Wed, 15 Jan 2020 19:24:20 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 00G0DOxw157344; Thu, 16 Jan 2020 00:24:13 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-2019-08-05; bh=OAl1+haylZgWPxamv2jz8uGK7+XTXW/JOBxlgydy94I=; b=nzpmPBDjkQ9my3uvMf84dqH9Mc2cIp24Trp+F4vLD6YxdhjJwPQQK34TyYTK+MxdTJap +Du3uPmuJDL5b++QlBtfPqSmC7ZVcV04qVKMhYrkylCyrAVOrZym7cvUtnzDVlTrP4qc BdkfU2qsODJjvOwypa61kmL5WEsqHcFnvIpJpss5i5AVUavTWdNM7Eo2Rlj2Zmj+Pv+H lsP9I3TEALzsBwrgmMwwtiuqkTTtpzQhdhpsUJgu9cTo8HqMnNKkFQrM6rux5nOQjOnp D56EYfEt7NdwvcAmzi3A9xL0y/dGEOzzkUpVudFt94o9VDtArYKg5gAbr8w2/BFdkdgN Fw== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 2xf73tydss-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Jan 2020 00:24:13 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 00G0ED7T148142; Thu, 16 Jan 2020 00:24:12 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 2xj1ps3c4g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Jan 2020 00:24:12 +0000 Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 00G0OB6T029703; Thu, 16 Jan 2020 00:24:11 GMT MIME-Version: 1.0 Message-ID: <320a9fa6-6419-420e-ac97-9dcbe54a04a6@default> Date: Wed, 15 Jan 2020 16:24:10 -0800 (PST) From: Drew Adams To: Stefan Kangas , Glenn Morris Subject: RE: bug#21563: 24.5; discourage load-hook variables References: <39185.7955.374134.22021@gargle.gargle.HOWL> <87tv4w1poj.fsf@marxist.se> <87muaoz2qu.fsf@marxist.se> In-Reply-To: <87muaoz2qu.fsf@marxist.se> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4939.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9501 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 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-1911140001 definitions=main-2001160000 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9501 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 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-1911140001 definitions=main-2001160000 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 21563 Cc: Roland Winkler , 21563@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Interesting. Since they also seem to be prone to cause problems like > in Bug#24491, perhaps it is indeed better to get rid of them. They do > look crufty and redundant once you start reviewing them in context -- > with no clear benefit. >=20 > I believe Drew already pointed out that any use of them could be > easily replaced by (with-)?eval-after-load. No. I didn't say anything about "any use of them". I said only that the behavior that a load hook isn't invoked if the library has already been loaded can be realized by using conditional code inside `(with-)?eval-after-load'. A load hook is a function. Code can invoke it anytime, in any context. It has no predefined behavior, on its own - in particular, nothing like `(with-)?eval-after-load' behavior. The only similarity is that by convention a load hook is invoked at the end of a Lisp file. But nothing prevents using a (funcall dired-load-hook) anywhere. This is not to say that we really need to be able to do that. It's just to say that there's no way to claim that `(with-)?eval-after-load' can be made to do what a load hook does, in general. I don't have a giant objection to doing what you're talking about doing. But I think it's unfortunate, and little, if anything, is really gained. Who knows what 3rd-party code out there makes use of such hooks? And again, they're easy for users to discover. And I think they're likely to be used by code, and not just in init files. That's not so true of `(with-)?eval-after-load' (explicitly discouraged). From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 15 19:28:07 2020 Received: (at 21563) by debbugs.gnu.org; 16 Jan 2020 00:28:07 +0000 Received: from localhost ([127.0.0.1]:36510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irt15-0000bM-6b for submit@debbugs.gnu.org; Wed, 15 Jan 2020 19:28:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irt13-0000aq-97 for 21563@debbugs.gnu.org; Wed, 15 Jan 2020 19:28:05 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46499) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1irt0y-0000PY-3F; Wed, 15 Jan 2020 19:28:00 -0500 Received: from [2601:240:8300:d3d0:248b:bf11:be2e:5309] (port=58926 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1irt0x-0001OX-2G; Wed, 15 Jan 2020 19:27:59 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <44557.57231.795451.24095@gargle.gargle.HOWL> Date: Wed, 15 Jan 2020 18:27:57 -0600 From: "Roland Winkler" To: Stefan Kangas Subject: Re: bug#21563: 24.5; discourage load-hook variables In-Reply-To: <87zheozc1s.fsf@marxist.se> References: <39185.7955.374134.22021@gargle.gargle.HOWL> <87tv4w1poj.fsf@marxist.se> <87zheozc1s.fsf@marxist.se> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 21563 Cc: 21563@debbugs.gnu.org, Drew Adams X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On Wed Jan 15 2020 Stefan Kangas wrote: > Drew Adams writes: > > Setting or changing the explicit hook value has > > no effect if the library was already loaded, whereas > > `(with-)eval-after-load' has an immediate effect in > > that case. (Sure, the latter could test in its body > > whether it's loaded and act conditionally...) > > Good point. So it seems like load-hooks and eval-after-load are > slightly different and could both be useful. What is the benefit of being able to put something into a load-hook that will be ignored because the feature was already loaded? Is there a real-world example that can illustrate how this is useful? From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 15 19:31:24 2020 Received: (at 21563) by debbugs.gnu.org; 16 Jan 2020 00:31:24 +0000 Received: from localhost ([127.0.0.1]:36514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irt4G-0000hJ-Lg for submit@debbugs.gnu.org; Wed, 15 Jan 2020 19:31:24 -0500 Received: from ted.gofardesign.uk ([67.225.143.91]:34468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irt4F-0000h4-DE for 21563@debbugs.gnu.org; Wed, 15 Jan 2020 19:31:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=0N4g2xQ6MLirtA9BHqGDzV5S5edHPxX61WOwCYeJOGU=; b=FgkKliLyWRJubiq/u/1x9wtF0V nLiNjtbFTBYfMFZYE6ZMURvk6EMLR6DqVzkQQh8pVDHyyQ15erHXqcdNTVsaTS91OYEGEx/q/UYB/ p+7AAD2Wx7jAlp/5F5wlBhUNqz2iD9e+PSynHfBodnaZ9PGetgZ7IZg2plFY5aZ7iM2txQ2ViwCQF jqpTnrMVl6Huhl7aZsK/q7xCIwmQMvThLK2yHL5QHt3LHoigDOGEz+7kAEkyX8SljxEpsI2nmZqEs cT/vWmr2Vn8H0ZnhiCtce2RVdeFsD0ki+FO56hRHWSrPUakVoOV5MIulFXDg3t6R9/vgah5T80UOG jdkcBCsw==; Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:38538 helo=localhost) by ted.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1irt49-000wEs-LA; Wed, 15 Jan 2020 19:31:17 -0500 From: Stefan Kangas To: Glenn Morris Subject: Re: bug#21563: 24.5; discourage load-hook variables In-Reply-To: <87muaoz2qu.fsf@marxist.se> (Stefan Kangas's message of "Thu, 16 Jan 2020 01:03:37 +0100") References: <39185.7955.374134.22021@gargle.gargle.HOWL> <87tv4w1poj.fsf@marxist.se> <87muaoz2qu.fsf@marxist.se> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Date: Thu, 16 Jan 2020 01:31:15 +0100 Message-ID: <87k15sz1gs.fsf@marxist.se> MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ted.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: ted.gofardesign.uk: stefan@marxist.se X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21563 Cc: Roland Winkler , 21563@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) I now noticed that there is a bunch of hooks in eshell which seems to never be called with run-hooks? For example, eshell-alias-load-hook or eshell-glob-load-hook. Am I missing something here? Best regards, Stefan Kangas From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 15 19:54:56 2020 Received: (at 21563) by debbugs.gnu.org; 16 Jan 2020 00:54:56 +0000 Received: from localhost ([127.0.0.1]:36531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irtR1-0001Eb-Ox for submit@debbugs.gnu.org; Wed, 15 Jan 2020 19:54:56 -0500 Received: from ted.gofardesign.uk ([67.225.143.91]:36578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irtQz-0001EO-Qw for 21563@debbugs.gnu.org; Wed, 15 Jan 2020 19:54:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=xjme4ZI7mvGCZLR8w6ouc0jyD2Qx0oHvm2b2y8dziSo=; b=KF5UBSNjZ/UIVoagPD9T0qeU9D AX89GqjZVSMHM/JYDrtlr22eY+9Ihcad+1o1IOsYDHZ7cMsqGDKZyGRGxgrv1N1mK+T6gerByDCH2 81AK3+EvmI/6scSCcKntUk+6pM14XdJHjEVpoDmkkJgU3xJXj92CguauX2TfwhgyYo1hzKwyimtEi ypDlbc8nUwR6Rd5ZNfxwoNBlDK+z7ECvb6KdGODp059eXWAACc+v6egbqavfrGJ9ZVZI5LUl5Y8h9 CkUWRgm0XvIBBcjvuZffRjiE7z3WccYNVgCOUYeBXIv5dcqxdh/nWtkWVZ1RkFc/A2M3hcJJkNyII CFnuJSpg==; Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:51036 helo=localhost) by ted.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1irtQt-0011R4-V4; Wed, 15 Jan 2020 19:54:48 -0500 From: Stefan Kangas To: Drew Adams Subject: Re: bug#21563: 24.5; discourage load-hook variables In-Reply-To: <320a9fa6-6419-420e-ac97-9dcbe54a04a6@default> (Drew Adams's message of "Wed, 15 Jan 2020 16:24:10 -0800 (PST)") References: <39185.7955.374134.22021@gargle.gargle.HOWL> <87tv4w1poj.fsf@marxist.se> <87muaoz2qu.fsf@marxist.se> <320a9fa6-6419-420e-ac97-9dcbe54a04a6@default> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Date: Thu, 16 Jan 2020 01:54:45 +0100 Message-ID: <87h80wz0dm.fsf@marxist.se> MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ted.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: ted.gofardesign.uk: stefan@marxist.se X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21563 Cc: Glenn Morris , Roland Winkler , 21563@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Drew Adams writes: > I said only that the behavior that a load hook isn't invoked > if the library has already been loaded can be realized by > using conditional code inside `(with-)?eval-after-load'. Thanks, you are correct. I didn't mean to misquote you. > A load hook is a function. Code can invoke it anytime, in > any context. It has no predefined behavior, on its own - > in particular, nothing like `(with-)?eval-after-load' > behavior. The only similarity is that by convention a load > hook is invoked at the end of a Lisp file. But nothing > prevents using a (funcall dired-load-hook) anywhere. > > This is not to say that we really need to be able to do > that. It's just to say that there's no way to claim that > `(with-)?eval-after-load' can be made to do what a load > hook does, in general. The question now though is more limited: is it useful to keep them or not? Glenn says that it is not useful, and I think I agree with him. > I don't have a giant objection to doing what you're talking > about doing. But I think it's unfortunate, and little, if > anything, is really gained. Well, Emacs is old. Like any old software, it has a certain amount of cruft and/or historical accidents. Getting rid of such things when we can makes Emacs easier to maintain in the long run. > Who knows what 3rd-party code out there makes use of such hooks? It should migrate to use (with-)eval-after-load. That should be backwards compatible through "Emacs version 19.29" according to C-h f. Note that the way these hooks have been obsoleted by Glenn is to still run them if they exist, but add an obsoletion warning. I think this is the correct approach. Given how long it takes for us to finally delete obsolete stuff, that should give ten years, give or take, before any third party code depending on these hooks would stop working. > And again, they're easy for users to discover. I think a general facility is even more discoverable and user friendly. In particular, it shows users that this could be used for any package, and not just packages which has defined a particular hook. > And I think they're likely to be used by code, and not just in init > files. That's not so true of `(with-)?eval-after-load' (explicitly > discouraged). Shouldn't use of these hooks in code be considered bad practice for the same reasons that eval-after-load is? Best regards, Stefan Kangas From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 15 22:56:23 2020 Received: (at 21563) by debbugs.gnu.org; 16 Jan 2020 03:56:23 +0000 Received: from localhost ([127.0.0.1]:36593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irwGd-0005kn-BK for submit@debbugs.gnu.org; Wed, 15 Jan 2020 22:56:23 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:59166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irwGa-0005kZ-Ih for 21563@debbugs.gnu.org; Wed, 15 Jan 2020 22:56:21 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 00G3sBXP121293; Thu, 16 Jan 2020 03:56:14 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-2019-08-05; bh=A6NFAvSG63Js9PfVKTLwu39q6O8d+P2rIyga3QHUvqY=; b=Jd38rO3lfTT/HspDoTFB/YdHPYL0sIud4wT0sgFuEIXVLGFEmBorRpp2q66samFtoU7Y 5BDO5JokzM5D7n9yxuPpC+pyqISPIOWLq7sJWP2VnoxwRkyPL1/c8GnsolfcK8DFk0HA yRyVe0Hk5Qtwcn0p2bkNRNrSuIUUMBSIFQmm/mKWdPQ/HgGTDOkUIECkScYA6+w0LbD3 q5NzTERZ1e7bj+etveASNW0lJmPt2IYFTriDrmVjnqZQFhXZL/+FnsPCBM87ms41bb4Q eypDXy8iQ2CJEJgoBk9wP+1YiHpc81mPxsof/0qsC+TSKUjTNAcWEHdrig8eBJFxPg6L mg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 2xf73yr1b0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Jan 2020 03:56:14 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 00G3sbOS169986; Thu, 16 Jan 2020 03:56:13 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3030.oracle.com with ESMTP id 2xj61kukck-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Jan 2020 03:56:13 +0000 Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 00G3uAVj028606; Thu, 16 Jan 2020 03:56:11 GMT MIME-Version: 1.0 Message-ID: <80b979c0-0fdf-4b84-bf1b-cde0a596f8bb@default> Date: Wed, 15 Jan 2020 19:56:09 -0800 (PST) From: Drew Adams To: Stefan Kangas Subject: RE: bug#21563: 24.5; discourage load-hook variables References: <39185.7955.374134.22021@gargle.gargle.HOWL> <87tv4w1poj.fsf@marxist.se> <87muaoz2qu.fsf@marxist.se> <320a9fa6-6419-420e-ac97-9dcbe54a04a6@default> <87h80wz0dm.fsf@marxist.se> In-Reply-To: <87h80wz0dm.fsf@marxist.se> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4939.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9501 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 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-1911140001 definitions=main-2001160030 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9501 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 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-1911140001 definitions=main-2001160030 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 21563 Cc: Glenn Morris , Roland Winkler , 21563@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > > I don't have a giant objection to doing what you're talking > > about doing. But I think it's unfortunate, and little, if > > anything, is really gained. >=20 > Well, Emacs is old. Like any old software, it has a certain amount of > cruft and/or historical accidents. Getting rid of such things when we > can makes Emacs easier to maintain in the long run. So is the argument now that the existence of load hooks makes maintenance too complicated? What will be the next argument? `eval-after-load' is at least as old as load hooks. Probably both have been there since about Day One. Maybe ask RMS why. Maybe load hooks are just cruft, or maybe not. > > Who knows what 3rd-party code out there makes use of such hooks? >=20 > It should migrate to use (with-)eval-after-load. That should be > backwards compatible through "Emacs version 19.29" according to C-h f. Why should it migrate? That's my question. Why is it good now to toss load hooks, when that hasn't been needed before? 40 years of Emacs, and now there's a reason to toss them. What's so important about this now? A bug filed because someone set a hook too late in his init file? If that were a big problem, don't you think load hooks would have been removed long ago? > Note that the way these hooks have been obsoleted by Glenn is to still > run them if they exist, but add an obsoletion warning. I think this > is the correct approach. >=20 > Given how long it takes for us to finally delete obsolete stuff, that > should give ten years, give or take, before any third party code > depending on these hooks would stop working. Why delete them at all, finally or immediately? What's the real point? The only thing new (and that's several years old now) was the addition of `with-eval-after-load' (because some users were forgetting that `eval-after-load' is a function, and so evaluates its args). > > And again, they're easy for users to discover. >=20 > I think a general facility is even more discoverable and user > friendly. In particular, it shows users that this could be used for > any package, and not just packages which has defined a particular > hook. The two aren't the same, as I pointed out. And see what I said earlier about discoverability. A hook named after a feature draws your attention to the possibility of hooking in some code there - at that spot, for that feature. A general facility to eval some code after loading a file, any file, isn't quite the same, in particular in terms of notice (discoverability). > > And I think they're likely to be used by code, and not just in init > > files. That's not so true of `(with-)?eval-after-load' (explicitly > > discouraged). >=20 > Shouldn't use of these hooks in code be considered bad practice for > the same reasons that eval-after-load is? Dunno. Why so? They haven't been introduced at the end of every single library. Someone presumably had a reason for introducing each one, or at least most. A hook is an explicit signal that you kinda expect someone (some code) to want to hook in some other code at that spot. A hook is an invitation: "Here's a place you might want to do something." There are no doubt specific hooks that no one has ever used and that could perhaps be removed. But why do so? Many load hooks are even user options (I don't argue they should be). Users who've customized them will eventually find that they've become no-ops. `dired-load-hook', for example, has this added to its doc string, to tell you about possible use cases: "You can customize key bindings or load extensions with this." Why do we still have _any_ hooks? Why not argue (maybe someone will - Stefan?) that nadvice makes all other hooks obsolete. Anyway, as I say, I don't care much, if no one else cares about this. Please be sure to take care of all places that might take such hooks into consideration. This comment in dired-x.el, for example (no idea whether it's important): ;; This is a no-op if dired-x is being loaded via `dired-load-hook', ;; but maybe not if a dired-x function is being autoloaded. (require 'dired) And there are some hooks with `-load-hook' in the name that don't seem to be hooks run after loading a file. `ff-pre-load-hook' and `ff-post-load-hook', for example. For them, "loading" a file apparently means something quite different (if so, that's a naming bug). And they are buffer-local variables. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 16 06:50:18 2020 Received: (at 21563) by debbugs.gnu.org; 16 Jan 2020 11:50:18 +0000 Received: from localhost ([127.0.0.1]:36812 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1is3fD-0002pf-5E for submit@debbugs.gnu.org; Thu, 16 Jan 2020 06:50:18 -0500 Received: from mail-lj1-f174.google.com ([209.85.208.174]:37154) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1is3f7-0002pE-5J for 21563@debbugs.gnu.org; Thu, 16 Jan 2020 06:50:13 -0500 Received: by mail-lj1-f174.google.com with SMTP id o13so22266239ljg.4 for <21563@debbugs.gnu.org>; Thu, 16 Jan 2020 03:50:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=rbcgWBJ3fXqMwf3enwFhEOkAEjnYOzl+KRip2K8tdws=; b=NTHiXB5S2HeggAMdeqA4rqGRqnuqm2122xguU95oeR/MO9+M9tNnKTa+lm3Ju2c/T+ AG750Bp/mtTRWZ+XhLpKQlFJVur3EwoOD+m2t5LMcXXhp1sK7O9ecHdljM9L/1ryAtof 3wSM2kEoYSqTOYMe+S/yqEWAGrhfs/tQmv/qJz+3DCv+0lE2LG/F9iWmw7y1HVNPLA2A /yNFR20mYX/dbtVJyoNnSSizFWff/NsxDyRdtwlV8mYpd4ZgNU+aNHqNAvzaKy0uHHvM 7hkiDhUXoDvmYgdZUgRg51bAoY/8KCC63RopG629cJ1E1d9+la2PmF0ioQebI181iOiC HSnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=rbcgWBJ3fXqMwf3enwFhEOkAEjnYOzl+KRip2K8tdws=; b=IBkjJsjU9QXYk4bai4exqjE0d//glyKmzLdNfNjqWDY2ZPHG9q9/ZDb1BxjO3ixXvg IfvC4e9XhIG0F7sJ9SBj3mUelkLVFLo6jLPRoMj1zrYXff9gvYBATqj/eui/3gUXrstX +mg2uMQBuW5nXAy+SonDUOe9UXsq1rE1dq78T4/x+bgJzHcD7cl3GxLVrjB5dk9HabxK CTHQkZKEUXyC9UtsZg008EE0GtT3jiGwfz8Mnx/B0yEDyoMw/x27269Q3PM30W+ZBf/e 9ML0TtsjDy/5sQGy4ykODavzW+aPYg5mVhzQ2R8s1C/yHTpC0r1hEA7eo+OThj6x4zjY sNRw== X-Gm-Message-State: APjAAAUcOXpbQFiVFVXVVucikPSKlkNIDHF27Z9W/nvVtj6OTG9ldVhp 5itRK3ZuVbddm09GNy7nY3xOANLX5U+8N/zIJjImyBghJT4= X-Google-Smtp-Source: APXvYqx3jXsFq5PbfMsbinC5KzVYtQ+n3hUoMeTjBjxCrifNYmhqAY+EzbgYr+amzfyS9sbmdEBxgVMBhGGQB2b/SzY= X-Received: by 2002:a2e:98c4:: with SMTP id s4mr2089917ljj.102.1579175401909; Thu, 16 Jan 2020 03:50:01 -0800 (PST) MIME-Version: 1.0 From: Mauro Aranda Date: Thu, 16 Jan 2020 08:49:50 -0300 Message-ID: Subject: Re: bug#21563: 24.5; discourage load-hook variables To: Stefan Kangas Content-Type: multipart/alternative; boundary="000000000000de7262059c406cc8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21563 Cc: 21563@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000de7262059c406cc8 Content-Type: text/plain; charset="UTF-8" Stefan Kangas writes: > I now noticed that there is a bunch of hooks in eshell which seems to > never be called with run-hooks? For example, eshell-alias-load-hook > or eshell-glob-load-hook. > > Am I missing something here? eshell-mode runs every necessary eshell-*-load-hook. Those that belong to eshell modules, like the ones you mentioned, run only if the module is activated (when it is a member of the customizable option eshell-modules-list). --000000000000de7262059c406cc8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Stefan Kangas <ste= fan@marxist.se> writes:

> I now noticed that there is a bu= nch of hooks in eshell which seems to
> never be called with run-hook= s?=C2=A0 For example, eshell-alias-load-hook
> or eshell-glob-load-ho= ok.
>
> Am I missing something here?

eshell-mode runs ev= ery necessary eshell-*-load-hook.=C2=A0 Those that belong
to eshell modu= les, like the ones you mentioned, run only if the module
is activated (w= hen it is a member of the customizable option
eshell-modules-list). --000000000000de7262059c406cc8-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 16 08:33:38 2020 Received: (at 21563) by debbugs.gnu.org; 16 Jan 2020 13:33:39 +0000 Received: from localhost ([127.0.0.1]:36859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1is5HC-0007Q1-T4 for submit@debbugs.gnu.org; Thu, 16 Jan 2020 08:33:38 -0500 Received: from ted.gofardesign.uk ([67.225.143.91]:44484) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1is5H7-0007Pg-AA for 21563@debbugs.gnu.org; Thu, 16 Jan 2020 08:33:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=ozdOOTlMSFEkKLFbcVx04rLe9ANZcV0X6o3skUjHJPo=; b=OLiFz5uKpf0XgRt92TgSW8OQJi kvpIJ1exPS84gJSd8cqALD2oacpPMUmljvXVw8JS8KRmDd7bpGvsVHzAVoxS8nsOdPYFcGERftB1T IytQODN+VFaZRYz+4r4TSoh9Bu6as3t6OPSJkIKnXEJP8oI3krTJmZHHIYIyTuaVJ1D2JbbRGwZ+h 6hfaJYPH6l/GT8JtymiX4w4Wru6AvANMsEhyqyaLRkws3u7Dv73zuc4mtVZQNNuOGRDA2gjFHyNuq Kur49ptSQn1cXvYqiP5ksMSKLVC95y5aNiO/ihVn283r/qb683r2BjJ+Gf1mLopsaGlwuxgiFqsGb b31/fMUg==; Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:42518 helo=localhost) by ted.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1is5H0-000Bm1-LU; Thu, 16 Jan 2020 08:33:22 -0500 From: Stefan Kangas To: Drew Adams Subject: Re: bug#21563: 24.5; discourage load-hook variables In-Reply-To: <80b979c0-0fdf-4b84-bf1b-cde0a596f8bb@default> (Drew Adams's message of "Wed, 15 Jan 2020 19:56:09 -0800 (PST)") References: <39185.7955.374134.22021@gargle.gargle.HOWL> <87tv4w1poj.fsf@marxist.se> <87muaoz2qu.fsf@marxist.se> <320a9fa6-6419-420e-ac97-9dcbe54a04a6@default> <87h80wz0dm.fsf@marxist.se> <80b979c0-0fdf-4b84-bf1b-cde0a596f8bb@default> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Date: Thu, 16 Jan 2020 14:33:19 +0100 Message-ID: <87tv4vy19c.fsf@marxist.se> MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ted.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: ted.gofardesign.uk: stefan@marxist.se X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21563 Cc: Glenn Morris , Roland Winkler , 21563@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Drew Adams writes: > So is the argument now that the existence of load > hooks makes maintenance too complicated? What will > be the next argument? To summarize what has come up in this thread so far, the load-hook convention has the following problems: 1. They are never called if set by a user after a library is loaded. 2. They can lead to issues like Bug#24491. 3. They require every package (that wants to use them) to add boiler plate code. They are also redundant since we have eval-after-load and with-eval-after-load, which do not have any of the above problems. Best regards, Stefan Kangas From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 16 11:16:10 2020 Received: (at 21563) by debbugs.gnu.org; 16 Jan 2020 16:16:10 +0000 Received: from localhost ([127.0.0.1]:38290 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1is7oY-00018S-Fe for submit@debbugs.gnu.org; Thu, 16 Jan 2020 11:16:10 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:33502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1is7oW-000187-Ef for 21563@debbugs.gnu.org; Thu, 16 Jan 2020 11:16:08 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 00GGCSMp127917; Thu, 16 Jan 2020 16:16:02 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-2019-08-05; bh=svoMmCqgwI6mYoql6c4aguA2OHFtsZ8j8luFXhjnqkw=; b=mG+0ycoyhGWi7FjW+XdgVaudVB1e5dHD7Ib/HB3gF1ZPo+2vsmTDKoKnG/gbESL0E7Xk hn6c3/2g9a6z1Dfzo2GIGuRJEm4JvDrmc+/0bNJIP7Yi008X7y18PesNxffa2RCwdEL7 Z1eceU5eM4IdPoB94gcn2UXWxt6DnTpWusJ5OhhP6bO77of07KmFgyYD/7W5phdwLiPE ojNbS7gJIaWPcUOGZomKZ+vJI9xFV8wex0DvE4O1rlWyLB5ABrIe9vSZDSpSBnWxNjmT 3AjwRQMcd/gOp5s+B6kt9/NxXyUb3yR90FdVqBZfmZi12c2o8RitfLWJ8prz09Bg5n5l rQ== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 2xf73yuh28-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Jan 2020 16:16:02 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 00GG4Hro168442; Thu, 16 Jan 2020 16:16:02 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3020.oracle.com with ESMTP id 2xj1ptbpxq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Jan 2020 16:16:01 +0000 Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 00GGFxic003617; Thu, 16 Jan 2020 16:16:00 GMT MIME-Version: 1.0 Message-ID: Date: Thu, 16 Jan 2020 08:15:58 -0800 (PST) From: Drew Adams To: Stefan Kangas Subject: RE: bug#21563: 24.5; discourage load-hook variables References: <39185.7955.374134.22021@gargle.gargle.HOWL> <87tv4w1poj.fsf@marxist.se> <87muaoz2qu.fsf@marxist.se> <320a9fa6-6419-420e-ac97-9dcbe54a04a6@default> <87h80wz0dm.fsf@marxist.se> <80b979c0-0fdf-4b84-bf1b-cde0a596f8bb@default> <87tv4vy19c.fsf@marxist.se> In-Reply-To: <87tv4vy19c.fsf@marxist.se> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4939.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9502 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 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-1911140001 definitions=main-2001160133 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9502 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 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-1911140001 definitions=main-2001160133 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 21563 Cc: Glenn Morris , Roland Winkler , 21563@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > To summarize what has come up in this thread so far, the load-hook > convention has the following problems: >=20 > 1. They are never called if set by a user after a library is loaded. > 2. They can lead to issues like Bug#24491. > 3. They require every package (that wants to use them) to add boiler > plate code. >=20 > They are also redundant since we have eval-after-load and > with-eval-after-load, which do not have any of the above problems. Here's what I'd suggest, if you are bent on removing all load hooks and deprecating them: 1. Try removing all of them from the vanilla (distributed) Elisp code. 2. Run with that for a major release or two. If no problems, then deprecate (declare obsolete). Doing the second first (at the outset) makes no sense to me. Try it first. Those hooks were added, over time, at specific spots in the Emacs code for a reason, presumably - at least some of them were deliberate, we can suppose. (Load hooks were never added to "every package". And I doubt that, at least in some cases, they were just added as "boiler plate code". Please try to find out why given a package "wants to use them" before removing.) I don't see why it would make sense to just suppose that this is all unnecessary cruft, and tell users to start removing their own such, without any trial of removing it from the Emacs code first. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 16 15:30:54 2020 Received: (at 21563) by debbugs.gnu.org; 16 Jan 2020 20:30:54 +0000 Received: from localhost ([127.0.0.1]:38409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1isBn3-0007Ot-Qm for submit@debbugs.gnu.org; Thu, 16 Jan 2020 15:30:54 -0500 Received: from ted.gofardesign.uk ([67.225.143.91]:51910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1isBn2-0007OX-Fs for 21563@debbugs.gnu.org; Thu, 16 Jan 2020 15:30:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=FNNA4jcH81jek64WKuN2WHySUnCUAT6y0NsFqt1ZBx0=; b=pXwNKE+sLrt3bc8dR2sjPpx4C2 QvPTFM4g8PIcsz54bkkLYtIY4dB2SdiS3ocpoNtHvw530jxfeL+N1MP1s7tQxPrAC8B+PBRQpEEfQ P6J97FtsgMtsu+/aLq/qri2i4MlkLSlkxXHQa267OCHYB9UCyXHndvz0JvMoOf4fcnTJvQzVYjhex rXEHvngcnA9RwGNoOs2mMHccBFVoYkEcatRBpCEsOIdXq8GEE2gjSesLP+hZYUo+94p1SA4S9RuXg 4eyyPZHMSwXZjtx22ZoA5Pqk/YgiYAwVlNDTA5QWARVubsNVkULQgVNifTlzdv16hQ0f/XR7Y867D u8rMuzCQ==; Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:49942 helo=localhost) by ted.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1isBmw-001e34-JH; Thu, 16 Jan 2020 15:30:46 -0500 From: Stefan Kangas To: Drew Adams Subject: Re: bug#21563: 24.5; discourage load-hook variables In-Reply-To: (Drew Adams's message of "Thu, 16 Jan 2020 08:15:58 -0800 (PST)") References: <39185.7955.374134.22021@gargle.gargle.HOWL> <87tv4w1poj.fsf@marxist.se> <87muaoz2qu.fsf@marxist.se> <320a9fa6-6419-420e-ac97-9dcbe54a04a6@default> <87h80wz0dm.fsf@marxist.se> <80b979c0-0fdf-4b84-bf1b-cde0a596f8bb@default> <87tv4vy19c.fsf@marxist.se> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Date: Thu, 16 Jan 2020 21:30:44 +0100 Message-ID: <877e1r400b.fsf@marxist.se> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ted.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: ted.gofardesign.uk: stefan@marxist.se X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21563 Cc: Glenn Morris , Roland Winkler , 21563@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Drew Adams writes: >> To summarize what has come up in this thread so far, the load-hook >> convention has the following problems: >> >> 1. They are never called if set by a user after a library is loaded. >> 2. They can lead to issues like Bug#24491. >> 3. They require every package (that wants to use them) to add boiler >> plate code. >> >> They are also redundant since we have eval-after-load and >> with-eval-after-load, which do not have any of the above problems. > > Here's what I'd suggest, if you are bent on removing > all load hooks and deprecating them: > > 1. Try removing all of them from the vanilla > (distributed) Elisp code. > > 2. Run with that for a major release or two. If no > problems, then deprecate (declare obsolete). I'm not sure I understand the proposal. What is the "vanilla (distributed) Elisp code"? What does "removing all of them" mean, and how is removing them more cautious than adding a deprecation warning to the variables? Or, are we perhaps talking about different things? IIUC, load-hooks is just a convention to: a) (defvar foo-load-hook nil) ;; or defcustom spanning several lines, or ;; indeed no declaration at all b) (run-hooks 'foo-load-hook) ;; added just before the provide statement Third party packages are free to continue doing that. AFAICT, we have no way to stop them -- and I wouldn't advocate for that. Am I missing something here? I'm not sure if this was clear, but the course of action suggested by Glenn was to add deprecation warnings to the load-hook variables in GNU Emacs. Please see the attached patches for an example. Best regards, Stefan Kangas --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Obsolete-viper-load-hook-in-favor-of-eval-after-load.patch >From a47b2cb213af71978e8a16d596934fa318847971 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 16 Jan 2020 01:07:20 +0100 Subject: [PATCH 1/3] Obsolete viper-load-hook in favor of eval-after-load * lisp/emulation/viper-init.el (viper-load-hook): Make obsolete. * doc/misc/viper.texi (Rudimentary Changes): Doc fix - no longer mention viper-load-hook. --- doc/misc/viper.texi | 5 +---- lisp/emulation/viper-init.el | 3 +++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/misc/viper.texi b/doc/misc/viper.texi index 9ce809e7d4..087eb2701d 100644 --- a/doc/misc/viper.texi +++ b/doc/misc/viper.texi @@ -1755,7 +1755,7 @@ Rudimentary Changes Insert state, or Emacs state. This heuristics works well in virtually all cases. @code{nil} means you either has to invoke @code{viper-mode} manually for each buffer (or you can add @code{viper-mode} to the appropriate major mode -hooks using @code{viper-load-hook}). +hooks). This option must be set in your Viper customization file. @item viper-custom-file-name "~/.emacs.d/viper" @@ -1903,9 +1903,6 @@ Rudimentary Changes @item viper-emacs-state-hook nil List of (parameterless) functions called just after switching from Vi state to Emacs state. -@item viper-load-hook nil -List of (parameterless) functions called just after loading Viper. This is -the last chance to do customization before Viper is up and running. @end table @noindent You can reset some of these constants in Viper with the Ex command @kbd{:set} diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el index 511c68f24a..09fa0ba7f6 100644 --- a/lisp/emulation/viper-init.el +++ b/lisp/emulation/viper-init.el @@ -923,6 +923,9 @@ viper-load-hook :type 'hook :group 'viper-hooks) +(make-obsolete-variable 'viper-load-hook + "use `with-eval-after-load' instead." "28.1") + (defun viper-restore-cursor-type () (condition-case nil (setq cursor-type (default-value 'cursor-type)) -- 2.20.1 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0002-Obsolete-reftex-load-hook-in-favor-of-eval-after-loa.patch >From c225cd8059607eeef0d65b57db31122e36b0471c Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 16 Jan 2020 01:23:46 +0100 Subject: [PATCH 2/3] Obsolete reftex-load-hook in favor of eval-after-load * lisp/textmodes/reftex-vars.el (reftex-load-hook): Make obsolete. * doc/misc/reftex.texi (Key Bindings, Keymaps and Hooks): No longer mention reftex-load-hook. (Bug#21563) --- doc/misc/reftex.texi | 9 ++------- lisp/textmodes/reftex-vars.el | 3 +++ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/doc/misc/reftex.texi b/doc/misc/reftex.texi index 013c5639a1..0dab524151 100644 --- a/doc/misc/reftex.texi +++ b/doc/misc/reftex.texi @@ -2896,9 +2896,8 @@ Key Bindings Note that this variable has to be set before @RefTeX{} is loaded to have an effect. -@vindex reftex-load-hook -Changing and adding to @RefTeX{}'s key bindings is best done in the hook -@code{reftex-load-hook}. For information on the keymaps +Changing and adding to @RefTeX{}'s key bindings is best done using +@code{with-eval-after-load}. For information on the keymaps which should be used to add keys, see @ref{Keymaps and Hooks}. @node Faces @@ -5320,10 +5319,6 @@ Keymaps and Hooks The keymap for @RefTeX{} mode. @end deffn -@deffn {Normal Hook} reftex-load-hook -Normal hook which is being run when loading @file{reftex.el}. -@end deffn - @deffn {Normal Hook} reftex-mode-hook Normal hook which is being run when turning on @RefTeX{} mode. @end deffn diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index ca92541331..d2324dd4ae 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el @@ -2101,6 +2101,9 @@ reftex-load-hook :group 'reftex-miscellaneous-configurations :type 'hook) +(make-obsolete-variable 'reftex-load-hook + "use `with-eval-after-load' instead." "28.1") + (defcustom reftex-mode-hook nil "Hook which is being run when turning on RefTeX mode." :group 'reftex-miscellaneous-configurations -- 2.20.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 16 16:09:16 2020 Received: (at 21563) by debbugs.gnu.org; 16 Jan 2020 21:09:16 +0000 Received: from localhost ([127.0.0.1]:38446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1isCOC-0008Ja-1X for submit@debbugs.gnu.org; Thu, 16 Jan 2020 16:09:16 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:53608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1isCOA-0008JO-Df for 21563@debbugs.gnu.org; Thu, 16 Jan 2020 16:09:15 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 00GL8n92169947; Thu, 16 Jan 2020 21:09:08 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-2019-08-05; bh=hx+3ejOJjS2R8P89iGxui/skg+2z85XUSgg8Tlt0PO4=; b=AruaWLB60KKjZ9nAeFV1PDDYgcwCuLn8OLFBSdjUSzU9vC2snQpfIKVNd2ifAwFzKaEf q2x6uZcrbTjhqvBvJ0T+wKvh9ChHjnSA2wz883GOjfZIhGcYM77B9PjZK3AtcAa01t28 c5VRwaLUYlhN+3/5QrjY0OqUF33G4yZx00Gbo9CrAtKw2MpRE9anZDofs8BYy7fVVwfe vegytQeoG9N6iRjKmT8EYmFlgThxDB055h/pEeGL9rrnE3BaJpq/dJqIgZYrWPmL5rHp ej2ZcstSDijAKXlz6bVnXCjlUNzYRtM7UxWEqVWmKAdr6qccWUtqw7YDXqYDtUoDycgV Tg== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 2xf73u51w2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Jan 2020 21:09:08 +0000 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 00GL8oO4023333; Thu, 16 Jan 2020 21:09:07 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 2xjxm7jh7k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Jan 2020 21:09:05 +0000 Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 00GL8v0Z016498; Thu, 16 Jan 2020 21:08:57 GMT MIME-Version: 1.0 Message-ID: Date: Thu, 16 Jan 2020 13:08:56 -0800 (PST) From: Drew Adams To: Stefan Kangas Subject: RE: bug#21563: 24.5; discourage load-hook variables References: <39185.7955.374134.22021@gargle.gargle.HOWL> <87tv4w1poj.fsf@marxist.se> <87muaoz2qu.fsf@marxist.se> <320a9fa6-6419-420e-ac97-9dcbe54a04a6@default> <87h80wz0dm.fsf@marxist.se> <80b979c0-0fdf-4b84-bf1b-cde0a596f8bb@default> <87tv4vy19c.fsf@marxist.se> <877e1r400b.fsf@marxist.se> In-Reply-To: <877e1r400b.fsf@marxist.se> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4939.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9502 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 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-1911140001 definitions=main-2001160171 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9502 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 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-1911140001 definitions=main-2001160171 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 21563 Cc: Glenn Morris , Roland Winkler , 21563@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > > Here's what I'd suggest, if you are bent on removing > > all load hooks and deprecating them: > > > > 1. Try removing all of them from the vanilla > > (distributed) Elisp code. > > > > 2. Run with that for a major release or two. If no > > problems, then deprecate (declare obsolete). >=20 > I'm not sure I understand the proposal. What is the "vanilla > (distributed) Elisp code"? The code that GNU Emacs distributes. > What does "removing all of them" mean, and > how is removing them more cautious than adding a deprecation warning > to the variables? It doesn't matter to me whether you remove all or only some. I meant remove them - any or all. The more you remove, the more sure you are that deprecation might make sense. Don't deprecate (step 2) before removing them all, though, to be sure your replacement handles all of the existing GNU Emacs cases, at least. > Third party packages are free to continue doing that. AFAICT, we have > no way to stop them -- and I wouldn't advocate for that. For step 1, I'm suggesting that you _not_ deprecate (declare obsolete) or recommend against. Otherwise, you are prescribing something for 3rd-party code. And you're doing that before you've actually tried it thoroughly for your own code. > Am I missing something here? >=20 > I'm not sure if this was clear, but the course of action suggested by > Glenn was to add deprecation warnings to the load-hook variables in > GNU Emacs. Please see the attached patches for an example. And that is just what I'm suggesting not to do. First remove them from wherever you want from the GNU Emacs code. Then wait, and see how that goes. Then, after a release or two, provide your deprecation warnings. There's no hurry for this, AFAIK. And these things were added on purpose - they didn't fall from the sky. Wait and see how things go. That's my suggestion. It makes little sense (to me) to deprecate something before you've even tried doing without it for a while. Go on the diet yourself (not you, personally!) before you start telling everyone outside core Emacs to go on it. That's all. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 16 16:35:27 2020 Received: (at 21563) by debbugs.gnu.org; 16 Jan 2020 21:35:28 +0000 Received: from localhost ([127.0.0.1]:38480 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1isCnX-0000V9-Ml for submit@debbugs.gnu.org; Thu, 16 Jan 2020 16:35:27 -0500 Received: from mail-qv1-f49.google.com ([209.85.219.49]:34228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1isCnU-0000Uw-Ml for 21563@debbugs.gnu.org; Thu, 16 Jan 2020 16:35:26 -0500 Received: by mail-qv1-f49.google.com with SMTP id o18so9812582qvf.1 for <21563@debbugs.gnu.org>; Thu, 16 Jan 2020 13:35:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=RLHGiTW2aIQd6a3TEasGAbTTyJ4YPE8zZaMUDwRDTQY=; b=QL+niSKFi5JWqFKsWP4Rc/EvsdZWuQw5kL/QY60y0SKr9l6dLwKLUemdLFoxzrdDXG EGXlTFwuJwNHof0lSqUvgsyEK0P9tnDypbd69LV26A3Sdve6gEj7q9kmq98U70l6L4LY 1OJaXaq6D3ZqSt18p1N5EZC9I2qgAJkwgfiniBoj0717NHUmXxWbXK3Rm1Hcrk1GNt3f hAR5vLkrJdoGt4j2FXfe++21+K8WGuLAn2Bu7LbIrvSmJx7YIxR2SV38eAluIe/cBOuG qDY8frIYvvNeXzIE3a7NJOXnEXbnJBd1xo4jVVsdgTWJivXLQtzY+zLddCK/FezYQNYg IlsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=RLHGiTW2aIQd6a3TEasGAbTTyJ4YPE8zZaMUDwRDTQY=; b=pQH/+8Y0qcUzoXofd59vQTYNvLTug7N7ZaBXwSxR8E1ZTjn7Mh+oO07IroccqBZZ4+ 7h378E/uOIEhmNJq1LmLM78CprRDLB6V/pi1Lx2Q4448CXGNcWwhqH71339YRLCqtmFp z+BEdc3RshrUe8m2vb2z+GKIkXnSHC1PHU/D2q7aCQ8sAxO0vFHK0Dm8b/fDpX96GSbZ 9XuamZsiN3HXYrVmbRZBSixHSaVKvMhoPJ8KVfn5PHkIiextG70c5uOCDrJLVsP7ZtOh pgrUkCOvB0duSIZVPn7LdWzuBYzjmSb00l3oDKGfDxHpHOxT7TY+B2SoyeAGTxOmZecM EuVw== X-Gm-Message-State: APjAAAX8Hrt+GVE4YqT+/oygLYAysphhhhYdOfy70azPW/g8hMnUAnDx P6m2n/sKkC85eRuMdhtyz/8wszm5 X-Google-Smtp-Source: APXvYqzsZkTZ/4w6YMQ2DT8/85iAiqp3N483NyWiGyhY1KlNhmPKeusoFcmii839KoODpZqow+ePKQ== X-Received: by 2002:ad4:4b6d:: with SMTP id m13mr4864346qvx.240.1579210519092; Thu, 16 Jan 2020 13:35:19 -0800 (PST) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id k29sm11851895qtu.54.2020.01.16.13.35.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2020 13:35:18 -0800 (PST) From: Noam Postavsky To: Stefan Kangas Subject: Re: bug#21563: 24.5; discourage load-hook variables References: <39185.7955.374134.22021@gargle.gargle.HOWL> <87tv4w1poj.fsf@marxist.se> <87muaoz2qu.fsf@marxist.se> <320a9fa6-6419-420e-ac97-9dcbe54a04a6@default> <87h80wz0dm.fsf@marxist.se> <80b979c0-0fdf-4b84-bf1b-cde0a596f8bb@default> <87tv4vy19c.fsf@marxist.se> <877e1r400b.fsf@marxist.se> Date: Thu, 16 Jan 2020 16:35:17 -0500 In-Reply-To: <877e1r400b.fsf@marxist.se> (Stefan Kangas's message of "Thu, 16 Jan 2020 21:30:44 +0100") Message-ID: <87wo9raxuy.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21563 Cc: 21563@debbugs.gnu.org, Glenn Morris , Roland Winkler , Drew Adams X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Kangas writes: > Drew Adams writes: > >> Here's what I'd suggest, if you are bent on removing >> all load hooks and deprecating them: >> >> 1. Try removing all of them from the vanilla >> (distributed) Elisp code. >> >> 2. Run with that for a major release or two. If no >> problems, then deprecate (declare obsolete). > > I'm not sure I understand the proposal. What is the "vanilla > (distributed) Elisp code"? What does "removing all of them" mean, and > how is removing them more cautious than adding a deprecation warning > to the variables? I think Drew meant to remove the *usage* of the hooks. That is, remove cases of (add-hook 'foo-load-hook ...), before deprecating foo-load-hook itself. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 16 17:20:10 2020 Received: (at 21563) by debbugs.gnu.org; 16 Jan 2020 22:20:10 +0000 Received: from localhost ([127.0.0.1]:38504 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1isDUo-0001cU-13 for submit@debbugs.gnu.org; Thu, 16 Jan 2020 17:20:10 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:46414) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1isDUk-0001bn-D1 for 21563@debbugs.gnu.org; Thu, 16 Jan 2020 17:20:09 -0500 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 00GMIWF5064433; Thu, 16 Jan 2020 22:20:00 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-2019-08-05; bh=mIZuiDCdYKuE9cxoMHjEjnzlzODYk4s6Uo7zlVxqgW4=; b=e6deH1IpvugLn8T/YDj8xb4jbEiEPAw8irTmV4QNpMXNoJ4IeapXsK/2YoyiOpAntw8H Sen0Kgw/srmxSrtdCliRV/xWoRL9whhhllBLgVvyk3QL+pgM70MilPDhOpDFUMMLYy+Z yz9Sc9cO+D5jAy9C5BWdKqcuFZHm8VI9HZ2Nr0RhPgXm/tSDspZiJsnRB8a+thlqfzCz MtXMN1fRo47QIMopJYPqGYEVPbkB+7C+OLrugKbPb6x7T56fzco8/d5jy1gWMEOwpS+o O9WFGBA66vjgECtkxUVxPWjyBPgrsynToHendZr8XOd0PLzmpGALJLDSc1gUTg9gBVNm Fg== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 2xf74sndq6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Jan 2020 22:20:00 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 00GMJRx0043354; Thu, 16 Jan 2020 22:19:59 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3020.oracle.com with ESMTP id 2xj1ay1mcw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Jan 2020 22:19:59 +0000 Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 00GMJwrn003984; Thu, 16 Jan 2020 22:19:58 GMT MIME-Version: 1.0 Message-ID: <11fce817-884d-4b27-ae7a-d4671b73963e@default> Date: Thu, 16 Jan 2020 14:19:57 -0800 (PST) From: Drew Adams To: Noam Postavsky , Stefan Kangas Subject: RE: bug#21563: 24.5; discourage load-hook variables References: <39185.7955.374134.22021@gargle.gargle.HOWL> <87tv4w1poj.fsf@marxist.se> <87muaoz2qu.fsf@marxist.se> <320a9fa6-6419-420e-ac97-9dcbe54a04a6@default> <87h80wz0dm.fsf@marxist.se> <80b979c0-0fdf-4b84-bf1b-cde0a596f8bb@default> <87tv4vy19c.fsf@marxist.se> <877e1r400b.fsf@marxist.se> <87wo9raxuy.fsf@gmail.com> In-Reply-To: <87wo9raxuy.fsf@gmail.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4939.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9502 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 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-1911140001 definitions=main-2001160178 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9502 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2001160178 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 21563 Cc: Glenn Morris , Roland Winkler , 21563@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > >> Here's what I'd suggest, if you are bent on removing > >> all load hooks and deprecating them: > >> 1. Try removing all of them from the vanilla > >> (distributed) Elisp code. > >> 2. Run with that for a major release or two. If no > >> problems, then deprecate (declare obsolete). > > > > I'm not sure I understand the proposal. What is the "vanilla > > (distributed) Elisp code"? What does "removing all of them" mean, > > and how is removing them more cautious than adding a deprecation > > warning to the variables? >=20 > I think Drew meant to remove the *usage* of the hooks. That is, remove > cases of (add-hook 'foo-load-hook ...), before deprecating foo-load- > hook itself. Yes. Sorry if that wasn't clear. That should be sufficient for testing the (later) removal of the variables, as far as their usage by vanilla Emacs code is concerned. (It won't test effects on user code, of course. But the point is to not (possibly) bother users for the duration of step 1.) From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 16 23:44:30 2020 Received: (at 21563) by debbugs.gnu.org; 17 Jan 2020 04:44:30 +0000 Received: from localhost ([127.0.0.1]:38731 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1isJUj-0000DO-L4 for submit@debbugs.gnu.org; Thu, 16 Jan 2020 23:44:30 -0500 Received: from ted.gofardesign.uk ([67.225.143.91]:60974) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1isJUh-0000D8-M8 for 21563@debbugs.gnu.org; Thu, 16 Jan 2020 23:44:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=1ajSB9XpMoTZB3pB59O4mhCPyISMh+ELiCQ0q/6KuRU=; b=mYQGgprZcXYe2z7RG5JbHhOdPs acLOSUpd2W6aUHiQRmW2b/nY6zUFR8nkiSHjmGtXyprg+h4AwGEVRFqZ/zFL0CtsRX5SNEOwNPjWT kv3rZcsHZzeiLO7z/+NWFan8Ii6RYIDra1MhhgtO2LqBF6mM1s7/PKbu20f2XlJ/0Vp7fZyNaeooH GZQWGm7UgkstKe1ooVw0mQ+nHZtCpaQWWyCeKNspNy0VNvY7j1snpG2O1sOScQf0v4Ln9nD0SSJHO WlGgjqBzDolrEVjvirvncmxtgV1zuCozjr4mkdyR3Y3aXmfLFSaQXzpRddlmfTrToRptivz8IPzTS Ht3L96Cg==; Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:34892 helo=localhost) by ted.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1isJUa-001P1Y-Oj; Thu, 16 Jan 2020 23:44:21 -0500 From: Stefan Kangas To: Drew Adams Subject: Re: bug#21563: 24.5; discourage load-hook variables In-Reply-To: <11fce817-884d-4b27-ae7a-d4671b73963e@default> (Drew Adams's message of "Thu, 16 Jan 2020 14:19:57 -0800 (PST)") References: <39185.7955.374134.22021@gargle.gargle.HOWL> <87tv4w1poj.fsf@marxist.se> <87muaoz2qu.fsf@marxist.se> <320a9fa6-6419-420e-ac97-9dcbe54a04a6@default> <87h80wz0dm.fsf@marxist.se> <80b979c0-0fdf-4b84-bf1b-cde0a596f8bb@default> <87tv4vy19c.fsf@marxist.se> <877e1r400b.fsf@marxist.se> <87wo9raxuy.fsf@gmail.com> <11fce817-884d-4b27-ae7a-d4671b73963e@default> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Date: Fri, 17 Jan 2020 05:44:18 +0100 Message-ID: <87y2u61yl9.fsf@marxist.se> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ted.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: ted.gofardesign.uk: stefan@marxist.se X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21563 Cc: Glenn Morris , Noam Postavsky , 21563@debbugs.gnu.org, Roland Winkler X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Drew Adams writes: >> I think Drew meant to remove the *usage* of the hooks. That is, remove >> cases of (add-hook 'foo-load-hook ...), before deprecating foo-load- >> hook itself. > > Yes. Sorry if that wasn't clear. That should be sufficient for > testing the (later) removal of the variables, as far as their > usage by vanilla Emacs code is concerned. Thanks for clearing that up. I've attached a patch removing all uses of load-hooks that I could find in the tree. In my opinion, the patch demonstrates clearly that, in every case where we use load-hooks, eval-after-load makes the code both clearer and more succinct. I don't mind if we have a certain grace period between installing this and declaring the variables obsolete. I don't see that it's necessary to wait until Emacs 29.1 to do it, though. Best regards, Stefan Kangas --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Prefer-eval-after-load-over-load-hooks.patch >From 247bd801163ba2e11f09d827150e35ab6b8e7cab Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 17 Jan 2020 05:11:58 +0100 Subject: [PATCH] Prefer eval-after-load over load-hooks * lisp/cedet/ede.el: * lisp/cedet/semantic/imenu.el: * lisp/emacs-lisp/edebug.el: * lisp/emacs-lisp/eieio-opt.el: * lisp/emacs-lisp/eieio-speedbar.el: * lisp/erc/erc-speedbar.el: * lisp/info.el: * lisp/mail/rmail.el: * lisp/progmodes/gud.el: * lisp/progmodes/vhdl-mode.el: Replace usage of load-hooks with eval-after-load. (Bug#21563) --- lisp/cedet/ede.el | 4 +--- lisp/cedet/semantic/imenu.el | 4 +--- lisp/emacs-lisp/edebug.el | 10 ++-------- lisp/emacs-lisp/eieio-opt.el | 20 +++++++------------- lisp/emacs-lisp/eieio-speedbar.el | 8 ++------ lisp/erc/erc-speedbar.el | 4 +--- lisp/info.el | 4 +--- lisp/mail/rmail.el | 4 +--- lisp/progmodes/gud.el | 4 +--- lisp/progmodes/vhdl-mode.el | 7 +++---- 10 files changed, 20 insertions(+), 49 deletions(-) diff --git a/lisp/cedet/ede.el b/lisp/cedet/ede.el index 1418ad9539..8d46dfb72f 100644 --- a/lisp/cedet/ede.el +++ b/lisp/cedet/ede.el @@ -1527,8 +1527,6 @@ project-roots ;; If this does not occur after the provide, we can get a recursive ;; load. Yuck! -(if (featurep 'speedbar) - (ede-speedbar-file-setup) - (add-hook 'speedbar-load-hook 'ede-speedbar-file-setup)) +(eval-after-load 'speedbar '(ede-speedbar-file-setup)) ;;; ede.el ends here diff --git a/lisp/cedet/semantic/imenu.el b/lisp/cedet/semantic/imenu.el index 19e0515ac6..0609e2bea8 100644 --- a/lisp/cedet/semantic/imenu.el +++ b/lisp/cedet/semantic/imenu.el @@ -44,9 +44,7 @@ ;; Because semantic imenu tags will hose the current imenu handling ;; code in speedbar, force semantic/sb in. -(if (featurep 'speedbar) - (require 'semantic/sb) - (add-hook 'speedbar-load-hook (lambda () (require 'semantic/sb)))) +(eval-after-load 'speedbar '(require 'semantic/sb)) (defgroup semantic-imenu nil "Semantic interface to Imenu." diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index b8d2fb5beb..f600299da2 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -4522,13 +4522,8 @@ edebug-menu ;;; Autoloading of Edebug accessories ;; edebug-cl-read and cl-read are available from liberte@cs.uiuc.edu -(defun edebug--require-cl-read () - (require 'edebug-cl-read)) - -(if (featurep 'cl-read) - (add-hook 'edebug-setup-hook #'edebug--require-cl-read) - ;; The following causes edebug-cl-read to be loaded when you load cl-read.el. - (add-hook 'cl-read-load-hooks #'edebug--require-cl-read)) +;; FIXME: Is this still relevant, or should it be removed? +(eval-after-load 'cl-read '(require 'edebug-cl-read)) ;;; Finalize Loading @@ -4564,7 +4559,6 @@ edebug-unload-function (run-with-idle-timer 0 nil #'(lambda () (unload-feature 'edebug))))) (remove-hook 'called-interactively-p-functions #'edebug--called-interactively-skip) - (remove-hook 'cl-read-load-hooks #'edebug--require-cl-read) (edebug-uninstall-read-eval-functions) ;; Continue standard unloading. nil) diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el index dda9037306..e0095796ae 100644 --- a/lisp/emacs-lisp/eieio-opt.el +++ b/lisp/emacs-lisp/eieio-opt.el @@ -278,19 +278,13 @@ eieio-class-speedbar-make-map (if eieio-class-speedbar-key-map nil - (if (not (featurep 'speedbar)) - (add-hook 'speedbar-load-hook (lambda () - (eieio-class-speedbar-make-map) - (speedbar-add-expansion-list - '("EIEIO" - eieio-class-speedbar-menu - eieio-class-speedbar-key-map - eieio-class-speedbar)))) - (eieio-class-speedbar-make-map) - (speedbar-add-expansion-list '("EIEIO" - eieio-class-speedbar-menu - eieio-class-speedbar-key-map - eieio-class-speedbar)))) + (eval-after-load 'speedbar (progn + (eieio-class-speedbar-make-map) + (speedbar-add-expansion-list + '("EIEIO" + eieio-class-speedbar-menu + eieio-class-speedbar-key-map + eieio-class-speedbar))))) (defvar eieio-class-speedbar-menu () diff --git a/lisp/emacs-lisp/eieio-speedbar.el b/lisp/emacs-lisp/eieio-speedbar.el index c11608da5d..3236a08e89 100644 --- a/lisp/emacs-lisp/eieio-speedbar.el +++ b/lisp/emacs-lisp/eieio-speedbar.el @@ -140,12 +140,8 @@ eieio-speedbar-create MODENAME is a string used to identify this browser mode. FETCHER is a generic function used to fetch the base object list used when creating the speedbar display." - (if (not (featurep 'speedbar)) - (add-hook 'speedbar-load-hook - (list 'lambda nil - (list 'eieio-speedbar-create-engine - map-fn map-var menu-var modename fetcher))) - (eieio-speedbar-create-engine map-fn map-var menu-var modename fetcher))) + (eval-after-load 'speedbar + '(eieio-speedbar-create-engine map-fn map-var menu-var modename fetcher))) (defun eieio-speedbar-create-engine (map-fn map-var menu-var modename fetcher) "Create a speedbar mode for displaying an object hierarchy. diff --git a/lisp/erc/erc-speedbar.el b/lisp/erc/erc-speedbar.el index 1ff44afe46..365510bd81 100644 --- a/lisp/erc/erc-speedbar.el +++ b/lisp/erc/erc-speedbar.el @@ -89,9 +89,7 @@ erc-speedbar-menu-items "Additional menu-items to add to speedbar frame.") ;; Make sure our special speedbar major mode is loaded -(if (featurep 'speedbar) - (erc-install-speedbar-variables) - (add-hook 'speedbar-load-hook 'erc-install-speedbar-variables)) +(eval-after-load 'speedbar '(erc-install-speedbar-variables)) ;;; ERC hierarchy display method ;;;###autoload diff --git a/lisp/info.el b/lisp/info.el index 7a11bb3ff9..cbec97e99f 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -5135,9 +5135,7 @@ Info-speedbar-menu-items "Additional menu-items to add to speedbar frame.") ;; Make sure our special speedbar major mode is loaded -(if (featurep 'speedbar) - (Info-install-speedbar-variables) - (add-hook 'speedbar-load-hook 'Info-install-speedbar-variables)) +(eval-after-load 'speedbar '(Info-install-speedbar-variables)) ;;; Info hierarchy display method ;;;###autoload diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index d798ffa051..895f2a1243 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -4392,9 +4392,7 @@ rmail-speedbar-menu-items (text face mouse function &optional token prevline)) ;; Make sure our special speedbar major mode is loaded -(if (featurep 'speedbar) - (rmail-install-speedbar-variables) - (add-hook 'speedbar-load-hook 'rmail-install-speedbar-variables)) +(eval-after-load 'speedbar '(rmail-install-speedbar-variables)) (defun rmail-speedbar-buttons (buffer) "Create buttons for BUFFER containing rmail messages. diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index d5fd1dce6f..96a617826f 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -486,9 +486,7 @@ gud-speedbar-menu-items "Additional menu items to add to the speedbar frame.") ;; Make sure our special speedbar mode is loaded -(if (featurep 'speedbar) - (gud-install-speedbar-variables) - (add-hook 'speedbar-load-hook 'gud-install-speedbar-variables)) +(eval-after-load 'speedbar '(gud-install-speedbar-variables)) (defun gud-expansion-speedbar-buttons (_directory _zero) "Wrapper for call to `speedbar-add-expansion-list'. diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index b225a9b1d9..9e11a17e60 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -16147,10 +16147,9 @@ vhdl-speedbar-instantiation-selected-face (select-frame current-frame))) ;; initialize speedbar -(if (not (boundp 'speedbar-frame)) - (add-hook 'speedbar-load-hook 'vhdl-speedbar-initialize) - (vhdl-speedbar-initialize) - (when speedbar-frame (vhdl-speedbar-refresh))) +(eval-after-load 'speedbar '(vhdl-speedbar-initialize)) +(when (and (boundp 'speedbar-frame) speedbar-frame) + (vhdl-speedbar-refresh)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -- 2.20.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 16 00:14:27 2020 Received: (at 21563) by debbugs.gnu.org; 16 Apr 2020 04:14:27 +0000 Received: from localhost ([127.0.0.1]:37358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jOvv1-0002T8-Hz for submit@debbugs.gnu.org; Thu, 16 Apr 2020 00:14:27 -0400 Received: from ted.gofardesign.uk ([67.225.143.91]:49934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jOvuz-0002Sw-Lo for 21563@debbugs.gnu.org; Thu, 16 Apr 2020 00:14:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=dtk6riGP7IPknIh7M5c+AVYX24OT0NvvaPYnBE/GKmg=; b=jH1M/1uMwpu0F3Ft6Q6i0sPT28 W18c8vaCjOcgMWOahI3KWRUAhw/eMc1zotsH6LGglgmvSX/EsstnlLVg7qCjVr2fuBJQ+dW1sOWr2 Pkcdz4bo61WWFQl/2v3BTuwxRy+YpRXeud6rU1fRlIrCCCCxLP6aEyd6/AAOf6Espxz9/KsHiTg8/ 0Htcz1abxQuC1H8txeoCDpP4o2K2tWqXynlM/k9bHpJZ9iaa+KlY16OwUzAi13d9P5n4OK8qfggmE zEZFOVVO5aCpTNubotF/reDMbi7E/4LlYZH1WUFjQFj6eM5bHNAW0n8Pw5MuIxRbvjPCCdoJn42SR hCIgv5vA==; Received: from h-4-70-69.a785.priv.bahnhof.se ([155.4.70.69]:44176 helo=localhost) by ted.gofardesign.uk with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jOvuu-00011C-3r; Thu, 16 Apr 2020 00:14:20 -0400 From: Stefan Kangas To: Glenn Morris Subject: Re: bug#21563: 24.5; discourage load-hook variables In-Reply-To: (Glenn Morris's message of "Wed, 15 Jan 2020 17:06:31 -0500") References: <39185.7955.374134.22021@gargle.gargle.HOWL> <87tv4w1poj.fsf@marxist.se> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Date: Thu, 16 Apr 2020 06:14:18 +0200 Message-ID: <87eesoukx1.fsf@stefankangas.se> MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ted.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: ted.gofardesign.uk: stefan@marxist.se X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21563 Cc: Roland Winkler , 21563@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Glenn Morris writes: > I did this years ago for a few modes; eg dd210a6, 041e909, but never got > round to doing the rest. As I said in https://debbugs.gnu.org/24491#8, I > see no need to keep any *-load-hooks. I see you have now done the rest on master. Does that mean that this bug can also be closed? Thanks. Best regards, Stefan Kangas From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 16 05:08:10 2020 Received: (at 21563) by debbugs.gnu.org; 16 Apr 2020 09:08:10 +0000 Received: from localhost ([127.0.0.1]:37545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jP0VG-0003jy-5b for submit@debbugs.gnu.org; Thu, 16 Apr 2020 05:08:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jP0VD-0003jZ-8q for 21563@debbugs.gnu.org; Thu, 16 Apr 2020 05:08:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56180) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jP0V7-0006Cp-6E; Thu, 16 Apr 2020 05:08:01 -0400 Received: from wlanhome198228.uni-regensburg.de ([132.199.198.228]:55480 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1jP0Us-00041g-K7; Thu, 16 Apr 2020 05:07:52 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <8284.54640.106940.24216@gargle.gargle.HOWL> Date: Thu, 16 Apr 2020 11:07:40 +0200 From: "Roland Winkler" To: Stefan Kangas Subject: Re: bug#21563: 24.5; discourage load-hook variables In-Reply-To: <87eesoukx1.fsf@stefankangas.se> References: <39185.7955.374134.22021@gargle.gargle.HOWL> <87tv4w1poj.fsf@marxist.se> <87eesoukx1.fsf@stefankangas.se> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 21563 Cc: Glenn Morris , 21563@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.5 (--) On Thu Apr 16 2020 Stefan Kangas wrote: > Glenn Morris writes: > > > I did this years ago for a few modes; eg dd210a6, 041e909, but never got > > round to doing the rest. As I said in https://debbugs.gnu.org/24491#8, I > > see no need to keep any *-load-hooks. > > I see you have now done the rest on master. Does that mean that this > bug can also be closed? Thanks. Thanks for taking care of this. I am glad the load hooks are gone. >From my perspective the bug can be closed. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 26 10:33:28 2020 Received: (at 21563) by debbugs.gnu.org; 26 Apr 2020 14:33:28 +0000 Received: from localhost ([127.0.0.1]:33870 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSiLY-0007VI-6M for submit@debbugs.gnu.org; Sun, 26 Apr 2020 10:33:28 -0400 Received: from ted.gofardesign.uk ([67.225.143.91]:60250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSiLW-0007V2-7U; Sun, 26 Apr 2020 10:33:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=61GyjSOMyY4JlprWmavcW29BazjlDgOJw6T3b5qo6Uc=; b=BmcBmB9YoysASA5Vlv4l70VISK OjB20cb6vfRPK80RSqSof2rD0IMbdRx77enWkdLcugMWpaf6n5YEj4XyR0rB+nOj/0a7zq4ZDdmuR 2VgDCKmrLIepgh8I3BWf2CdrfRmUOjfyrilKeSfzAHwDah0mTlOlWTUnDGQcckMn4pSyI6bEl3pkG prOnPK2+P5PQh75gnl0jd3WH/Dsxr3oQ7u/9hyrzPUEtBFnhWDeKsZEjsRgdWdqkw+6q6vyS9jQPg ymsWX3ufkW/wQJ2xJkzS5lg4AYVdQwMsPuK4pA25Z7ZiIy+zMOFtcdh79qZZ5LOgjlSJTB3pseQw2 DHyb3wjg==; Received: from h-4-70-69.a785.priv.bahnhof.se ([155.4.70.69]:54842 helo=localhost) by ted.gofardesign.uk with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jSiLO-001lj2-GE; Sun, 26 Apr 2020 10:33:18 -0400 From: Stefan Kangas To: "Roland Winkler" Subject: Re: bug#21563: 24.5; discourage load-hook variables In-Reply-To: <8284.54640.106940.24216@gargle.gargle.HOWL> (Roland Winkler's message of "Thu, 16 Apr 2020 11:07:40 +0200") References: <39185.7955.374134.22021@gargle.gargle.HOWL> <87tv4w1poj.fsf@marxist.se> <87eesoukx1.fsf@stefankangas.se> <8284.54640.106940.24216@gargle.gargle.HOWL> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Date: Sun, 26 Apr 2020 16:33:16 +0200 Message-ID: <87tv169v0z.fsf@stefankangas.se> MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ted.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: ted.gofardesign.uk: stefan@marxist.se X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21563 Cc: Glenn Morris , 21563@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 21563 28.1 thanks "Roland Winkler" writes: > On Thu Apr 16 2020 Stefan Kangas wrote: >> Glenn Morris writes: >> >> > I did this years ago for a few modes; eg dd210a6, 041e909, but never got >> > round to doing the rest. As I said in https://debbugs.gnu.org/24491#8, I >> > see no need to keep any *-load-hooks. >> >> I see you have now done the rest on master. Does that mean that this >> bug can also be closed? Thanks. > > Thanks for taking care of this. I am glad the load hooks are gone. >>>From my perspective the bug can be closed. No further comments within a week, so I'm closing the bug now. Thanks. Best regards, Stefan Kangas From unknown Fri Aug 15 04:04:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 25 May 2020 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 20 13:12:16 2020 Received: (at control) by debbugs.gnu.org; 20 Oct 2020 17:12:16 +0000 Received: from localhost ([127.0.0.1]:46640 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUvBI-0003Jc-F4 for submit@debbugs.gnu.org; Tue, 20 Oct 2020 13:12:16 -0400 Received: from mail-ed1-f42.google.com ([209.85.208.42]:43834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUvBH-0003JM-RC for control@debbugs.gnu.org; Tue, 20 Oct 2020 13:12:16 -0400 Received: by mail-ed1-f42.google.com with SMTP id dn5so2625464edb.10 for ; Tue, 20 Oct 2020 10:12:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:date:message-id:subject:to; bh=lYWRNFAey8RvPCSk+wmC7WHJiX/p78BksxencVxSkfU=; b=ePEvchH4YOHyfDwnZIBajpT0AQRqY9aGkA0SgpB2vGW8lU97Wb0ZpSNtSCFUMXfzI1 G8fDDtcdKmcvyWL7e3vS6XfArfSy9VSWDkyq3ZIFsx7Z17d0JIbyLB2cOz5lXWLESeGE l9QTTZZ1aJ3L9wW45sCjG53IaIGyi3zTokoyYGio1HSNHWOoI5yJGGfGsJ0fe1XP1JrR MeHBajDDr0uqxhISocCZWZ6uoIb6WXbHwxOdDAQWt+cUy8Hy/NTTPDIyGrcfDe8z0Pcb zqKDBs2fnL3XicnEi069FsPjI7x6qj+wSFn0CCwLf/7d2QxgBfJJqr47fDN39PdEZaZm dZ6g== X-Gm-Message-State: AOAM531H8cCSaZc7dxsV8IhJCnMKyrpw/y1sQft/jhlFyWFS/PuTtNqV Riu54p4Dkga//OS+DvofkdDYd8epSHJZv3r1mNEHdYHi X-Google-Smtp-Source: ABdhPJxxE2I7Esi1AZvYl7xa/GtEPC8FSwq/KpTRw/7GmEKJK3htypw3CXaFBEElHTeDTfrRSVkxh0BQUv/NvO1gzzo= X-Received: by 2002:a05:6402:31b3:: with SMTP id dj19mr3909904edb.210.1603213929619; Tue, 20 Oct 2020 10:12:09 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 20 Oct 2020 17:12:08 +0000 From: Stefan Kangas MIME-Version: 1.0 Date: Tue, 20 Oct 2020 17:12:08 +0000 Message-ID: Subject: To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: unarchive 21563 thanks Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.42 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.42 listed in list.dnswl.org] 2.0 BLANK_SUBJECT Subject is present but empty 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: unarchive 21563 thanks Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.42 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.42 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 2.0 BLANK_SUBJECT Subject is present but empty -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines 0.0 TVD_SPACE_RATIO No description available. unarchive 21563 thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 20 13:16:58 2020 Received: (at 21563) by debbugs.gnu.org; 20 Oct 2020 17:16:58 +0000 Received: from localhost ([127.0.0.1]:46653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUvFq-00052y-Fh for submit@debbugs.gnu.org; Tue, 20 Oct 2020 13:16:58 -0400 Received: from mail-ej1-f45.google.com ([209.85.218.45]:41470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUvFo-0004xR-DF for 21563@debbugs.gnu.org; Tue, 20 Oct 2020 13:16:56 -0400 Received: by mail-ej1-f45.google.com with SMTP id x7so3858069eje.8 for <21563@debbugs.gnu.org>; Tue, 20 Oct 2020 10:16:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=tLOlWEziBHaY86ruPIk21VMFu6PXCC4Lc3YfXfFXkRk=; b=lpj+53aTlpxOp0Yibl83EeUrIYP6HTKgpXc4rQCM8l39YqVKC5BuIultmXtKDXRrrm BF6+MQq4FrKG5pBDLLFZcIvwrrerpv4VLhZfHz64i4uZo5izCLNwAEe4Jh9KAnO0rFp3 ok3eG6LY4EXiwwnyFuJRtvJrsHxhuO/gCj/fgp6TKhPKWAiQr+evC4WuWveylJo6fSVC SUeQA9fJrROTrPE+O9BnyE9CAy9w9jgBKs5S3BBhRRSESOYM1nvs0PbOs1H+jN974W7W lV8+4kVLbGUZkYBytIzRnOU1lszVocYeIB49z5+p/AbinnBkGDkugB4mH6xaT8iaVw6q S4uA== X-Gm-Message-State: AOAM53388BGmUx4xDyImBOrAXmdCeGzjXPKQiGlYYNm+yeeJkfOx4oit 6m7KezT7PnTsKuFJARqmNwz5UWeQRc6sAjjxEO5X3cNh X-Google-Smtp-Source: ABdhPJySun/EXb/YdIKSse7s0E+F/aijkk0knP5fO1r9XuqnCNUC6yE7v2YbN6yqDv0MtMsZJf1O2kzJe8aYFlfvyKM= X-Received: by 2002:a17:906:3e4b:: with SMTP id t11mr4128454eji.420.1603214210603; Tue, 20 Oct 2020 10:16:50 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 20 Oct 2020 17:16:50 +0000 From: Stefan Kangas In-Reply-To: <87tv169v0z.fsf@stefankangas.se> (Stefan Kangas's message of "Sun, 26 Apr 2020 16:33:16 +0200") References: <39185.7955.374134.22021@gargle.gargle.HOWL> <87tv4w1poj.fsf@marxist.se> <87eesoukx1.fsf@stefankangas.se> <8284.54640.106940.24216@gargle.gargle.HOWL> <87tv169v0z.fsf@stefankangas.se> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Date: Tue, 20 Oct 2020 17:16:50 +0000 Message-ID: Subject: Re: bug#21563: 24.5; discourage load-hook variables To: Roland Winkler Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 21563 Cc: Glenn Morris , 21563@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Stefan Kangas writes: >>> > I did this years ago for a few modes; eg dd210a6, 041e909, but never got >>> > round to doing the rest. As I said in https://debbugs.gnu.org/24491#8, I >>> > see no need to keep any *-load-hooks. >>> >>> I see you have now done the rest on master. Does that mean that this >>> bug can also be closed? Thanks. >> >> Thanks for taking care of this. I am glad the load hooks are gone. >>>>>From my perspective the bug can be closed. > > No further comments within a week, so I'm closing the bug now. Some load-hooks were never obsoleted here. I've now marked them obsolete on the master branch in commit 6c58d90042. From unknown Fri Aug 15 04:04:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 18 Nov 2020 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator