Subject: Re: bug#67404: 30.0.50; Issue with :box face attribute

From: Eli Zaretskii <[email-masked]>
Date: Thu, 30 Nov 2023 19:53:40 +0200

> Date: Thu, 30 Nov 2023 17:20:44 +0100
> Cc: [email-masked]
> From: David Ponce <[email-masked]>
> 
> I confirm that with your fix on master branch, the behavior is now
> consistent between defface and customize-face: both signal an error
> on value zero for line-width :-)

Thanks for testing, I'm therefore closing this bug.

> However, please note that it remains possible to use a value zero for
> line-width on an anonymous face.  For example, in the *scratch* buffer
> you still can eval the below expression without error:
>   
> (insert
>    (propertize "xxxx" 'font-lock-face
>                '(:box (:style released-button :line-width (3 . 0)))))

This seems to be a general issue with anonymous faces: their
attributes are validated much more leniently than those of defface.
For example, try:

  (insert
     (propertize "xxxx" 'font-lock-face
		 '(:box (:style foobar :line-width 'bogus))))
or

  (insert
     (propertize "xxxx" 'font-lock-face
		 '(:underline (foo bar :style bogus :position))))

You get a face that effectively ignores the invalid attributes.  I'm
not sure we need to change that.