From: Jimmy Aguilar Mena Date: Thu, 17 Mar 2022 22:28:07 +0000 (+0100) Subject: cursor-face-highlight-nonselected-window default to nil X-Git-Tag: emacs-29.0.90~1931^2~1002^2~2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9bcf58d27c7c9ebe3bdd4d0564808767420bd44c;p=emacs.git cursor-face-highlight-nonselected-window default to nil * lisp/simple.el (redisplay--update-cursor-face-highlight) : Use if-let* and not check facep. (cursor-face-highlight-nonselected-window) : default to nil --- diff --git a/lisp/simple.el b/lisp/simple.el index 42f3a80c3f7..369e11e47c3 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -6540,7 +6540,7 @@ The overlay is returned by the function.") (unless (equal new rol) (set-window-parameter window 'internal-region-overlay new)))))) -(defcustom cursor-face-highlight-nonselected-window cursor-in-non-selected-windows +(defcustom cursor-face-highlight-nonselected-window nil "Non-nil means highlight text with `cursor-face' even in nonselected windows. This variable is similar to `highlight-nonselected-windows'." :local t @@ -6550,14 +6550,12 @@ This variable is similar to `highlight-nonselected-windows'." (defun redisplay--update-cursor-face-highlight (window) "Highlights the overlay used to highlight text with cursor-face." (let ((rol (window-parameter window 'internal-cursor-face-overlay))) - (if-let (((or cursor-face-highlight-nonselected-window - (eq window (selected-window)) - (and (window-minibuffer-p) - (eq window (minibuffer-selected-window))))) - (pt (window-point window)) - (value (get-text-property pt 'cursor-face)) - ;; Extra code needed here for when passing plists. - (cursor-face (if (facep value) value))) + (if-let* (((or cursor-face-highlight-nonselected-window + (eq window (selected-window)) + (and (window-minibuffer-p) + (eq window (minibuffer-selected-window))))) + (pt (window-point window)) + (cursor-face (get-text-property pt 'cursor-face))) (let* ((start (previous-single-property-change (1+ pt) 'cursor-face nil (point-min))) (end (next-single-property-change