all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
Cc: rms@gnu.org, emacs@whaite.ca, emacs-devel@gnu.org
Subject: Re: printing most-negative-fixnum fails
Date: Wed, 19 May 2004 11:36:19 +0300	[thread overview]
Message-ID: <87oeokeruj.fsf@mail.jurta.org> (raw)
In-Reply-To: <200405141146.UAA17752@etlken.m17n.org> (Kenichi Handa's message of "Fri, 14 May 2004 20:46:35 +0900 (JST)")

Kenichi Handa <handa@m17n.org> 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/

  parent reply	other threads:[~2004-05-19  8:36 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-06 20:08 printing most-negative-fixnum fails Peter Whaite
2004-05-11  0:17 ` Juri Linkov
2004-05-11  3:20   ` Stefan Monnier
2004-05-11 16:57     ` Juri Linkov
2004-05-12 19:41       ` Richard Stallman
2004-05-11 12:23   ` Richard Stallman
2004-05-11 16:47     ` Juri Linkov
2004-05-14  9:20       ` Richard Stallman
2004-05-14 11:46         ` Kenichi Handa
2004-05-15  8:17           ` Juri Linkov
2004-05-15  8:53           ` Richard Stallman
2004-05-15  9:19             ` David Kastrup
2004-05-15 20:03             ` Juri Linkov
2004-05-18 13:03               ` Kenichi Handa
2004-05-19  8:36           ` Juri Linkov [this message]
2004-05-15  8:09         ` Juri Linkov
2004-05-15 18:34           ` Richard Stallman
2004-05-15 19:32             ` Juri Linkov
2004-05-12  1:41     ` Kenichi Handa
2004-05-12  2:06       ` Stefan Monnier
2004-05-12  4:43         ` Kenichi Handa
2004-05-11  2:48 ` Stefan Monnier
2004-05-11  3:11   ` Luc Teirlinck
2004-05-11  4:26     ` Kenichi Handa

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=87oeokeruj.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=emacs-devel@gnu.org \
    --cc=emacs@whaite.ca \
    --cc=rms@gnu.org \
    /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.