emacs-devel
[Top][All Lists]
Advanced

[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: Stefan Monnier
Subject: Re: master ff09851: * lisp/emacs-lisp/macroexp.el: Rewrite the code warning about '(lambda ...)
Date: Sun, 28 Feb 2021 10:29:33 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> +;; 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.

Feel free to add.  You could even go crazy and add a `declare` form for it ;-)

>> +  (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)).

I don't care very much about the color of those bikesheds.

>> +(dolist (f '( add-hook remove-hook advice-remove advice--remove-function
> Just out of curiosity, is the space after '( intentional?

>From etc/NEWS:

    *** A space between an open paren and a symbol changes the indentation rule.
    The presence of a space between an open paren and a symbol now is
    taken as a statement by the programmer that this should be indented
    as a data list rather than as a piece of code.


-- Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]