[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Ok to set a face on `mode-name' for so-long-mode?
From: |
Phil Sainty |
Subject: |
Ok to set a face on `mode-name' for so-long-mode? |
Date: |
Mon, 06 Sep 2021 21:09:52 +1200 |
User-agent: |
Orcon Webmail |
I'd quite like to make the following change to lisp/so-long.el:
;;;###autoload
-(define-derived-mode so-long-mode nil "So Long"
+(define-derived-mode so-long-mode nil
+ (propertize "So Long" 'face 'so-long-mode-line-active)
"This major mode is the default `so-long-action' option.
(`so-long-mode-line-active' simply inherits from `mode-line-emphasis'
by default.)
It will make the face consistent with that applied to
`so-long-mode-line-label' (by `so-long-mode-line-info') when other
(non-major-mode) actions are active.
In testing the change seems fine. Is there any reason not to do this?
I think I'd initially felt that I shouldn't be messing with the face
for the something as standard as the major mode name; but on account
of having made the `so-long-mode-line-active' face rather high-contrast
in my own config, it now seems like a flaw that `mode-name' isn't using
that face.
I note that the new mode-name for `emacs-lisp-mode' sets a face for
the dynamic-binding flag "/d" if that's active, so there's at least
one example of something similar.
-Phil
- Ok to set a face on `mode-name' for so-long-mode?,
Phil Sainty <=