/[emacs]/emacs/lisp/emacs-lisp/lisp-mode.el
ViewVC logotype

Diff of /emacs/lisp/emacs-lisp/lisp-mode.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.138 by jpw, Wed Jan 29 21:45:07 2003 UTC revision 1.139 by lektu, Tue Feb 4 12:53:34 2003 UTC
# Line 403  which see." Line 403  which see."
403  (defun last-sexp-setup-props (beg end value alt1 alt2)  (defun last-sexp-setup-props (beg end value alt1 alt2)
404    "Set up text properties for the output of `eval-last-sexp-1'.    "Set up text properties for the output of `eval-last-sexp-1'.
405  BEG and END are the start and end of the output in current-buffer.  BEG and END are the start and end of the output in current-buffer.
406  VALUE is the Lisp value printed, ALT1 and ALT2 are strings for the  VALUE is the Lisp value printed, ALT1 and ALT2 are strings for the
407  alternative printed representations that can be displayed."  alternative printed representations that can be displayed."
408    (let ((map (make-sparse-keymap)))    (let ((map (make-sparse-keymap)))
409      (define-key map "\C-m" 'last-sexp-toggle-display)      (define-key map "\C-m" 'last-sexp-toggle-display)
410      (define-key map [down-mouse-2] 'mouse-set-point)      (define-key map [down-mouse-2] 'mouse-set-point)
411      (define-key map [mouse-2] 'last-sexp-toggle-display)      (define-key map [mouse-2] 'last-sexp-toggle-display)
412      (add-text-properties      (add-text-properties
413       beg end       beg end
414       `(printed-value (,value ,alt1 ,alt2)       `(printed-value (,value ,alt1 ,alt2)
415                       mouse-face highlight                       mouse-face highlight
416                       keymap ,map                       keymap ,map
417                       help-echo "RET, mouse-2: toggle abbreviated display"                       help-echo "RET, mouse-2: toggle abbreviated display"
418                       rear-nonsticky (mouse-face keymap help-echo                       rear-nonsticky (mouse-face keymap help-echo
# Line 430  alternative printed representations that Line 430  alternative printed representations that
430              (point (point)))              (point (point)))
431          (delete-region beg end)          (delete-region beg end)
432          (insert (nth 1 value))          (insert (nth 1 value))
433          (last-sexp-setup-props beg (point)          (last-sexp-setup-props beg (point)
434                                 (nth 0 value)                                 (nth 0 value)
435                                 (nth 2 value)                                 (nth 2 value)
436                                 (nth 1 value))                                 (nth 1 value))
# Line 508  With argument, print output into current Line 508  With argument, print output into current
508                           (not (null print-level)))                           (not (null print-level)))
509                       (not (string= unabbreviated                       (not (string= unabbreviated
510                                     (buffer-substring-no-properties beg end))))                                     (buffer-substring-no-properties beg end))))
511              (last-sexp-setup-props beg end value              (last-sexp-setup-props beg end value
512                                     unabbreviated                                     unabbreviated
513                                     (buffer-substring-no-properties beg end))                                     (buffer-substring-no-properties beg end))
514              ))))))              ))))))

Legend:
Removed from v.1.138  
changed lines
  Added in v.1.139

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26