From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#19114: 25.0.50; doc string of `eval-expression-print-format' is inappropriate Date: Sat, 30 Apr 2016 17:13:45 +0200 Message-ID: <87pot7nn86.fsf@gnus.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1462029284 3638 80.91.229.3 (30 Apr 2016 15:14:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 Apr 2016 15:14:44 +0000 (UTC) Cc: 19114@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 30 17:14:31 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1awWbG-0003G1-IP for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Apr 2016 17:14:30 +0200 Original-Received: from localhost ([::1]:58720 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awWbC-0001Qy-Dl for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Apr 2016 11:14:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awWb2-0001Cd-RB for bug-gnu-emacs@gnu.org; Sat, 30 Apr 2016 11:14:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1awWar-0001SQ-3n for bug-gnu-emacs@gnu.org; Sat, 30 Apr 2016 11:14:11 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45554) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awWar-0001RM-1C for bug-gnu-emacs@gnu.org; Sat, 30 Apr 2016 11:14:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1awWan-0003JX-IJ for bug-gnu-emacs@gnu.org; Sat, 30 Apr 2016 11:14:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Apr 2016 15:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19114 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19114-submit@debbugs.gnu.org id=B19114.146202923112715 (code B ref 19114); Sat, 30 Apr 2016 15:14:01 +0000 Original-Received: (at 19114) by debbugs.gnu.org; 30 Apr 2016 15:13:51 +0000 Original-Received: from localhost ([127.0.0.1]:57891 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awWac-0003J0-VK for submit@debbugs.gnu.org; Sat, 30 Apr 2016 11:13:51 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:57538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awWaa-0003It-VD for 19114@debbugs.gnu.org; Sat, 30 Apr 2016 11:13:49 -0400 Original-Received: from cm-84.215.1.64.getinternet.no ([84.215.1.64] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1awWaX-0003aZ-Rq; Sat, 30 Apr 2016 17:13:48 +0200 In-Reply-To: (Drew Adams's message of "Wed, 19 Nov 2014 18:50:19 -0800 (PST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) 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:117341 Archived-At: Drew Adams writes: > The doc string says "Return a formatted string which is displayed in the > echo area..." This is quite misleading. It can easily give the > impression that this function displays the returned value in the echo > area. THIS function does not with the formatted string, besides > returning it. It displays nothing. Please DTRT. (defun eval-expression-print-format (value) "Format VALUE as a result of evaluated expression. Return a formatted string which is displayed in the echo area in addition to the value printed by prin1 in functions which display the result of expression evaluation." I don't know quite what they're trying to express here... But then again, I don't understand the meaning of the function, either: (if (and (integerp value) (or (eq standard-output t) (zerop (prefix-numeric-value current-prefix-arg)))) (let ((char-string (if (and (characterp value) (char-displayable-p value)) (prin1-char value)))) (if char-string (format " (#o%o, #x%x, %s)" value value char-string) (format " (#o%o, #x%x)" value value))))) (eval-expression-print-format 1) C-x C-e " (#o1, #x1, ?\\C-a)" appears in *Messages* (eval-expression-print-format 1) C-u C-x C-e => nil Nothing in *Messages* (eval-expression-print-format 'foo) nil -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no