Subject: Re: bug#14502: 24.3; dired-load-hook should not be customizable

From: Reuben Thomas <[email-masked]>
Date: Fri, 16 Aug 2019 09:13:31 +0100

On Fri, 16 Aug 2019 at 02:29, Lars Ingebrigtsen <[email-masked]> wrote:

> (Please keep the debbugs address in the Cc header.)
>

Sorry!

The problem in #13780 is that if you mix add-hook with Customize
> settings of a hook, then (depending on load order), the Customize value
> for the hook may overwrite those add-hooks.  The solution proposed is
> that one shouldn't have defcustoms on the hooks one may somehow expect
> that packages add stuff to.
>
> But dired-load-hook doesn't seem like one of those hooks, and if you
> use Customize to be
>
> (load-x)
>
> where load-x is
>
> (defun load-x ()
>   (require 'dired-x))
>
> then surely dired-x will be loaded with dired is loaded?  (Not that I've
> tried myself.)
>

dired-x adds dired-extra-startup to dired-mode-hook…

dired-mode-hook in my setup also has sml/set-buffer-identification added by
smart-mode-line, so yes, it is "one of those hooks"

-- 
https://rrt.sc3d.org