all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: emacs-devel@gnu.org
Cc: Paul Eggert <eggert@cs.ucla.edu>
Subject: Re: master b342815: Improve define-function omitted-arg documentation
Date: Fri, 27 May 2016 12:58:17 -0400	[thread overview]
Message-ID: <hsshx31lqu.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <20160527164723.4A992220156@vcs.savannah.gnu.org> (Paul Eggert's message of "Fri, 27 May 2016 16:47:23 +0000 (UTC)")

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.



       reply	other threads:[~2016-05-27 16:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20160527164722.20278.19217@vcs.savannah.gnu.org>
     [not found] ` <20160527164723.4A992220156@vcs.savannah.gnu.org>
2016-05-27 16:58   ` Glenn Morris [this message]
2016-05-27 17:02     ` master b342815: Improve define-function omitted-arg documentation Glenn Morris
2016-05-27 17:52       ` Paul Eggert
2016-05-27 18:51       ` Eli Zaretskii
2016-05-27 19:48   ` Stefan Monnier
2016-05-28  1:19     ` Paul Eggert

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=hsshx31lqu.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=eggert@cs.ucla.edu \
    --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 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.