GNU bug report logs - #60841
30.0.50; kill-ring-save pauses despite region being highlighted

Previous Next

Package: emacs;

Reported by: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>

Date: Sun, 15 Jan 2023 23:39:01 UTC

Severity: normal

Found in version 30.0.50

Done: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: juri <at> linkov.net
Cc: gregory <at> heytings.org, 60841 <at> debbugs.gnu.org, kevin.legouguec <at> gmail.com
Subject: bug#60841: 30.0.50; kill-ring-save pauses despite region being highlighted
Date: Sun, 29 Jan 2023 21:33:38 +0200
> Cc: gregory <at> heytings.org, 60841 <at> debbugs.gnu.org, kevin.legouguec <at> gmail.com
> Date: Sun, 29 Jan 2023 21:09:18 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > > 2. (face-differs-from-default-p list-matching-lines-prefix-face)
> > >    ↦ :stipple
> > 
> > I still don't understand why (face-differs-from-default-p 'default)
> > should return :stipple even in a clean state after emacs -Q.
> > This means that the default face always differs from itself?
> 
> Because face-differs-from-default-p thinks attributes are unset only
> if their value is 'unspecified'.  We should fix that so the function
> knows about nil as well.

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))




This bug report was last modified 2 years and 106 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.