[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/macrostep 3f965b0 048/110: Use new `macrostep-macro-start`
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/macrostep 3f965b0 048/110: Use new `macrostep-macro-start` text property |
Date: |
Sat, 7 Aug 2021 09:18:00 -0400 (EDT) |
branch: elpa/macrostep
commit 3f965b0ee1765a122d68736d730b9f7aed39dbfb
Author: joddie <jonxfield@gmail.com>
Commit: joddie <jonxfield@gmail.com>
Use new `macrostep-macro-start` text property
This property should be placed on the first character of each macro form
in the expanded text. It was previously conflated with saving
the *structure* represented by the expansion in the
`macrostep-expanded-text` property. This is (currently) useful for the
Emacs Lisp implementation, but may not be for other implementations,
including SLIME, so it is cleaner to separate the two properties.
---
macrostep.el | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/macrostep.el b/macrostep.el
index 2bac0ba..fa3e5b9 100644
--- a/macrostep.el
+++ b/macrostep.el
@@ -497,10 +497,10 @@ If no more macro expansions are visible after this, exit
"Move point forward to the next macro form in macro-expanded text."
(interactive)
(let* ((start
- (if (get-text-property (point) 'macrostep-expanded-text)
+ (if (get-text-property (point) 'macrostep-macro-start)
(1+ (point))
(point)))
- (next (next-single-property-change start 'macrostep-expanded-text)))
+ (next (next-single-property-change start 'macrostep-macro-start)))
(if next
(goto-char next)
(error "No more macro forms found"))))
@@ -513,9 +513,9 @@ If no more macro expansions are visible after this, exit
(while
(progn
(setq prev
- (previous-single-property-change (point)
'macrostep-expanded-text))
+ (previous-single-property-change (point)
'macrostep-macro-start))
(if (or (not prev)
- (get-text-property (1- prev) 'macrostep-expanded-text))
+ (get-text-property (1- prev) 'macrostep-macro-start))
nil
(prog1 t (goto-char prev))))))
(if prev
@@ -829,6 +829,7 @@ expansion will not be fontified. See also
(macrostep-propertize
(insert "`")
'macrostep-expanded-text sexp
+ 'macrostep-macro-start t
'font-lock-face 'macrostep-macro-face)
(macrostep-print-sexp (cadr sexp) t))
@@ -859,6 +860,7 @@ expansion will not be fontified. See also
;; opening paren
(macrostep-propertize
(insert "(")
+ 'macrostep-macro-start t
'macrostep-expanded-text sexp)
;; Fontify the head of the macro
(macrostep-propertize
@@ -948,11 +950,8 @@ expansion will not be fontified. See also
(let* ((sexp (slime-sexp-at-point))
(macro-type (macrostep-slime-macro-form-p sexp)))
(when macro-type
- ;; Hack to make `macrostep-next-macro' etc. work.
- ;; TODO: Re-consider how macro forms are marked in
- ;; expanded text.
(put-text-property paren-begin paren-end
- 'macrostep-expanded-text sexp)
+ 'macrostep-macro-start t)
(put-text-property symbol-begin symbol-end
'font-lock-face
(cl-ecase macro-type
- [nongnu] elpa/macrostep 9a6b04a 100/110: Restore Emacs 23 compatibility, (continued)
- [nongnu] elpa/macrostep 9a6b04a 100/110: Restore Emacs 23 compatibility, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep d48e52b 101/110: Add tests for compiler-macro expansion, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep aa59895 103/110: Add .travis.yml, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 7b2c1f3 108/110: Load all autoloaded macros, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 4d75baf 003/110: Bump version number, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 8a85acc 022/110: Refactor backquote handling and text properties., ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 2d216ba 109/110: Merge pull request #19 from fice-t/autoload, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 83b2a0a 015/110: Tweak visible highlight, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 3f815fb 031/110: Test for normal defmacro expansion, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 9d2c58c 040/110: Add option to expand in a separate buffer, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 3f965b0 048/110: Use new `macrostep-macro-start` text property,
ELPA Syncer <=
- [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, 2021/08/07