From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: master b342815: Improve define-function omitted-arg documentation Date: Fri, 27 May 2016 12:58:17 -0400 Message-ID: References: <20160527164722.20278.19217@vcs.savannah.gnu.org> <20160527164723.4A992220156@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1464368344 16968 80.91.229.3 (27 May 2016 16:59:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 May 2016 16:59:04 +0000 (UTC) Cc: Paul Eggert To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 27 18:58:56 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b6L67-0002fE-Gu for ged-emacs-devel@m.gmane.org; Fri, 27 May 2016 18:58:55 +0200 Original-Received: from localhost ([::1]:47002 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6L66-000861-Sq for ged-emacs-devel@m.gmane.org; Fri, 27 May 2016 12:58:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6L5a-00085Q-3B for emacs-devel@gnu.org; Fri, 27 May 2016 12:58:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b6L5X-0001Nz-R2 for emacs-devel@gnu.org; Fri, 27 May 2016 12:58:21 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56508) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6L5X-0001Mm-Nn; Fri, 27 May 2016 12:58:19 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1b6L5V-0000CV-TJ; Fri, 27 May 2016 12:58:18 -0400 X-Spook: Public Health Guzman NWO Weapons grade Qaddafi UNSCOM X-Ran: 6+VMwKblo`EHV'~,4Ka(yIDC=S3;P(W(4$r^gQGp}Y^,w@nRc._&0=gzla2~\k!k~AcE~O X-Hue: white X-Attribution: GM In-Reply-To: <20160527164723.4A992220156@vcs.savannah.gnu.org> (Paul Eggert's message of "Fri, 27 May 2016 16:47:23 +0000 (UTC)") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:204083 Archived-At: Paul Eggert wrote: > -In end of data: > -fortran.el:2152:1:Warning: the function 'gud-find-c-expr' is not > - known to be defined. > +simple.el:8727:1:Warning: the function 'shell-mode' is not known to be > + defined. Prejudiced against Fortran, are we? ;) > +@defmac declare-function function file &rest args > +Tell the byte compiler to assume that @var{function} is defined in the > +file @var{file}. The trailing arguments @var{args} can contain one or > +two optional arguments. The first optional argument @var{arglist} is > +either @code{t}, meaning the argument list is unspecified, or a list > +of formal parameters in the same style as @code{defun}.@footnote{An > +omitted @var{arglist} defaults to @code{t}, not @code{nil}; this > +atypical behavior is why @code{declare-function} is defined to have > +the formal parameters @code{(function file &rest args)}, not > +@code{(function file &optional arglist fileonly)}.} The second > +optional argument @var{fileonly} non-@code{nil} means only check that IMO all the stuff about t is an internal implementation detail that has no place in the documentation. I will note that AFAICS you only need these doc changes because you've made the macro's arglist less clear, for the sake of one compiler warning that we lived with for years. We previously decided against doing this: http://debbugs.gnu.org/8646 I found the previous doc quite clear, but obviously I'm biased. > +ARGLIST specifies FN's arguments, or is t to not specify FN's > +arguments. An omitted ARGLIST defaults to t, not nil: a nil > +ARGLIST specifies an empty argument list, and an explicit t > +ARGLIST is a placeholder that allows supplying a later arg. Again, t has no place being documented.