From: Eli Zaretskii <eliz@gnu.org>
To: Protesilaos Stavrou <info@protesilaos.com>
Cc: emacs-devel@gnu.org
Subject: Re: [ELPA] Add fontaine package?
Date: Fri, 29 Apr 2022 10:15:33 +0300 [thread overview]
Message-ID: <835ymsbbsa.fsf@gnu.org> (raw)
In-Reply-To: <87sfpw5q4n.fsf@protesilaos.com> (message from Protesilaos Stavrou on Fri, 29 Apr 2022 10:02:16 +0300)
> From: Protesilaos Stavrou <info@protesilaos.com>
> Cc: emacs-devel@gnu.org
> Date: Fri, 29 Apr 2022 10:02:16 +0300
>
> >> > . It uses internal-set-lisp-face-attribute, which is an internal
> >> > primitive, something I'd suggest to avoid. Why can't it use
> >> > set-lisp-face-attribute instead?
> >>
> >> I do not have 'set-lisp-face-attribute' on my end (Emacs 29, GNU/Linux).
> >
> > Sorry, I meant set-face-attribute, of course.
>
> The reason I did not use it is due to what we discussed in bug#45920.
> Basically, set-face-attribute needs to be evaluated twice when (i) we
> change the :family, (ii) change the :weight, and (iii) the new family
> does not have the weight of the previous one.
>
> The example I used in that bug report, which I can still reproduce with
> emacs -Q:
>
> ;; Sample 1
> (set-face-attribute 'default nil
> :family "Source Code Pro"
> :weight 'light)
>
> ;; Sample 2
> (set-face-attribute 'default nil
> :family "Hack"
> :weight 'normal)
>
> Evaluate sample 1. It works. Now evaluate sample 2. Notice that it
> does not yield the expected result. Evaluate sample 2 again: the result
> is the desired one.
>
> By using internal-set-lisp-face-attribute, I specify the sequence of
> events that always works.
>
> Perhaps there is a better way to handle this edge case?
What exactly is the "edge case", and why do you need it in this
package?
next prev parent reply other threads:[~2022-04-29 7:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-27 8:03 [ELPA] Add fontaine package? Protesilaos Stavrou
2022-04-27 17:00 ` Stefan Monnier
2022-04-28 5:37 ` Protesilaos Stavrou
2022-04-28 3:18 ` Richard Stallman
2022-04-28 5:47 ` Protesilaos Stavrou
2022-04-28 7:57 ` Eli Zaretskii
2022-04-28 8:23 ` Protesilaos Stavrou
2022-04-28 9:41 ` Eli Zaretskii
2022-04-29 7:02 ` Protesilaos Stavrou
2022-04-29 7:15 ` Eli Zaretskii [this message]
2022-04-29 7:23 ` Protesilaos Stavrou
2022-04-29 7:40 ` Eli Zaretskii
2022-04-29 7:56 ` Protesilaos Stavrou
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=835ymsbbsa.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=info@protesilaos.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 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.