GNU bug report logs - #21563
24.5; discourage load-hook variables

Previous Next

Package: emacs;

Reported by: "Roland Winkler" <winkler <at> gnu.org>

Date: Fri, 25 Sep 2015 19:01:01 UTC

Severity: wishlist

Found in version 24.5

Fixed in version 28.1

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefan <at> marxist.se>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: Glenn Morris <rgm <at> gnu.org>, Roland Winkler <winkler <at> gnu.org>, 21563 <at> debbugs.gnu.org
Subject: bug#21563: 24.5; discourage load-hook variables
Date: Thu, 16 Jan 2020 14:33:19 +0100
Drew Adams <drew.adams <at> oracle.com> 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




This bug report was last modified 4 years and 268 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.