emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mention early-init.el in icon-map-list docstring?


From: John Ankarström
Subject: Mention early-init.el in icon-map-list docstring?
Date: Mon, 06 Dec 2021 18:21:24 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (berkeley-unix)

I just spent some time debugging why (setq icon-map-list nil) didn't
affect some icons. It turns out that icon-map-list needs to be set in
early-init.el. (See below for a detailed description.)

Ideally, I would like the Customize interface to be able to set certain
variables in early-init.el, but at a minimum I think that this should be
mentioned in icon-map-list's docstring.

***

icon-map-list controls whether Emacs should use its own icons or "stock"
(e.g., GTK) icons for its tool bars. Quoting the docstring: "If you
don’t want stock icons, set the variable to nil."

Specifically, all icons that are part of the global tool bar are
unaffected by the value of icon-map-list unless it is set in
early-init.el. This includes icons such as "undo", "close" etc.

Other tool bars that use these icons are also affected. For example, the
"undo" and "close" icons in isearch's tool bar are the GTK variants,
despite icon-map-list being set to nil, while all icons that are not
part of the global tool bar are, correctly, the Emacs variants.

I assume that Emacs first (in the function tool-bar-setup) sets up the
global tool bar -- caching the icons --, then sees the new value of
icon-map-list, which affects all newly loaded icons, but not the cached
ones.

By setting icon-map-list to nil in early-init.el instead of init.el,
it is set before tool-bar-setup is run, resulting in the correct icons
being used (and cached).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]