finding and changing a status-bar face

Table of Contents

Problem: unreadable font in the mode-line

Inquired on Reddit1

I use Bookmarks+, a superb package. But for some reason the status message face when I want to delete a bookmark is night unreadable, and although I can customize all the faces that appear in my actual bookmark list, I cannot figure out how to change that one. So, in principle, how do I find out what face is causing the ugliness when it’s in my status bar (so I can’t do the usual inspecting)? The image of the style I need to change is at img. How do I locate the face so I can change it?

Answer

The answer reported that a let-binding altered the minibuffer-prompt-properties which was true, and that this variable being let-bound applies to a bunch of other things so change might difficult. Looking more into it I saw this:

;;; bmkp/bookmark+-bmu.el
(if (progn (let ((visible-bell                  t)
                 (minibuffer-prompt-properties  (append minibuffer-prompt-properties
                                                        '(face bmkp-*-mark))))
             (ding) (ding)
             (yes-or-no-p "DELETE THIS bookmark ")))

So it let-binds that global variable in a principled way, attaching to it the bmkp-*-mark face. So I only needed to change that face to the background and foreground that I wanted, and the problem was fixed.

The moral of the story for me: don’t hesitate to read the code to find out where something is coming from.

Footnotes

1 https://www.reddit.com/r/emacs/comments/zm69cr/how_do_i_find_the_statusbar_face_i_need_to_change/

Tory Anderson avatar
Tory Anderson
Full-time Web App Engineer, Digital Humanist, Researcher, Computer Psychologist