GNU bug report logs - #32064
26; doc string of `eval-last-sexp'

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Thu, 5 Jul 2018 20:16:02 UTC

Severity: minor

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 32064-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 32064-done <at> debbugs.gnu.org
Subject: Re: bug#32064: 26; doc string of `eval-last-sexp'
Date: Fri, 06 Jul 2018 12:37:33 +0300
> Date: Thu, 5 Jul 2018 14:56:48 -0700 (PDT)
> From: Drew Adams <drew.adams <at> 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.




This bug report was last modified 7 years and 7 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.