diff options
author | Richard M. Stallman <rms@gnu.org> | 2004-05-29 15:33:30 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2004-05-29 15:33:30 +0000 |
commit | 152472ba196b8c415045b3eecf8488c56b90d5da (patch) | |
tree | 43bd72de3dfc9651bb916f961a3a79c45d0e83a2 /lisp/emacs-lisp/lisp-mode.el | |
parent | 3f71ad3a4622245d9a319f464e5f287f0b706811 (diff) | |
download | emacs-152472ba196b8c415045b3eecf8488c56b90d5da.tar.gz |
(prin1-char): Catch errors from `string'.
(eval-last-sexp-print-value): Print char equivalent regardless
of standard-output value.
Diffstat (limited to 'lisp/emacs-lisp/lisp-mode.el')
-rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 1f53d9e630f..d6ac05642ba 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -470,7 +470,10 @@ If CHAR is not a character, return nil." (cond ((memq c '(?\; ?\( ?\) ?\{ ?\} ?\[ ?\] ?\" ?\' ?\\)) (string ?\\ c)) ((eq c 127) "\\C-?") - (t (string c))))))) + (t + (condition-case nil + (string c) + (error nil)))))))) (defun eval-last-sexp-1 (eval-last-sexp-arg-internal) "Evaluate sexp before point; print value in minibuffer. @@ -538,9 +541,8 @@ With argument, print output into current buffer." end) (prog1 (prin1 value) - (if (eq standard-output t) - (let ((str (eval-expression-print-format value))) - (if str (princ str)))) + (let ((str (eval-expression-print-format value))) + (if str (princ str))) (setq end (point)) (when (and (bufferp standard-output) (or (not (null print-length)) |