Function: last-sexp-setup-props

last-sexp-setup-props is a byte-compiled function defined in elisp-mode.el.gz.

Signature

(last-sexp-setup-props BEG END VALUE ALT1 ALT2)

Documentation

Set up text properties for the output of elisp--eval-last-sexp.

BEG and END are the start and end of the output in current buffer. VALUE is the Lisp value printed, ALT1 and ALT2 are strings for the alternative printed representations that can be displayed.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/elisp-mode.el.gz
(defun last-sexp-setup-props (beg end value alt1 alt2)
  "Set up text properties for the output of `elisp--eval-last-sexp'.
BEG and END are the start and end of the output in current buffer.
VALUE is the Lisp value printed, ALT1 and ALT2 are strings for the
alternative printed representations that can be displayed."
  (let ((map (make-sparse-keymap)))
    (define-key map "\C-m" 'elisp-last-sexp-toggle-display)
    (define-key map [down-mouse-2] 'mouse-set-point)
    (define-key map [mouse-2] 'elisp-last-sexp-toggle-display)
    (add-text-properties
     beg end
     `(printed-value (,value ,alt1 ,alt2)
		     mouse-face highlight
		     keymap ,map
		     help-echo "RET, mouse-2: toggle abbreviated display"
		     rear-nonsticky (mouse-face keymap help-echo
						printed-value)))))