bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60841: 30.0.50; kill-ring-save pauses despite region being highlight


From: Eli Zaretskii
Subject: bug#60841: 30.0.50; kill-ring-save pauses despite region being highlighted
Date: Sun, 29 Jan 2023 22:32:40 +0200

> Cc: gregory@heytings.org, 60841@debbugs.gnu.org, kevin.legouguec@gmail.com
> Date: Sun, 29 Jan 2023 21:33:38 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> 
> I think face-differs-from-default-p should look like this:
> 
> (defun face-differs-from-default-p (face &optional frame)
>   "Return non-nil if FACE displays differently from the default face.
> If the optional argument FRAME is given, report on face FACE in that frame.
> If FRAME is t, report on the defaults for face FACE (for new frames).
> If FRAME is omitted or nil, use the selected frame."
>   (let ((attrs
>        (delq :inherit (delq :extend (mapcar 'car face-attribute-name-alist))))
>       (differs nil))
>     (while (and attrs (not differs))
>       (let* ((attr (pop attrs))
>            (attr-val (face-attribute face attr frame t)))
>       (when (and
>              (not (eq attr-val 'unspecified))
>              (not (equal attr-val (face-attribute 'default attr frame)))
>              (display-supports-face-attributes-p (list attr attr-val)
>                                                  frame))
>         (setq differs attr))))
>     differs))

Actually, I take this back: the 'equal' part is already done by
display-supports-face-attributes-p.

The problem with :stipple is that we don't allow nil as the value of
:stipple.  If you evaluate

  (setq list-matching-lines-prefix-face 'default)
  (face-differs-from-default-p list-matching-lines-prefix-face)

then look in *Messages*, you will see:

  Invalid face attribute :stipple nil

So we need to treat :stipple specially, or maybe fix merge_face_ref to
allow the nil value.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]