From: Heime <heimeborgia@protonmail.com>
To: Heime via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Subject: Modeline face for inactive buffer
Date: Sat, 20 Jul 2024 16:15:14 +0000 [thread overview]
Message-ID: <_LIj5Tg7wcFWJh3u2kR6BJllWkcES4YSq6jl5-v3lXPrk4G5yit25hhziDHujwS-nk221mScIKyPVA1IBupQ9MS-UIYdbtBCHFF1C9BnBxw=@protonmail.com> (raw)
I am setting mode-line-format, but want that the face
for an inactive buffer affects both the buffer name
and the major-mode name.
Currently, for the inactive name the face for the
"%l:%c" part has some sort of blue hue. What I
would like to have is a the face that shows up
for the buffer name (gray on gray).
(defun vodil-name-format ()
(format " %s " (buffer-name)))
(defvar-local vodil-name
'(:eval
(let ( (vodil-face
(if (mode-line-window-selected-p)
'vodil-active-face
'vodil-inactive-face)) )
(propertize (vodil-name-format)
'face vodil-face))))
(put 'vodil-name 'risky-local-variable t)
(defun vodil-mode-name ()
(capitalize (symbol-name major-mode)))
(defvar-local vodil-mode
'(:eval
(when (mode-line-window-selected-p)
(list
(propertize "λ" 'face 'bold)
" "
(propertize (vodil-mode-name) 'face 'bold)))))
(put 'vodil-mode 'risky-local-variable t)
(defun vodil-primitive ()
(setq-default mode-line-format
'("%e" vodil-name " " vodil-mode " " "%l:%c")))
next reply other threads:[~2024-07-20 16:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-20 16:15 Heime [this message]
2024-07-20 16:34 ` Modeline face for inactive buffer Emanuel Berg
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='_LIj5Tg7wcFWJh3u2kR6BJllWkcES4YSq6jl5-v3lXPrk4G5yit25hhziDHujwS-nk221mScIKyPVA1IBupQ9MS-UIYdbtBCHFF1C9BnBxw=@protonmail.com' \
--to=heimeborgia@protonmail.com \
--cc=help-gnu-emacs@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.