unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: 37806@debbugs.gnu.org
Subject: bug#37806: 27.0.50; Need to "extend" face-remap.el
Date: Fri, 18 Oct 2019 11:14:09 +0200	[thread overview]
Message-ID: <875zkmmn4u.fsf@gmx.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 1504 bytes --]

0. emacs -Q
1. C-x C-+ (i.e. M-x text-scale-adjust)
2. M-x variable-pitch-mode or M-x buffer-face-mode
=> Args out of range: [nil :family :foundry :swidth :height :weight :slant :underline :inverse :foreground ...], 19

The error happens because the vector of face attributes defined in
face-remap.el is missing the recently added :extend attribute, so it is
too short.  This also breaks the MELPA package charmap.el (that's where
I hit the error).  The patch below fixes this, though perhaps now would
be a good time to do what the comment above the definition of the vector
says: "This variable should probably be defined in C code where the
actual definitions are available."  Or is this simple fix good enough?

(The vector is also missing the :distant-foreground attribute, so the
patch adds that as well.  This absence happened to be innocuous because
the first element of the vector is nil, in order to make the attribute
indices match those of the enum lface_attribute_index defined in
dispextern.h, so the vector was long enough; but after the addition of
the :extend attribute, it wasn't anymore (only the indices of the vector
are used in face-remap.el).)

In GNU Emacs 27.0.50 (build 17, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo version 1.16.0)
 of 2019-10-18 built on strobe-lfs84
Repository revision: 2d13a3f68d4724af52e47675bedf60709c7b5171
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12003000
System Description: Linux From Scratch


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: face-remap patch --]
[-- Type: text/x-patch, Size: 549 bytes --]

diff --git a/lisp/face-remap.el b/lisp/face-remap.el
index 5cdecb92ee..8e565264fe 100644
--- a/lisp/face-remap.el
+++ b/lisp/face-remap.el
@@ -69,7 +69,7 @@ internal-lisp-face-attributes
   [nil
    :family :foundry :swidth :height :weight :slant :underline :inverse
    :foreground :background :stipple :overline :strike :box
-   :font :inherit :fontset :vector])
+   :font :inherit :fontset :distant :extend :vector])

 (defun face-attrs-more-relative-p (attrs1 attrs2)
   "Return true if ATTRS1 contains a greater number of relative

             reply	other threads:[~2019-10-18  9:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18  9:14 Stephen Berman [this message]
2019-10-19 17:33 ` bug#37806: 27.0.50; Need to "extend" face-remap.el Eli Zaretskii
2019-10-20 12:21   ` Stephen Berman
2019-10-20 14:39     ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-10-20 15:05       ` Eli Zaretskii
2019-10-21  7:20         ` Eli Zaretskii
2019-10-20 19:58     ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-10-20 15:00   ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-10-20 15:12     ` 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=875zkmmn4u.fsf@gmx.net \
    --to=stephen.berman@gmx.net \
    --cc=37806@debbugs.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 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).