diff options
author | Gerd Moellmann <gerd@gnu.org> | 2001-07-26 13:41:32 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 2001-07-26 13:41:32 +0000 |
commit | 8f4f953c20e34ef4664d20fa1f069796af5201d2 (patch) | |
tree | 63854a92807794b2084ec72bf7861ddbf82478fb /lisp/emacs-lisp | |
parent | be4a68f92a947ed48393f1ff99e305f250a0b4bb (diff) | |
download | emacs-8f4f953c20e34ef4664d20fa1f069796af5201d2.tar.gz emacs-8f4f953c20e34ef4664d20fa1f069796af5201d2.tar.bz2 emacs-8f4f953c20e34ef4664d20fa1f069796af5201d2.zip |
(eval-last-sexp-1): Don't search for
`...', compare with unabbreviated printed representation instead.
(last-sexp-print): Bind print-length and print-level to nil.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 35dfadbe66e..0241993421c 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -326,7 +326,9 @@ which see." (when value (let ((beg (previous-single-property-change (point) 'printed-value)) (end (next-single-char-property-change (point) 'printed-value)) - (standard-output (current-buffer))) + (standard-output (current-buffer)) + (print-length nil) + (print-level nil)) (delete-region beg end) (prin1 value))))) @@ -388,7 +390,9 @@ With argument, print output into current buffer." 'args))))) expr)) (set-syntax-table stab)))))) - (let ((print-length eval-expression-print-length) + (let ((unabbreviated (let ((print-length nil) (print-level nil)) + (prin1-to-string value))) + (print-length eval-expression-print-length) (print-level eval-expression-print-level) (beg (point)) end) @@ -397,9 +401,7 @@ With argument, print output into current buffer." (when (and (bufferp standard-output) (or (not (null print-length)) (not (null print-level))) - (save-excursion - (goto-char beg) - (search-forward "..." end t))) + (not (string= unabbreviated (buffer-substring beg end)))) (let ((map (make-sparse-keymap))) (define-key map "\C-m" 'last-sexp-print) (define-key map [down-mouse-2] 'mouse-set-point) |