[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why is FUNC in cl-callf not allowed to be an expression?
From: |
Michael Heerdegen |
Subject: |
Re: Why is FUNC in cl-callf not allowed to be an expression? |
Date: |
Thu, 16 May 2019 17:09:51 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Michael Heerdegen <address@hidden> writes:
> The problem in the second case is that `cl-symbol-macrolet' is too
> eager: it also macroexpands the symbol expansion `p' inside the `setf',
> i.e. it expands the `gv-synthetic-place' macro call, to just `cl', so
> you get (setf cl 1).
Something like this would help (i.e. gv-synthetic-place would
work as expected):
From e6c6e2a360e7970c8c687af580b0fcabc11aaae7 Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <address@hidden>
Date: Thu, 16 May 2019 17:05:07 +0200
Subject: [PATCH] WIP: Small fix in cl--sm-macroexpand
---
lisp/emacs-lisp/cl-macs.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 8af8fccde7..ce4be75d2b 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -2152,7 +2152,8 @@ cl--sm-macroexpand
;; Perform symbol-macro expansion.
(let ((symval (assq exp venv)))
(when symval
- (setq exp (cadr symval)))))
+ (setq exp (cadr symval))
+ nil)))
(`(setq . ,_)
;; Convert setq to setf if required by symbol-macro expansion.
(let* ((args (mapcar (lambda (f) (macroexpand f env))
--
2.20.1
but I have no clue if it's correct or a good idea. Symbol macro
bindings to macro forms are rare in the Emacs sources.
Michael.
- Re: Why is FUNC in cl-callf not allowed to be an expression?, (continued)
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Michael Heerdegen, 2019/05/10
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Stefan Monnier, 2019/05/13
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Michael Heerdegen, 2019/05/14
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Michael Heerdegen, 2019/05/14
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Stefan Monnier, 2019/05/14
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Michael Heerdegen, 2019/05/15
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Michael Heerdegen, 2019/05/15
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Michael Heerdegen, 2019/05/15
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Stefan Monnier, 2019/05/16
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Michael Heerdegen, 2019/05/16
- Re: Why is FUNC in cl-callf not allowed to be an expression?,
Michael Heerdegen <=
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Stefan Monnier, 2019/05/16
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Michael Heerdegen, 2019/05/16
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Stefan Monnier, 2019/05/16
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Michael Heerdegen, 2019/05/17
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Stefan Monnier, 2019/05/18
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Michael Heerdegen, 2019/05/20
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Stefan Monnier, 2019/05/20
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Michael Heerdegen, 2019/05/20
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Noam Postavsky, 2019/05/21
- Re: Why is FUNC in cl-callf not allowed to be an expression?, Michael Heerdegen, 2019/05/21