unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "John Ankarström" <john@ankarstrom.se>
To: emacs-devel@gnu.org
Subject: Mention early-init.el in icon-map-list docstring?
Date: Mon, 06 Dec 2021 18:21:24 +0100	[thread overview]
Message-ID: <877dch8x9n.fsf@ankarstrom.se> (raw)

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	other threads:[~2021-12-06 17:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877dch8x9n.fsf@ankarstrom.se \
    --to=john@ankarstrom.se \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).