Ignore:
Timestamp:
Jun 9, 2008, 1:08:40 AM (14 years ago)
Author:
gb
Message:

Propagate decl changes from working-0711.
READ-CHAR: try the obviously BASIC-STREAM case earlier.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711-perf/ccl/lib/describe.lisp

    r7624 r9702  
    17521752
    17531753(defvar *inspector-ui* ())
     1754(defvar *previous-inspector-ui* nil)
    17541755
    17551756(defclass inspector-ui ()
     
    18011802(ccl::define-toplevel-command
    18021803    :tty-inspect pop ()
    1803     "exit current inspector"
     1804    "exit current inspector level"
    18041805    (invoke-restart 'exit-inspector))
     1806
     1807(ccl::define-toplevel-command
     1808    :tty-inspect q ()
     1809    "exit inspector"
     1810  (invoke-restart 'end-inspect))
     1811
    18051812
    18061813(ccl::define-toplevel-command
    18071814    :tty-inspect show ()
    1808     "re-show currently inspected object"
     1815    "re-show currently inspected object (the value of CCL:@)"
    18091816    (ui-present *inspector-ui*))
    18101817
     
    18511858
    18521859(defmethod ui-interact ((ui inspector-tty-ui))
    1853   (let* ((level (inspector-ui-level ui)))
     1860  (let* ((level (inspector-ui-level ui))
     1861         (ccl::*default-integer-command* `(:i 0 ,(1- (compute-line-count (inspector-ui-inspector ui))))))
     1862    (declare (special ccl::*default-integer-command*))
    18541863    (restart-case
    18551864     (ccl:with-terminal-input
     
    18601869                                   (format stream "~&Inspect> ")
    18611870                                   (format stream "~&Inspect ~d> " level))))))
    1862      (exit-inspector () (terpri *debug-io*)))))
     1871      (exit-inspector () ;
     1872        (if *previous-inspector-ui*
     1873          (ui-present *previous-inspector-ui*)
     1874          (terpri *debug-io*))))))
    18631875
    18641876(defmethod inspector-ui-inspect-nth ((ui inspector-tty-ui) n)
     
    18781890
    18791891(defmethod inspector-ui-inspect ((ui inspector-ui))
    1880   (let* ((*inspector-ui* ui))
     1892  (let* ((*previous-inspector-ui* *inspector-ui*)
     1893         (*inspector-ui* ui))
    18811894    (ui-initialize ui)
    18821895    (ui-present ui)
     
    18891902                                         :level 0)))
    18901903
    1891 (defglobal *default-inspector-ui-creation-function* 'tty-inspect)
     1904(defparameter *default-inspector-ui-creation-function* 'tty-inspect)
    18921905       
    18931906
    18941907(defun inspect (thing)
    18951908  (let* ((ccl::@ thing))
    1896     (funcall *default-inspector-ui-creation-function* thing)))
    1897 
     1909    (restart-case (funcall *default-inspector-ui-creation-function* thing)
     1910      (end-inspect () thing))))
Note: See TracChangeset for help on using the changeset viewer.