unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: "João Távora" <joaotavora@gmail.com>
Cc: Brian Leung <leungbk@posteo.net>, emacs-devel <emacs-devel@gnu.org>
Subject: Re: Stealing a default face from a non-ELPA package
Date: Sat, 05 Mar 2022 20:46:47 +1100	[thread overview]
Message-ID: <87v8wslmwu.fsf@gmail.com> (raw)
In-Reply-To: <CALDnm533CKsosZPwr_X0RcBgEkaDYpFg5cAXO878ifTWi4oPGA@mail.gmail.com>


João Távora <joaotavora@gmail.com> writes:

> Hello Tim,
>
> The goal here, I think, was not to decide if the change had merit or not. As far as I understand there are demonstrable functional
> problems with the faces default settings as chosen by Brian himself.
>
> I presume Brian is just trying to fix those problems, a legitimate goal that cannot be left to "theme authors". There is such a thing
> as the "default theme" and we are all its authors.
>
> Brian is just asking if it is "legal" to take inspiration for decorative face settings from a different project outside GNU ELPA. I believe
> it is quite legal, but I'm not a specialist so suggested he ask here.
>

I understand. For the default value of a face, I think the key is to
look at the documentation of defface and use the facilities it has to
set a default based on the local environment. For example, use a face
spec which sets a different foreground colour based on whether the user
is using a light or dark theme, is running in a GUI frame or a terminal
or console etc. Just using :foreground "grey" is unlikely to give
adequate default face specification for all environments.

Defining good default face specifications is harder than most people
realise. One way to simplify things and get a reasonable default is to
define the face to inherit from one of the standard built-in faces. For
example font-lock-warning-face. These faces have been implemented to
have reasonable defaults for most environments and provided they are
wrapped in a defcustom, the user can customise to suit their personal
preferences if desired (including turning of the inheritance).

I don't believe there is any copyright issue here as you are not using
any lsp-mode code. You are defining a face, using standard Emacs
facilities and setting its attributes. lsp-mode has no copyright over
face attribute values.

Personally, I wish more packages would define their faces in terms of
inheritance from standard/built-in faces. This would mean a user could
tweak the built-in faces to suit their preferences and the additional
packages would inherit those tweaks without needing to be done
individually. 



  reply	other threads:[~2022-03-05  9:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-05  4:59 Stealing a default face from a non-ELPA package Brian Leung
2022-03-05  7:43 ` Tim Cross
2022-03-05  8:24   ` João Távora
2022-03-05  9:46     ` Tim Cross [this message]
2022-03-05 10:29       ` João Távora

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=87v8wslmwu.fsf@gmail.com \
    --to=theophilusx@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=joaotavora@gmail.com \
    --cc=leungbk@posteo.net \
    /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).