emacs-diffs
[Top][All Lists]
Advanced

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

emacs-27 2854167: Consider face inheritance when checking region face ba


From: Tassilo Horn
Subject: emacs-27 2854167: Consider face inheritance when checking region face background.
Date: Fri, 15 May 2020 16:33:32 -0400 (EDT)

branch: emacs-27
commit 28541674cdff8e4d1587391ac66818c56885f083
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>

    Consider face inheritance when checking region face background.
    
    Some themes (like dracula) make the region face inherit from some
    other face.  If the background color of the region was inherited,
    `indicate-copied-region' did the switch-point-and-mark-twice dance
    which is not visible in case the region is highlighted.  It just
    looked like Emacs would hang for a second after M-w.
    
    * lisp/simple.el (indicate-copied-region): Consider face inheritance
    when checking region face background.
---
 lisp/simple.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/simple.el b/lisp/simple.el
index ab277c4..e8bf77c 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4852,7 +4852,7 @@ of this sample text; it defaults to 40."
        ;; Swap point-and-mark quickly so as to show the region that
        ;; was selected.  Don't do it if the region is highlighted.
        (unless (and (region-active-p)
-                    (face-background 'region))
+                    (face-background 'region nil t))
          ;; Swap point and mark.
          (set-marker (mark-marker) (point) (current-buffer))
          (goto-char mark)



reply via email to

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