From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#32064: 26; doc string of `eval-last-sexp' Date: Fri, 06 Jul 2018 12:37:33 +0300 Message-ID: <83wou8ln6q.fsf@gnu.org> References: <0d7bb132-057e-431e-a5fa-86e15b99879a@default> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1530869771 22593 195.159.176.226 (6 Jul 2018 09:36:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 6 Jul 2018 09:36:11 +0000 (UTC) Cc: 32064-done@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 06 11:36:07 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fbN9q-0005lW-Jq for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Jul 2018 11:36:06 +0200 Original-Received: from localhost ([::1]:56654 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fbNBx-0002u5-Oo for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Jul 2018 05:38:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fbNBl-0002oQ-H1 for bug-gnu-emacs@gnu.org; Fri, 06 Jul 2018 05:38:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fbNBi-0001xA-Cq for bug-gnu-emacs@gnu.org; Fri, 06 Jul 2018 05:38:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40335) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fbNBi-0001vS-8M for bug-gnu-emacs@gnu.org; Fri, 06 Jul 2018 05:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fbNBi-00008F-1Z for bug-gnu-emacs@gnu.org; Fri, 06 Jul 2018 05:38:02 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Jul 2018 09:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 32064 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 32064@debbugs.gnu.org, eliz@gnu.org, drew.adams@oracle.com Original-Received: via spool by 32064-done@debbugs.gnu.org id=D32064.1530869863478 (code D ref 32064); Fri, 06 Jul 2018 09:38:01 +0000 Original-Received: (at 32064-done) by debbugs.gnu.org; 6 Jul 2018 09:37:43 +0000 Original-Received: from localhost ([127.0.0.1]:48231 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fbNBO-00007e-Io for submit@debbugs.gnu.org; Fri, 06 Jul 2018 05:37:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51486) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fbNBM-00007O-Ff for 32064-done@debbugs.gnu.org; Fri, 06 Jul 2018 05:37:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fbNBE-0008Id-3V for 32064-done@debbugs.gnu.org; Fri, 06 Jul 2018 05:37:35 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fbNBD-0008I2-Uv; Fri, 06 Jul 2018 05:37:32 -0400 Original-Received: from [176.228.60.248] (port=4878 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fbNBD-0003zU-9p; Fri, 06 Jul 2018 05:37:31 -0400 In-reply-to: (message from Drew Adams on Thu, 5 Jul 2018 14:56:48 -0700 (PDT)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:148246 Archived-At: > Date: Thu, 5 Jul 2018 14:56:48 -0700 (PDT) > From: Drew Adams > > 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.