emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master b342815: Improve define-function omitted-arg documentation


From: Glenn Morris
Subject: Re: master b342815: Improve define-function omitted-arg documentation
Date: Fri, 27 May 2016 12:58:17 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

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? ;)

> address@hidden 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 @address@hidden
> +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
> address@hidden(function file &optional arglist fileonly)}.}  The second
> +optional argument @var{fileonly} address@hidden 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.



reply via email to

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