From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: emacs-26: `with-eval-after-load' docstring omission Date: Fri, 13 Apr 2018 18:43:06 -0400 Message-ID: References: <827ed6de-fd90-144e-53dd-50163a937b63@gmail.com> <4e07d7b4-f1f7-0d5d-5f2a-b5e491ab4303@gmail.com> <35b3a8a6-6cf1-bb0b-c0b6-e8e25fa803fc@gmail.com> <171cd8bd-ea86-b8b0-2cbc-e9dcd04d8035@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1523659464 26395 195.159.176.226 (13 Apr 2018 22:44:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 13 Apr 2018 22:44:24 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 14 00:44:20 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f77QY-0006j0-Tc for ged-emacs-devel@m.gmane.org; Sat, 14 Apr 2018 00:44:19 +0200 Original-Received: from localhost ([::1]:32965 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f77Sf-0008DE-9K for ged-emacs-devel@m.gmane.org; Fri, 13 Apr 2018 18:46:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f77Qf-0007gD-1e for emacs-devel@gnu.org; Fri, 13 Apr 2018 18:45:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f77PX-0005kR-2o for emacs-devel@gnu.org; Fri, 13 Apr 2018 18:44:25 -0400 Original-Received: from [195.159.176.226] (port=54270 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f77PW-0005je-N6 for emacs-devel@gnu.org; Fri, 13 Apr 2018 18:43:14 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1f77NN-0002Uh-Bx for emacs-devel@gnu.org; Sat, 14 Apr 2018 00:41:01 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 39 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:OaRRASi0xRSPTp7Jm2gBvVSGeII= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:224573 Archived-At: >> 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