[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master ff09851: * lisp/emacs-lisp/macroexp.el: Rewrite the code warn
From: |
Pip Cet |
Subject: |
Re: master ff09851: * lisp/emacs-lisp/macroexp.el: Rewrite the code warning about '(lambda ...) |
Date: |
Sun, 28 Feb 2021 08:28:02 +0000 |
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
- Re: master ff09851: * lisp/emacs-lisp/macroexp.el: Rewrite the code warning about '(lambda ...),
Pip Cet <=