From: Pip Cet <pipcet@gmail.com>
To: emacs-devel@gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: master ff09851: * lisp/emacs-lisp/macroexp.el: Rewrite the code warning about '(lambda ...)
Date: Sun, 28 Feb 2021 08:28:02 +0000 [thread overview]
Message-ID: <CAOqdjBeQHyjLpAuP3DsKksj=Y4H0fNbuJ2wpxXGAq+NTQQPwFw@mail.gmail.com> (raw)
In-Reply-To: <20210228012323.D4EF020E1B@vcs0.savannah.gnu.org>
I really like this change.
Some nitpicks:
> +;; Record which arguments expect functions, so we can warn when those
> +;; are accidentally quoted with ' rather than with #'
> +(dolist (f '(funcall apply mapcar mapatoms mapconcat mapc cl-mapcar maphash))
But not mapcan? There are a few other map* functions which might be eligible.
> + (put f 'funarg-positions '(1)))
I think that should be `function-put' (paired with `function-get'
above), not `put'.
I'm also in favor of zero-based indexing, so I'd prefer
(function-put f 'funarg-positions '(0)).
At some point when native-comp is merged (soon, I hope!) we should
look at the function types it uses and how to expose those to
macroexp.
> +(dolist (f '( add-hook remove-hook advice-remove advice--remove-function
Just out of curiosity, is the space after '( intentional?
Pip
next parent reply other threads:[~2021-02-28 8:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210228012322.8694.47149@vcs0.savannah.gnu.org>
[not found] ` <20210228012323.D4EF020E1B@vcs0.savannah.gnu.org>
2021-02-28 8:28 ` Pip Cet [this message]
2021-02-28 15:29 ` master ff09851: * lisp/emacs-lisp/macroexp.el: Rewrite the code warning about '(lambda ...) Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAOqdjBeQHyjLpAuP3DsKksj=Y4H0fNbuJ2wpxXGAq+NTQQPwFw@mail.gmail.com' \
--to=pipcet@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).