Subject: bug#57813: Icon images are non-functional

From: Juri Linkov <[email-masked]>
Date: Tue, 18 Oct 2022 21:35:15 +0300

I wonder why outline-minor-mode-use-buttons is defcustom with a list of
modes.  Usually outline-minor-mode is parameterized by buffer-local
variables set before calling outline-minor-mode, for example:

  (setq-local outline-minor-mode-cycle t
              outline-minor-mode-highlight t
              outline-minor-mode-insert-buttons t)
   (outline-minor-mode)

and

  (setq-local outline-minor-mode-cycle t
              outline-minor-mode-highlight 'append
              outline-minor-mode-use-margins t)
   (outline-minor-mode)

So shouldn't outline-minor-mode-use-buttons be just a buffer-local
variable like all other variables that affect outline-minor-mode?
Then it could be set in mode hooks like other variables:

  (add-hook 'ruby-mode-hook
            (lambda ()
              (setq-local outline-default-state 2
                          outline-minor-mode-use-buttons t)
              (outline-minor-mode)))

Also outline-minor-mode-use-buttons could be set in dir/file-local
variables that has no problem with early init as in major modes.