[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/simple.el
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/simple.el |
Date: |
Fri, 28 May 2004 22:40:56 -0400 |
Index: emacs/lisp/simple.el
diff -c emacs/lisp/simple.el:1.644 emacs/lisp/simple.el:1.645
*** emacs/lisp/simple.el:1.644 Sun May 23 21:01:15 2004
--- emacs/lisp/simple.el Fri May 28 21:00:14 2004
***************
*** 785,790 ****
--- 785,807 ----
:type 'boolean
:version "21.1")
+ (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."
+ (if (and (integerp value)
+ (or (not (eq this-command 'eval-last-sexp))
+ (eq this-command last-command)
+ (and (boundp 'edebug-active) edebug-active)))
+ (let ((char-string
+ (if (or (and (boundp 'edebug-active) edebug-active)
+ (eq this-command 'eval-last-sexp))
+ (prin1-char value))))
+ (if char-string
+ (format " (0%o, 0x%x) = %s" value value char-string)
+ (format " (0%o, 0x%x)" value value)))))
+
;; We define this, rather than making `eval' interactive,
;; for the sake of completion of names like eval-region, eval-current-buffer.
(defun eval-expression (eval-expression-arg
***************
*** 819,825 ****
(with-no-warnings
(let ((standard-output (current-buffer)))
(eval-last-sexp-print-value (car values))))
! (prin1 (car values) t))))
(defun edit-and-eval-command (prompt command)
"Prompting with PROMPT, let user edit COMMAND and eval result.
--- 836,845 ----
(with-no-warnings
(let ((standard-output (current-buffer)))
(eval-last-sexp-print-value (car values))))
! (prog1
! (prin1 (car values) t)
! (let ((str (eval-expression-print-format (car values))))
! (if str (princ str t)))))))
(defun edit-and-eval-command (prompt command)
"Prompting with PROMPT, let user edit COMMAND and eval result.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/simple.el,
Juri Linkov <=