all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Pip Cet <pipcet@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: master ff09851: * lisp/emacs-lisp/macroexp.el: Rewrite the code warning about '(lambda ...)
Date: Sun, 28 Feb 2021 10:29:33 -0500	[thread overview]
Message-ID: <jwvczwkusbq.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CAOqdjBeQHyjLpAuP3DsKksj=Y4H0fNbuJ2wpxXGAq+NTQQPwFw@mail.gmail.com> (Pip Cet's message of "Sun, 28 Feb 2021 08:28:02 +0000")

>> +;; 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	other threads:[~2021-02-28 15:29 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   ` master ff09851: * lisp/emacs-lisp/macroexp.el: Rewrite the code warning about '(lambda ...) Pip Cet
2021-02-28 15:29     ` Stefan Monnier [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvczwkusbq.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=pipcet@gmail.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.