All pastes #757538 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-11-01 12:48 UTC
rendered paste body
(defun slime-open-inspector (inspected-parts &optional point)
  "Display INSPECTED-PARTS in a new inspector window.
Optionally set point to POINT."
  (with-current-buffer (slime-inspector-buffer)
    (setq slime-buffer-connection (slime-current-connection))
    (let ((inhibit-read-only t))
      (erase-buffer)
      (destructuring-bind (&key title type content id) inspected-parts
        (macrolet ((fontify (face string) 
                     `(slime-inspector-fontify ,face ,string)))
          (slime-propertize-region (list 'slime-part-number id
                                         'mouse-face 'highlight
                                         'face 'slime-inspector-action-face)
            (slime-insert-presentation title `(:inspected-part ,id)))
          (while (eq (char-before) ?\n)
            (backward-delete-char 1))
          (insert "\n [" (fontify label "type:") " " (fontify type type) "]\n"
                  (fontify label "--------------------") "\n")
          (save-excursion 
            (mapc #'slime-inspector-insert-ispec content))
          (pop-to-buffer (current-buffer))
          (when point 
            (goto-char (min (point-max) point))))))))