unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Mauro Aranda <maurooaranda@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>, David Ponce <da_vid@orange.fr>
Cc: 67404@debbugs.gnu.org
Subject: bug#67404: 30.0.50; Issue with :box face attribute
Date: Thu, 30 Nov 2023 07:46:02 -0300	[thread overview]
Message-ID: <f613c88c-b217-42d5-b252-27304d14cd95@gmail.com> (raw)
In-Reply-To: <83cyvwbyic.fsf@gnu.org>

On 26/11/23 07:27, Eli Zaretskii wrote:

 >> Date: Thu, 23 Nov 2023 16:23:15 +0100
 >> From: David Ponce <da_vid@orange.fr>
 >>
 >> Hello,
 >>
 >> The below face with specified :box attribute can be defined and further
 >> used without problem:
 >>
 >> (defface test-face
 >>    '((t
 >>       (:box (:style released-button :line-width (3 . 0)))
 >>       ))
 >>    "Test face.")
 >>
 >> (insert (propertize "XXXXX" 'face 'test-face))
 >>
 >> However, it is not possible to apply any change to this face with
 >> `customize-face', for example to change :line-width (3 . 0) to
 >> :line-width (2 . 0), or to add a :foreground color, etc. This fails
 >> with the message "set-face-attribute: Invalid face box: :line-width,
 >> <value>, :style, <value>", and the :box attribute is discarded.
 >>
 >> AFAICS, :box attribute with any zero :line-width value works as
 >> expected: the box line with zero width is not displayed. But zero is
 >> not considered as a valid value by `set-face-attribute' (in fact, the
 >> internal function `internal-set-lisp-face-attribute').
 >>
 >> For consistency, a zero :line-width value either should be accepted by
 >> `internal-set-lisp-face-attribute', or never accepted at all.
 >
 > Mauro, any comments about these issues?

Hi Eli,

Not really, no.  The widget used for line-width just assumes 0 is a
valid value.  I don't know if that's the case or not, it is not
explicitly documented in the ELisp manual and I don't really know the
xfaces.c code.

For some reason, the code that rejects a value of 0 in
Finternal_set_lisp_face_attribute doesn't complain (maybe it does not
get to run?) when using defface, but it does complain when Customize
tries to set it, by calling face-spec-set.

Sorry I can't be of any more help right now.





  reply	other threads:[~2023-11-30 10:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-23 15:23 bug#67404: 30.0.50; Issue with :box face attribute David Ponce
2023-11-26 10:27 ` Eli Zaretskii
2023-11-30 10:46   ` Mauro Aranda [this message]
2023-11-30 15:20     ` Eli Zaretskii
2023-11-30 16:20       ` David Ponce
2023-11-30 17:53         ` 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=f613c88c-b217-42d5-b252-27304d14cd95@gmail.com \
    --to=maurooaranda@gmail.com \
    --cc=67404@debbugs.gnu.org \
    --cc=da_vid@orange.fr \
    --cc=eliz@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).