all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Phil Sainty <psainty@orcon.net.nz>
To: emacs-devel@gnu.org
Subject: Ok to set a face on `mode-name' for so-long-mode?
Date: Mon, 06 Sep 2021 21:09:52 +1200	[thread overview]
Message-ID: <42184fb099811e4d72deee0dd5da5dc9@webmail.orcon.net.nz> (raw)

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




             reply	other threads:[~2021-09-06  9:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-06  9:09 Phil Sainty [this message]
2021-09-08  7:13 ` Ok to set a face on `mode-name' for so-long-mode? Lars Ingebrigtsen

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=42184fb099811e4d72deee0dd5da5dc9@webmail.orcon.net.nz \
    --to=psainty@orcon.net.nz \
    --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 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.