* Ok to set a face on `mode-name' for so-long-mode?
@ 2021-09-06 9:09 Phil Sainty
2021-09-08 7:13 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Phil Sainty @ 2021-09-06 9:09 UTC (permalink / raw)
To: emacs-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Ok to set a face on `mode-name' for so-long-mode?
2021-09-06 9:09 Ok to set a face on `mode-name' for so-long-mode? Phil Sainty
@ 2021-09-08 7:13 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-08 7:13 UTC (permalink / raw)
To: Phil Sainty; +Cc: emacs-devel
Phil Sainty <psainty@orcon.net.nz> writes:
> 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.)
I think that'd be fine -- so-long-mode is pretty special, so drawing
some more attention to it is perhaps useful.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-08 7:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-06 9:09 Ok to set a face on `mode-name' for so-long-mode? Phil Sainty
2021-09-08 7:13 ` Lars Ingebrigtsen
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.