unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Dieter Wilhelm <dieter@duenenhof-wilhelm.de>
Subject: Re: No return value in doc string
Date: Thu, 27 Apr 2006 03:16:37 +0200	[thread overview]
Message-ID: <87ejzj3jii.fsf@hans.local.net> (raw)
In-Reply-To: <ud5f4gs1c.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 26 Apr 2006 20:34:07 +0300")

Eli Zaretskii <eliz@gnu.org> writes:
>> From: Dieter Wilhelm <dieter@duenenhof-wilhelm.de>
>> Is there any policy for the documentation string of the return value?
> I don't know if there is a policy, but I think return values should be
> documented.
That was my feeling (Look, I'm somewhat pampered through the excellent
Emacs documentation) 8-)
> What version of Emacs do you have?  In the current development
> sources, the doc string of make-frame already says:
>
>     Return a newly created frame displaying the current buffer.

> So the return value, which is the frame object, is already
> documented.
Oh holly ... I didn't read it carefully and confused Return with
Render, I'm sorry (using GNU Emacs 22.0.50.3 (i686-pc-linux-gnu, X
toolkit, Xaw3d scroll bars) of 2006-04-23 on hans, but not using the
scroll bars ;-)).
> As for the other two, the return nil, i.e. nothing, so I think it's
> okay to say nothing about the (absent) return 
Well, I realised that the coder expressly specified nil as the return
value, so I thought it somehow important.

Then you suggest the following guideline: Document all return values
*except* nil.  When this is generally accommodated I'm perfectly happy
with it.

By the way, is nil in Elisp analogous to void in C/C++?  Does an
uninitialised variable represent also nil?  Strange:
(defvar foo)
foo
says void value of foo?  Wait a moment, I think I don't know what I'm
taking about, I'll better read in the Elisp manual what actually nil
means.
>> Should I report this as bugs or is this a bit over the top?
>
> ...feel free to report if you disagree with my reasoning.
No thanks, this would be self defeating.
-- 
Best wishes

     Dieter Wilhelm

  reply	other threads:[~2006-04-27  1:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-24  0:27 No return value in doc string Dieter Wilhelm
2006-04-26 17:34 ` Eli Zaretskii
2006-04-27  1:16   ` Dieter Wilhelm [this message]
     [not found] <mailman.965.1146057882.9609.help-gnu-emacs@gnu.org>
2006-04-27 20:07 ` Stefan Monnier
2006-04-29 10:01   ` Dieter Wilhelm
     [not found]   ` <mailman.1122.1146330818.9609.help-gnu-emacs@gnu.org>
2006-04-29 21:55     ` Miles Bader

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=87ejzj3jii.fsf@hans.local.net \
    --to=dieter@duenenhof-wilhelm.de \
    /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.
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).