[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/macrostep 5c62a4c 021/110: Merge remote-tracking branch 'g
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/macrostep 5c62a4c 021/110: Merge remote-tracking branch 'georgek/backquotes' |
Date: |
Sat, 7 Aug 2021 09:17:55 -0400 (EDT) |
branch: elpa/macrostep
commit 5c62a4c2fe4fa13fd2d6654e8bfd4e19afb9252b
Merge: 0067091 99d2cc7
Author: joddie <jonxfield@gmail.com>
Commit: joddie <jonxfield@gmail.com>
Merge remote-tracking branch 'georgek/backquotes'
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
---
macrostep.el | 27 ++++++++++++++++++++-------
1 file changed, 20 insertions(+), 7 deletions(-)
diff --git a/macrostep.el b/macrostep.el
index 8849451..aa6b48a 100644
--- a/macrostep.el
+++ b/macrostep.el
@@ -501,8 +501,11 @@ so that they can be colored consistently. See also
`macrostep-print-sexp'.
Also moves point to the beginning of the returned s-expression."
- (if (not (looking-at "("))
+ (if (and (not (looking-at "("))
+ (not (looking-at "`")))
(backward-up-list 1))
+ (if (equal (char-before) ?`)
+ (backward-char))
(or (get-text-property (point) 'macrostep-expanded-text)
(progn
;; use scan-sexps for the side-effect of producing an error
@@ -594,14 +597,16 @@ fontified using the same face (modulo the number of
faces; see
(put symbol 'macrostep-gensym-face face)
face))))
-(defun macrostep-print-sexp (sexp)
+(defun macrostep-print-sexp (sexp &optional no-macro-show)
"Pretty-print SEXP, a macro expansion, in the current buffer.
Fontifies uninterned symbols and macro forms using
`font-lock-face' property, and saves the actual text of SEXP's
sub-forms as the `macrostep-expanded-text' text property so that
any uninterned symbols can be reused in macro expansions of the
-sub-forms. See also `macrostep-sexp-at-point'."
+sub-forms. If NO-MACRO-SHOW is non-nil then any macros in the
+expansion will not be fontified. See also
+`macrostep-sexp-at-point'."
(cond
((symbolp sexp)
(let ((p (point)))
@@ -618,16 +623,24 @@ sub-forms. See also `macrostep-sexp-at-point'."
(cond ((and (eq head 'quote) ; quote
(= (length sexp) 2))
(insert "'")
- (macrostep-print-sexp (cadr sexp)))
+ (macrostep-print-sexp (cadr sexp) t))
- ((and (memq head '(\` \, \,@)) ; quasiquote, unquote etc.
+ ((and (memq head '(\, \,@)) ; unquote
(= (length sexp) 2))
(princ head (current-buffer))
(macrostep-print-sexp (cadr sexp)))
-
+ ((and (eq head '\`)
+ (= (length sexp) 2))
+ (insert "`") ; backquote
+ (put-text-property
+ (1- (point)) (point) 'macrostep-expanded-text sexp)
+ (put-text-property
+ (1- (point)) (point) 'font-lock-face 'macrostep-macro-face)
+ (macrostep-print-sexp (cadr sexp) t))
(t ; other list form
(insert "(")
- (when (macrostep-macro-form-p sexp)
+ (when (and (not no-macro-show)
+ (macrostep-macro-form-p sexp))
(let ((p (point)))
;; save the real expansion as a text property on the
;; opening paren
- [nongnu] elpa/macrostep 522226f 050/110: Improve `macrostep-slime-macro-form-p`, (continued)
- [nongnu] elpa/macrostep 522226f 050/110: Improve `macrostep-slime-macro-form-p`, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 059dda6 066/110: Also hook into slime-repl-mode, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep e582ca7 078/110: Fix trivial bug printing a single non-list form, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 84e5bfa 086/110: Make tests pass again, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 2dd3447 004/110: Fix bug with output of macros that expand to a string (e.g. `rx'), ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 6c4afbe 002/110: Got rid of `macrostep-change-group'. Updated some documentation., ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep e2bf1aa 005/110: Change :reverse-video to :inverse-video for e24, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 993a79f 010/110: bump version number, add changelog, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 9cd6742 016/110: Try to be smarter about maintaining buffer state, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep cb2019e 017/110: acknowledgements in docs, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 5c62a4c 021/110: Merge remote-tracking branch 'georgek/backquotes',
ELPA Syncer <=
- [nongnu] elpa/macrostep f026495 025/110: Fix comment typos, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 77c0c1a 023/110: update readme, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep b04f8db 026/110: Basic support for expanding macros bound by `macrolet', ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 7acce07 028/110: Require `cl-macs` at runtime, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 51d5b6a 036/110: Fix a bug with printing the first element of a list., ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 07e14e2 032/110: Test for macrostep-environment-at-point, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep c93c2d6 053/110: Language-agnostic macro-form boundaries, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep e3e5c12 034/110: Merge branch 'expand-macrolet', ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 4ea178a 045/110: Simplify overlay collapsing, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 2519692 038/110: Restore narrowing, ELPA Syncer, 2021/08/07