From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: printing most-negative-fixnum fails Date: Wed, 19 May 2004 11:36:19 +0300 Organization: JURTA Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87oeokeruj.fsf@mail.jurta.org> References: <200405062008.i46K8x4R015248@brains.moreideas.ca> <87vfj3g1kv.fsf@mail.jurta.org> <8765b2g9x5.fsf@mail.jurta.org> <200405141146.UAA17752@etlken.m17n.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084962659 13048 80.91.224.253 (19 May 2004 10:30:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 19 May 2004 10:30:59 +0000 (UTC) Cc: rms@gnu.org, emacs@whaite.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed May 19 12:30:49 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BQOLZ-0007MF-00 for ; Wed, 19 May 2004 12:30:49 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BQOLZ-0004K8-00 for ; Wed, 19 May 2004 12:30:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BQNeq-0000ok-RH for emacs-devel@quimby.gnus.org; Wed, 19 May 2004 05:46:40 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BQNYz-00084e-QW for emacs-devel@gnu.org; Wed, 19 May 2004 05:40:37 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BQNTs-0006Zl-VU for emacs-devel@gnu.org; Wed, 19 May 2004 05:35:52 -0400 Original-Received: from [66.33.219.4] (helo=spork.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BQMkW-0005xV-Qp; Wed, 19 May 2004 04:48:29 -0400 Original-Received: from mail.jurta.org (80-235-32-237-dsl.mus.estpak.ee [80.235.32.237]) by spork.dreamhost.com (Postfix) with ESMTP id BC68111DC0D; Wed, 19 May 2004 01:48:25 -0700 (PDT) Original-To: Kenichi Handa In-Reply-To: <200405141146.UAA17752@etlken.m17n.org> (Kenichi Handa's message of "Fri, 14 May 2004 20:46:35 +0900 (JST)") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:23699 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23699 Kenichi Handa writes: > And make C-u C-u C-x C-e show a real character. It's very > unfortunate that we can't use C-u C-x C-e for that (I've > never used it). It's a good idea. But it seems inconsistent since C-u inserts a result into the current buffer, but C-u C-u will not. And it requires changes in the semantics of prefix arguments in existing functions which is not too good. But another similar idea is to show a character on successive C-x C-e calls, i.e. to use the condition (eq last-command 'eval-last-sexp) to decide whether to show a character. So C-x C-e C-x C-e will show a character in addition to numeric values. In this case the function `eval-expression-print-format' will be: (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 that display results of expression evaluation." (if (integerp value) (let ((char-string (if (or (and (boundp 'edebug-active) edebug-active) (and (eq this-command 'eval-last-sexp) (eq this-command last-command))) (prin1-char value)))) (if char-string (format " (0%o, 0x%x) = %s" value value char-string) (format " (0%o, 0x%x)" value value))))) and it will be called from four functions: `edebug-compute-previous-result', `edebug-eval-expression', `eval-expression' and `eval-last-sexp-print-value'. -- Juri Linkov http://www.jurta.org/emacs/