all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Drew Adams <drew.adams@oracle.com>
Cc: 32064-done@debbugs.gnu.org
Subject: bug#32064: 26; doc string of `eval-last-sexp'
Date: Fri, 06 Jul 2018 12:37:33 +0300	[thread overview]
Message-ID: <83wou8ln6q.fsf@gnu.org> (raw)
In-Reply-To: <e0cc6797-4801-4848-8681-36a4d35979be@default> (message from Drew Adams on Thu, 5 Jul 2018 14:56:48 -0700 (PDT))

> Date: Thu, 5 Jul 2018 14:56:48 -0700 (PDT)
> From: Drew Adams <drew.adams@oracle.com>
> 
> Looking at `eval-expression-get-print-arguments' and the doc string for `eval-expression', things are a bit clearer.  At least please incorporate something like what is said for `eval-expression' in the doc of `eval-last-sexp'. 

I preferred to fix eval-last-sexp in a somewhat different way.

> But even the `eval-expression' doc is not very good for the description of CHAR-PRINT-LIMIT.  It's not true that "unless given a positive prefix argument" a number value is printed in several... Try a prefix arg of -9, for instance.

Right, fixed.

> The doc of `eval-expression-get-print-arguments' says that it determines the prefix-arg behavior for `eval-last-sexp'.  Is that true?

Yes, AFAICT.

> The doc of `eval-expression-get-print-arguments' needs to specify the logic of what it does, and that info needs to be included in the doc of `eval-expression' and (if appropriate) the doc of `eval-last-sexp'.  Or at least their doc needs to point to such info.

I see no reason to point to eval-expression-get-print-arguments in the
doc string of eval-last-sexp.  If someone reads the code of
eval-last-sexp, they will see the call, and will look up the function.

> The doc string for `eval-expression-print-format' is not great either.  It says only what the result will "typically" look like.  It needs to specify what formats it outputs, under what conditions.

I don't see the need, as the code is quite self-describing.

> And the various doc strings seem to suggest that the handling of the last arg, CHAR-PRINT-LIMIT by `eval-exprresion' is different from its handling by `eval-last-sexp'.  But is that true?

No, it is not true.  Fixed.

I'm closing the bug, thanks for pointing out these blunders.





  parent reply	other threads:[~2018-07-06  9:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-05 20:15 bug#32064: 26; doc string of `eval-last-sexp' Drew Adams
2018-07-05 21:56 ` Drew Adams
2018-07-06  0:23   ` Noam Postavsky
2018-07-06  9:39     ` Eli Zaretskii
2018-07-06 11:47       ` Noam Postavsky
2018-07-06 17:55         ` Drew Adams
2018-07-06  9:37   ` Eli Zaretskii [this message]
2018-07-06  9:34 ` Eli Zaretskii

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=83wou8ln6q.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=32064-done@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /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.