From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: emacs-26: `with-eval-after-load' docstring omission
Date: Fri, 13 Apr 2018 18:43:06 -0400 [thread overview]
Message-ID: <jwv4lkeu3z2.fsf-monnier+gmane.emacs.devel@gnu.org> (raw)
In-Reply-To: 171cd8bd-ea86-b8b0-2cbc-e9dcd04d8035@gmail.com
>> But in the case of flycheck-define-command at least, I don't see much
>> benefit to having it be a macro instead of some inert data in
>> a variable.
> Except that form (flycheck-define-checker) defines a variable, too, right?
> That is, it expands to a defvar and a function call.
So what? You can just as well define those variables while iterating
down a list of checker-definitions.
> The concrete issue stems from users copying a form from flycheck.el intto
> their init file, without macro-expanding it. Of course, we can recommend
> that users copy the macro-expanded version (the defvar + the function call)
> — but that's not ideal, because not many of our users know how to do that
> (macroexpand a form). And macroexpanding all uses in flycheck.el isn't an
> option either.
If you replace flycheck.el's
(flycheck-define-checker checker1 args1)
(flycheck-define-checker checker2 args2)
[...]
into
(defconst flycheck-builtin-checkers
'((checker1 args1)
(checker2 args2)
...))
then people will still be able to copy&paste between flycheck.el and
their own
(setq flycheck-extra-checkers ...)
and if they don't want to `setq` you can autoload the var to be nil so
they can use `push` or `add-to-list` on it.
-- Stefan
next prev parent reply other threads:[~2018-04-13 22:43 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-23 13:42 emacs-26: `with-eval-after-load' docstring omission Vicente Vera
2018-02-23 14:16 ` Noam Postavsky
2018-02-24 14:42 ` Vicente Vera
2018-02-27 20:40 ` Clément Pit-Claudel
2018-02-27 20:58 ` Stefan Monnier
2018-02-28 14:53 ` Clément Pit-Claudel
2018-02-28 23:22 ` Stefan Monnier
2018-03-17 6:01 ` Clément Pit-Claudel
2018-03-17 14:19 ` Stefan Monnier
2018-04-13 16:00 ` Clément Pit-Claudel
2018-04-13 18:02 ` Stefan Monnier
2018-04-13 18:28 ` Clément Pit-Claudel
2018-04-13 18:41 ` Stefan Monnier
2018-04-13 22:43 ` Stefan Monnier [this message]
2018-02-27 20:21 ` Stefan Monnier
2018-03-03 15:06 ` Vicente Vera
2018-03-03 15:38 ` Clément Pit-Claudel
2018-03-03 21:52 ` Stefan Monnier
2018-03-04 16:04 ` Vicente Vera
2018-03-05 3:39 ` Stefan Monnier
2018-03-09 1:00 ` Noam Postavsky
2018-03-09 4:55 ` Stefan Monnier
2018-03-09 0:47 ` Vicente Vera
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=jwv4lkeu3z2.fsf-monnier+gmane.emacs.devel@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
/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).