[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/macrostep 424e373 110/110: Merge pull request #16 from fic
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/macrostep 424e373 110/110: Merge pull request #16 from fice-t/master |
Date: |
Sat, 7 Aug 2021 09:18:13 -0400 (EDT) |
branch: elpa/macrostep
commit 424e3734a1ee526a1bd7b5c3cd1d3ef19d184267
Merge: 2d216ba 29fd924
Author: Jon Oddie <jonxfield@gmail.com>
Commit: GitHub <noreply@github.com>
Merge pull request #16 from fice-t/master
Move overlay face to a different overlay
---
macrostep.el | 27 +++++++++++++++++----------
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/macrostep.el b/macrostep.el
index 1b8795e..297d549 100644
--- a/macrostep.el
+++ b/macrostep.el
@@ -602,14 +602,18 @@ behaviors."
(macrostep-collapse-overlays-in (point) end)
(delete-region (point) end)
;; Create a new overlay
- (let ((overlay
- (make-overlay start
- (if (looking-at "\n")
- (1+ (point))
- (point)))))
+ (let* ((overlay
+ (make-overlay start
+ (if (looking-at "\n")
+ (1+ (point))
+ (point))))
+ (highlight-overlay (unless macrostep-expansion-buffer
+ (copy-overlay overlay))))
(unless macrostep-expansion-buffer
;; Highlight the overlay in original source buffers only
- (overlay-put overlay 'face
'macrostep-expansion-highlight-face))
+ (overlay-put highlight-overlay 'face
'macrostep-expansion-highlight-face)
+ (overlay-put highlight-overlay 'priority -1)
+ (overlay-put overlay 'macrostep-highlight-overlay
highlight-overlay))
(overlay-put overlay 'priority priority)
(overlay-put overlay 'macrostep-original-text text)
(overlay-put overlay 'macrostep-gensym-depth
macrostep-gensym-depth)
@@ -708,6 +712,8 @@ Also removes the overlay from `macrostep-overlays'."
;; Remove overlay from the list and delete it
(setq macrostep-overlays
(delq overlay macrostep-overlays))
+ (let ((highlight-overlay (overlay-get overlay
'macrostep-highlight-overlay)))
+ (when highlight-overlay (delete-overlay highlight-overlay)))
(delete-overlay overlay)))
(defun macrostep-collapse-overlays-in (start end)
@@ -715,10 +721,11 @@ Also removes the overlay from `macrostep-overlays'."
Will not collapse overlays that begin at START and end at END."
(dolist (ol (overlays-in start end))
- (if (and (> (overlay-start ol) start)
- (< (overlay-end ol) end)
- (overlay-get ol 'macrostep-original-text))
- (macrostep-collapse-overlay ol t))))
+ (when (and (overlay-buffer ol) ; collapsing may delete other
overlays
+ (> (overlay-start ol) start)
+ (< (overlay-end ol) end)
+ (overlay-get ol 'macrostep-original-text))
+ (macrostep-collapse-overlay ol t))))
;;; Emacs Lisp implementation
- [nongnu] elpa/macrostep 3f965b0 048/110: Use new `macrostep-macro-start` text property, (continued)
- [nongnu] elpa/macrostep 3f965b0 048/110: Use new `macrostep-macro-start` text property, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep ff3888f 065/110: Use a form-tracking stream rather than gensym substitution, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 0fd292c 006/110: Better README, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 0db08ec 007/110: add Url: header for marmalade, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep aa4736c 067/110: Fix some silly errors, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 0b1c0fe 069/110: Add swank/gray:stream-read-char-no-hang implementation, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 704f164 091/110: Merge branch 'generic', ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep bf87b7c 095/110: Whitespace cleanup, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep d1e954d 099/110: Attempt to shell out to "indent" in macrostep-c, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep b65cc96 102/110: Makefile tweaks, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 424e373 110/110: Merge pull request #16 from fice-t/master,
ELPA Syncer <=
- [nongnu] elpa/macrostep c5d1c5b 009/110: Autoload macro definitions if needed., ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 8b89694 012/110: Only enter macrostep-mode after successful macro expansion, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep b060e1a 014/110: Add visible highlight of expanded section, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 4b0d96f 013/110: Remove incorrect use of :version in defgroup, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 0bcb143 019/110: Handle backquotes better, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 1c01145 039/110: Merge pull request #9 from xuchunyang/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep c20152b 011/110: Handle aliases by using `indirect-function' instead of `symbol-function', ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 99ac330 029/110: Make inner macrolet definitions correctly shadow outer, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 0c8b64c 051/110: Position macrostep-slime-macro-form-p in the correct package, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep f34deb7 055/110: Specify text bounds when propertizing SLIME macros, ELPA Syncer, 2021/08/07