[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: printing most-negative-fixnum fails
From: |
Juri Linkov |
Subject: |
Re: printing most-negative-fixnum fails |
Date: |
Wed, 19 May 2004 11:36:19 +0300 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) |
Kenichi Handa <address@hidden> 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/
- Re: printing most-negative-fixnum fails, (continued)
- Re: printing most-negative-fixnum fails, Richard Stallman, 2004/05/11
- Re: printing most-negative-fixnum fails, Juri Linkov, 2004/05/11
- Re: printing most-negative-fixnum fails, Richard Stallman, 2004/05/14
- Re: printing most-negative-fixnum fails, Kenichi Handa, 2004/05/14
- Re: printing most-negative-fixnum fails, Juri Linkov, 2004/05/15
- Re: printing most-negative-fixnum fails, Richard Stallman, 2004/05/15
- Re: printing most-negative-fixnum fails, David Kastrup, 2004/05/15
- Re: printing most-negative-fixnum fails, Juri Linkov, 2004/05/15
- Re: printing most-negative-fixnum fails, Kenichi Handa, 2004/05/18
- Re: printing most-negative-fixnum fails,
Juri Linkov <=
- Re: printing most-negative-fixnum fails, Juri Linkov, 2004/05/15
- Re: printing most-negative-fixnum fails, Richard Stallman, 2004/05/15
- Re: printing most-negative-fixnum fails, Juri Linkov, 2004/05/15
- Re: printing most-negative-fixnum fails, Kenichi Handa, 2004/05/11
- Re: printing most-negative-fixnum fails, Stefan Monnier, 2004/05/11
- Re: printing most-negative-fixnum fails, Kenichi Handa, 2004/05/12
Re: printing most-negative-fixnum fails, Stefan Monnier, 2004/05/10