- Timestamp:
- May 26, 2008, 6:04:34 PM (17 years ago)
- Location:
- branches/working-0711/ccl
- Files:
-
- 3 edited
-
level-1/l1-readloop-lds.lisp (modified) (4 diffs)
-
lib/ccl-export-syms.lisp (modified) (1 diff)
-
lib/describe.lisp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/working-0711/ccl/level-1/l1-readloop-lds.lisp
r9582 r9602 45 45 (define-toplevel-command 46 46 :global y (&optional p) "Yield control of terminal-input to process 47 whose name or ID matches <p>, or to any process if <p> is null"47 whose name or ID matches <p>, or to any process if <p> is null" 48 48 (%%yield-terminal-to (if p (find-process p)))) ;may be nil 49 49 … … 117 117 118 118 (define-toplevel-command :global ? () "help" 119 (format t "~&The following toplevel commands are available:") 120 (when *default-integer-command* 121 (format t "~& <n> ~8Tthe same as (~s <n>)" (car *default-integer-command*))) 119 122 (dolist (g *active-toplevel-commands*) 120 123 (dolist (c (cdr g)) … … 124 127 (if args 125 128 (format t "~& (~S~{ ~A~}) ~8T~A" command args doc) 126 (format t "~& ~S ~8T~A" command doc)))))) 129 (format t "~& ~S ~8T~A" command doc))))) 130 (format t "~&Any other form is evaluated and its results are printed out.")) 127 131 128 132 … … 242 246 (%use-toplevel-commands :global) 243 247 248 (defparameter *toplevel-commands-dwim* t "If true, tries to interpret otherwise-erroneous toplevel 249 expressions as commands") 250 251 (defvar *default-integer-command* nil 252 "If non-nil, should be (keyword min max)), causing integers between min and max to be 253 interpreted as (keyword integer)") 254 244 255 (defun check-toplevel-command (form) 256 (when (and *default-integer-command* 257 (integerp form) 258 (<= (cadr *default-integer-command*) form (caddr *default-integer-command*))) 259 (setq form `(,(car *default-integer-command*) ,form))) 245 260 (let* ((cmd (if (consp form) (car form) form)) 246 261 (args (if (consp form) (cdr form)))) 247 (if (keywordp cmd) 262 (when (or (keywordp cmd) 263 (and *toplevel-commands-dwim* 264 (non-nil-symbol-p cmd) 265 (not (if (consp form) (fboundp cmd) (boundp cmd))) 266 ;; Use find-symbol so don't make unneeded keywords. 267 (setq cmd (find-symbol (symbol-name cmd) :keyword)))) 268 (when (eq cmd :help) (setq cmd :?)) 248 269 (dolist (g *active-toplevel-commands*) 249 (when 250 (let* ((pair (assoc cmd (cdr g)))) 251 (if pair 252 (progn (apply (cadr pair) args) 253 t))) 254 (return t)))))) 270 (let* ((pair (assoc cmd (cdr g)))) 271 (when pair 272 (apply (cadr pair) args) 273 (return t))))))) 255 274 256 275 (defparameter *quit-on-eof* nil) -
branches/working-0711/ccl/lib/ccl-export-syms.lisp
r9578 r9602 23 23 local 24 24 set-local 25 @ 25 26 *elements-per-buffer* 26 27 save-application -
branches/working-0711/ccl/lib/describe.lisp
r7624 r9602 1752 1752 1753 1753 (defvar *inspector-ui* ()) 1754 (defvar *previous-inspector-ui* nil) 1754 1755 1755 1756 (defclass inspector-ui () … … 1801 1802 (ccl::define-toplevel-command 1802 1803 :tty-inspect pop () 1803 "exit current inspector "1804 "exit current inspector level" 1804 1805 (invoke-restart 'exit-inspector)) 1806 1807 (ccl::define-toplevel-command 1808 :tty-inspect q () 1809 "exit inspector" 1810 (invoke-restart 'end-inspect)) 1811 1805 1812 1806 1813 (ccl::define-toplevel-command 1807 1814 :tty-inspect show () 1808 "re-show currently inspected object "1815 "re-show currently inspected object (the value of CCL:@)" 1809 1816 (ui-present *inspector-ui*)) 1810 1817 … … 1851 1858 1852 1859 (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)))))) 1854 1862 (restart-case 1855 1863 (ccl:with-terminal-input … … 1860 1868 (format stream "~&Inspect> ") 1861 1869 (format stream "~&Inspect ~d> " level)))))) 1862 (exit-inspector () (terpri *debug-io*))))) 1870 (exit-inspector () ; 1871 (if *previous-inspector-ui* 1872 (ui-present *previous-inspector-ui*) 1873 (terpri *debug-io*)))))) 1863 1874 1864 1875 (defmethod inspector-ui-inspect-nth ((ui inspector-tty-ui) n) … … 1878 1889 1879 1890 (defmethod inspector-ui-inspect ((ui inspector-ui)) 1880 (let* ((*inspector-ui* ui)) 1891 (let* ((*previous-inspector-ui* *inspector-ui*) 1892 (*inspector-ui* ui)) 1881 1893 (ui-initialize ui) 1882 1894 (ui-present ui) … … 1889 1901 :level 0))) 1890 1902 1891 (def global*default-inspector-ui-creation-function* 'tty-inspect)1903 (defparameter *default-inspector-ui-creation-function* 'tty-inspect) 1892 1904 1893 1905 1894 1906 (defun inspect (thing) 1895 1907 (let* ((ccl::@ thing)) 1896 ( funcall *default-inspector-ui-creation-function* thing)))1897 1908 (restart-case (funcall *default-inspector-ui-creation-function* thing) 1909 (end-inspect () thing))))
Note:
See TracChangeset
for help on using the changeset viewer.
