From: Gerd Moellmann Date: Thu, 26 Jul 2001 13:34:32 +0000 (+0000) Subject: (eval-last-sexp-1): Look for a `...' X-Git-Tag: emacs-pretest-21.0.105~376 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=be4a68f92a947ed48393f1ff99e305f250a0b4bb;p=emacs.git (eval-last-sexp-1): Look for a `...' before assigning text properties. Make properties rear-nonsticky. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cd9de63f868..de29a5ae4e8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2001-07-26 Gerd Moellmann + * emacs-lisp/lisp-mode.el (eval-last-sexp-1): Look for a `...' + before assigning text properties. Make properties rear-nonsticky. + * emacs-lisp/lisp-mode.el (last-sexp-print): New function. (eval-last-sexp-1): Give printed text a `keymap' property and bind and in that map to a function printing the diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 093357c5b43..35dfadbe66e 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -390,13 +390,17 @@ With argument, print output into current buffer." (set-syntax-table stab)))))) (let ((print-length eval-expression-print-length) (print-level eval-expression-print-level) - (beg (point))) + (beg (point)) + end) (prin1 value) + (setq end (point)) (when (and (bufferp standard-output) (or (not (null print-length)) - (not (null print-level)))) - (let ((map (make-sparse-keymap)) - (end (point))) + (not (null print-level))) + (save-excursion + (goto-char beg) + (search-forward "..." end t))) + (let ((map (make-sparse-keymap))) (define-key map "\C-m" 'last-sexp-print) (define-key map [down-mouse-2] 'mouse-set-point) (define-key map [mouse-2] 'last-sexp-print) @@ -405,7 +409,10 @@ With argument, print output into current buffer." `(printed-value ,value mouse-face highlight keymap ,map - help-echo "RET, mouse-2: print unabbreviated")))))))) + help-echo "RET, mouse-2: print unabbreviated" + read-nonsticky (mouse-face keymap help-echo + printed-value) + )))))))) (defun eval-last-sexp (eval-last-sexp-arg-internal)