unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Mention early-init.el in icon-map-list docstring?
@ 2021-12-06 17:21 John Ankarström
  0 siblings, 0 replies; only message in thread
From: John Ankarström @ 2021-12-06 17:21 UTC (permalink / raw)
  To: emacs-devel

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).




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-06 17:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-06 17:21 Mention early-init.el in icon-map-list docstring? John Ankarström

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).