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: Juri Linkov
Subject: bug#60841: 30.0.50; kill-ring-save pauses despite region being highlighted
Date: Sun, 29 Jan 2023 19:55:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

>>> * :stipple nil:      foot blown with or without the patch   🤷
>>> * :inherit 'default: foot blown with or without the patch   🤷
>>>
>>> Problem with :stipple nil and :inherit 'default explained in [1].
>>> indicate-copied-region will become affected if the current patch goes
>>> in.
>>
>> I wouldn't be bothered by :stipple whose value is nil.  Why would
>> someone do such a thing, except when the face is meant to be merged
>> with other faces (which are expected to have non-nil :stipple
>> attributes)?
>
> The only place where this "matters" is in replace.el, AFAICT:
>
> 1. Customize list-matching-lines-prefix-face to 'default,
>
> 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?
Isn't it natural to expect that this relation should be reflexive?

> 3. Luckily this does not impact replace-el:occur-1, since this check…
>
>     (if (face-differs-from-default-p list-matching-lines-prefix-face)
>         list-matching-lines-prefix-face)
>
>    … is redundant AFAIU: the goal is to _not_ apply
>    list-matching-lines-prefix-face if it is close to 'default, and
>    instead… leave the default face?  So why bother checking?
>
> CC'ing Juri, who installed this check in bug#14017, for comment in case
> I missed something.

Sorry, I don't remember the reason for this check.  But looking now
it seems it's just optimization to not run the code that puts
unnecessary font-lock-face properties.

> (Hi Juri 👋  For context, the current report is about refining
> indicate-copied-region to avoid spuriously considering the region as
> "unhighlighted" and triggering the point-mark swap; see attached
> patches.  I believe this aspect of the report might also be of interest
> to you, given your participation in bug#42865)

Thanks, I like your patch that adds copy-region-blink-predicate.





reply via email to

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