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

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

[nongnu] elpa/macrostep b060e1a 014/110: Add visible highlight of expand


From: ELPA Syncer
Subject: [nongnu] elpa/macrostep b060e1a 014/110: Add visible highlight of expanded section
Date: Sat, 7 Aug 2021 09:17:53 -0400 (EDT)

branch: elpa/macrostep
commit b060e1ad3c61154943c1c87800b01b3f338dfaa5
Author: George Kettleborough <g.kettleborough@member.fsf.org>
Commit: George Kettleborough <g.kettleborough@member.fsf.org>

    Add visible highlight of expanded section
---
 macrostep.el | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/macrostep.el b/macrostep.el
index 89dfde1..4cd417b 100644
--- a/macrostep.el
+++ b/macrostep.el
@@ -234,6 +234,11 @@
   "Face for gensyms created in the fifth level of macro expansion."
   :group 'macrostep)
 
+(defface macrostep-expansion-highlight-face
+  '((t :background "#eee8d5"))
+  "Face for macro-expansion highlight."
+  :group 'macrostep)
+
 (defface macrostep-macro-face
   '((t :underline t))
   "Face for macros in macro-expanded code."
@@ -341,6 +346,11 @@ buffer and expand the next macro form found, if any."
        (let ((new-ol
               (make-overlay (point)
                             (scan-sexps (point) 1))))
+          ;; move overlay over newline to make it prettier
+          (when (= (char-after (overlay-end new-ol)) ?\n)
+           (move-overlay new-ol
+                         (overlay-start new-ol) (+ (overlay-end new-ol) 1)))
+          (overlay-put new-ol 'face 'macrostep-expansion-highlight-face)
          (overlay-put new-ol 'evaporate t)
          (overlay-put new-ol 'priority priority)
          (overlay-put new-ol 'macrostep-original-text text)



reply via email to

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