mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 22:41:06 -08:00
(prin1-char): Catch errors from `string'.
(eval-last-sexp-print-value): Print char equivalent regardless of standard-output value.
This commit is contained in:
parent
3f71ad3a46
commit
152472ba19
1 changed files with 6 additions and 4 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue