From: Stephen Berman <stephen.berman@gmx.net>
To: emacs-devel@gnu.org
Cc: Jimmy Aguilar Mena <spacibba@aol.com>
Subject: Re: master 270ca8c: Fix internal-lisp-face-attributes to match face.
Date: Sun, 20 Oct 2019 17:44:06 +0200 [thread overview]
Message-ID: <87eez7toah.fsf@gmx.net> (raw)
In-Reply-To: <20191020144611.3484F20BBC@vcs0.savannah.gnu.org> (Jimmy Aguilar Mena's message of "Sun, 20 Oct 2019 10:46:10 -0400 (EDT)")
On Sun, 20 Oct 2019 10:46:10 -0400 (EDT) ergus@savannah.gnu.org (Jimmy Aguilar Mena) wrote:
> branch: master
> commit 270ca8c2735cfc7935b9e4d0b770a55138493ef3
> Author: Jimmy Aguilar Mena <spacibba@aol.com>
> Commit: Jimmy Aguilar Mena <spacibba@aol.com>
>
> Fix internal-lisp-face-attributes to match face.
>
> * lisp/face-remap.el (internal-lisp-face-attributes): Updated the
^^^^^^^
The conventional practice is to use the imperative form of verbs in
commit messages (so here "Update"). (I couldn't find documentation of
this practice -- unlike for doc strings in (info "(elisp) Documentation
Tips") -- but you'll see it in most commit messages.)
> vector members to match the real member names. (Bug#37806) (Bug#37824)
> ---
> lisp/face-remap.el | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/lisp/face-remap.el b/lisp/face-remap.el
> index 5cdecb9..f2ff2ec 100644
> --- a/lisp/face-remap.el
> +++ b/lisp/face-remap.el
> @@ -64,12 +64,14 @@
> ;; Names of face attributes corresponding to lisp face-vector positions.
> ;; This variable should probably be defined in C code where the actual
> ;; definitions are available.
> +;; :vector must be always at the end as a guard
I don't think this is true for this vector, since it's only the length
that's used here. (It is of course true for the enum
LFACE_ATTRIBUTE_INDEX, which internal-lisp-face-attributes is meant to
mirror, even though it doesn't use its content.)
> ;;
> (defvar internal-lisp-face-attributes
> [nil
> - :family :foundry :swidth :height :weight :slant :underline :inverse
> - :foreground :background :stipple :overline :strike :box
> - :font :inherit :fontset :vector])
> + :family :foundry :width :height :weight :slant :underline
> + :inverse-video
> + :foreground :background :stipple :overline :strike-through :box
> + :font :inherit :fontset :distant-foreground :extend :vector])
For the same reason the attribute names here are not important (that's
why :swidth and :inverse, and the absence of :distant(-foreground),
didn't matter before). Indeed, I think :swidth was used instead of
:width because the model for internal-lisp-face-attributes was the enum
LFACE_ATTRIBUTE_INDEX, not the Lisp face attribute keywords defined in
xfaces.c. I think that's also why internal-lisp-face-attributes begins
with nil, so that the indices of the remaining elements match those of
LFACE_ATTRIBUTE_INDEX; for it's use in face-remap.el, that element is
superfluous.
These remarks will probably become irrelevant when you replace
internal-lisp-face-attributes with a vector defined in C in terms of the
attribute keywords in xfaces.c.
Steve Berman
next parent reply other threads:[~2019-10-20 15:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20191020144609.32634.23000@vcs0.savannah.gnu.org>
[not found] ` <20191020144611.3484F20BBC@vcs0.savannah.gnu.org>
2019-10-20 15:44 ` Stephen Berman [this message]
2019-10-20 16:08 ` master 270ca8c: Fix internal-lisp-face-attributes to match face Eli Zaretskii
2019-10-20 18:28 ` Stefan Monnier
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=87eez7toah.fsf@gmx.net \
--to=stephen.berman@gmx.net \
--cc=emacs-devel@gnu.org \
--cc=spacibba@aol.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.