emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/mct db382f9 1/3: Tweak how stripes' priority is impleme


From: ELPA Syncer
Subject: [elpa] externals/mct db382f9 1/3: Tweak how stripes' priority is implemented
Date: Fri, 3 Dec 2021 08:57:25 -0500 (EST)

branch: externals/mct
commit db382f904cabda297ea0817e31e49e1f5b96df49
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Tweak how stripes' priority is implemented
    
    For stylistic reasons, following the example of Omar AntolĂ­n Camarena
    over at the Embark repo:
    
<https://github.com/oantolin/embark/commit/07124c7c66c61dd28f55be301573cf30a22a5fac>.
---
 mct.el | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/mct.el b/mct.el
index 225a067..af244b5 100644
--- a/mct.el
+++ b/mct.el
@@ -356,17 +356,16 @@ Apply APP by first setting up the minibuffer to work with 
Mct."
             (forward-line 1)
           (user-error (goto-char (point-max))))
         (unless (eobp)
-          (let ((pt (point))
-                (overlay))
+          (let ((pt (point)))
             (condition-case nil
                 (forward-line 1)
               (user-error (goto-char (point-max))))
             ;; We set the overlay this way and give it a low priority so
             ;; that `mct--highlight-overlay' and/or the active region
             ;; can override it.
-            (setq overlay (make-overlay pt (point)))
-            (overlay-put overlay 'face 'mct-stripe)
-            (overlay-put overlay 'priority -100)))))))
+            (let ((stripe (make-overlay pt (point))))
+              (overlay-put stripe 'priority -100)
+              (overlay-put stripe 'face 'mct-stripe))))))))
 
 ;;;; Commands and helper functions
 



reply via email to

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