From: "Trent W. Buck" <trentbuck@gmail.com>
To: Jim Porter <jporterbugs@gmail.com>
Cc: Gregory Heytings <gregory@heytings.org>,
Eli Zaretskii <eliz@gnu.org>,
62370@debbugs.gnu.org
Subject: bug#62370: 28.1; sieve-mode: faces should inherit from font-lock-X-face faces
Date: Thu, 23 Mar 2023 12:05:24 +1100 [thread overview]
Message-ID: <ZBul1PojSCiyyZ2B@hera.lan> (raw)
In-Reply-To: <d48fe5be-d52b-faf4-905f-e8efdda9e5fb@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2713 bytes --]
On Wed 22 Mar 2023 14:22:45 -0700, Jim Porter wrote:
> On 3/22/2023 1:10 PM, Gregory Heytings wrote:
> > But the sieve-* faces have existed for twenty years, so it's now too
> > late to change them.
>
> I think it might actually be ok to change this: the face attributes for each
> of the 'sieve-*' faces closely correspond to one of the 'font-lock-*-face'
> faces. They're not *identical*, but the differences are very slight.
>
> The mapping is:
>
> sieve-control-commands -> font-lock-builtin-face
> sieve-action-commands -> font-lock-function-name-face
> sieve-test-commands -> font-lock-constant-face
> sieve-tagged-arguments -> font-lock-keyword-face
>
> (Note that this is a different mapping from Trent's proposal.)
For the record, I'm fine with this mapping.
I only just started using sieve seriously yesterday, so
my initial mapping was a wild-ass guess.
> If we mapped the 'sieve-*' faces like that, I doubt anyone using the default
> theme would notice. Likewise, anyone using a theme that customizes the
> 'sieve-*' faces wouldn't notice, since they're already explicitly-themed.
I agree.
> The only users who would see an impact would be those using non-default
> themes that *didn't* have definitions for 'sieve-*' faces, and they'll
> arguably have improved visuals: with the change, 'sieve-mode' will look
> consistently-themed with the rest of Emacs.
I agree.
I don't think "I opened foo.sieve in Emacs 20 twenty years ago, and
now I opened foo.sieve in Emacs 30 today, and the colors aren't identical, and now I'm mad"
is a good argument for never changing the defaults.
Emacs changes the defaults like that ALL THE TIME.
If they piss me off, I just patch back in the old behaviour and forget about it.
Choice examples:
;; Colour comment bodies in console mode. I tried to get this changed upstream,
;; but RMS decreed that it was a feature as (apparently) red is difficult to
;; read on eight-colour terminals. Hopefully a circular dependency is OK...
;; FFS, RMS, just configure your terminal, e.g. printf '\033]P1CC0000\033]P9EF2929'
(eval-after-load "font-lock"
'(if (< emacs-major-version 24)
(put 'font-lock-comment-face 'face-alias 'font-lock-comment-delimiter-face)
;; UPDATE: it's not OK in Emacs 24. For now, just assume an 8-color tty.
(set-face-attribute 'font-lock-comment-face nil :foreground "red")))
;; Undo stupid feature where ^M means ^J and ^J means ^M.
;; Fixes copy-paste between terminals without bracketed paste mode (i.e. ALL of them).
;; http://emacsredux.com/blog/2014/01/19/a-peek-at-emacs-24-dot-4-auto-indentation-by-default/
(when (fboundp 'electric-indent-mode)
(electric-indent-mode -1))
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2023-03-23 1:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-22 5:41 bug#62370: 28.1; sieve-mode: faces should inherit from font-lock-X-face faces Trent W. Buck
2023-03-22 14:49 ` Eli Zaretskii
2023-03-22 20:10 ` Gregory Heytings
2023-03-22 21:22 ` Jim Porter
2023-03-23 1:05 ` Trent W. Buck [this message]
2023-03-23 6:58 ` Eli Zaretskii
2023-03-23 7:03 ` Trent W. Buck
2023-03-23 7:25 ` Eli Zaretskii
2023-03-23 16:11 ` Jim Porter
2023-09-03 10:30 ` Stefan Kangas
2023-09-03 11:04 ` Philip Kaludercic
2023-09-05 4:43 ` Jim Porter
2023-09-05 12:01 ` Eli Zaretskii
2023-09-05 15:52 ` Jim Porter
2023-09-05 16:17 ` Eli Zaretskii
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZBul1PojSCiyyZ2B@hera.lan \
--to=trentbuck@gmail.com \
--cc=62370@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=gregory@heytings.org \
--cc=jporterbugs@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).