print using #P"..." syntax.
changes in sbcl-0.8.12 relative to sbcl-0.8.11:
+ * the behaviour of the standard function ED is now customizeable by
+ third parties through a hook variable: see ED's documentation
+ string for information on the protocol.
* fixed bug 335: ATANH now computes the inverse hyperbolic tangent
even for difficult arguments. (reported by Peter Graves)
@include fun-common-lisp-require.texinfo
@include var-sb-ext-star-module-provider-functions-star.texinfo
+Although SBCL does not provide a resident editor, the @code{ed}
+function can be customized to hook into user-provided editing
+mechanisms as follows:
+
+@include fun-common-lisp-ed.texinfo
+@include var-sb-ext-star-ed-functions-star.texinfo
+
@node Tools To Help Developers
@comment node-name, next, previous, up
@subsection Tools To Help Developers
;; miscellaneous useful supported extensions
"QUIT"
+ "*ED-FUNCTIONS*"
"*MODULE-PROVIDER-FUNCTIONS*"
"WITH-TIMEOUT" "TIMEOUT"
"PACKAGE-AT-VARIANCE" "ARRAY-INITIAL-ELEMENT-MISMATCH"
"TYPE-WARNING" "LOCAL-ARGUMENT-MISMATCH"
"FORMAT-ARGS-MISMATCH" "FORMAT-TOO-FEW-ARGS-WARNING"
- "FORMAT-TOO-MANY-ARGS-WARNING"
+ "FORMAT-TOO-MANY-ARGS-WARNING" "EXTENSION-FAILURE"
;; ..and DEFTYPEs..
"INDEX" "LOAD/STORE-INDEX"
;;; (:ansi-cl :glossary "similar")
;;;
;;; (:sbcl :node "...")
+;;; (:sbcl :variable *ed-functions*)
;;;
;;; FIXME: this is not the right place for this.
(defun print-reference (reference stream)
(format stream ", ")
(destructuring-bind (type data) (cdr reference)
(ecase type
- (:node (format stream "Node ~S" data)))))
+ (:node (format stream "Node ~S" data))
+ (:variable (format stream "Variable ~S" data)))))
;; FIXME: other documents (e.g. AMOP, Franz documentation :-)
))
(define-condition reference-condition ()
(define-condition format-too-many-args-warning
(format-args-mismatch simple-style-warning)
())
+
+(define-condition extension-failure (reference-condition simple-error)
+ ())
\f
;;;; restart definitions
(defvar *module-provider-functions* '(module-provide-contrib)
"See function documentation for REQUIRE")
-
\f
;;;; PROVIDE and REQUIRE
(t
(unless (some (lambda (p) (funcall p module-name))
*module-provider-functions*)
- (error "Don't know how to load ~A" module-name)))))
+ (error 'extension-failure
+ :format-control "Don't know how to ~S ~A"
+ :format-arguments (list 'require module-name)
+ :references
+ (list
+ '(:sbcl :variable *module-provider-functions*)))))))
(set-difference *modules* saved-modules)))
\f
;;;; miscellany
"Return a string with the long form of the site name, or NIL if not known."
*long-site-name*)
\f
+;;;; ED
+(defvar *ed-functions* nil
+ "See function documentation for ED.")
+
+(defun ed (&optional x)
+ "Starts the editor (on a file or a function if named). Functions
+from the list *ED-FUNCTIONS* are called in order with X as an argument
+until one of them returns non-NIL; these functions are responsible for
+signalling a FILE-ERROR to indicate failure to perform an operation on
+the file system."
+ (dolist (fun *ed-functions*
+ (error 'extension-failure
+ :format-control "Don't know how to ~S ~A"
+ :format-arguments (list 'ed x)
+ :references (list '(:sbcl :variable *ed-functions*))))
+ (when (funcall fun x)
+ (return t))))
+\f
;;;; dribble stuff
;;; Each time we start dribbling to a new stream, we put it in
(defknown describe (t &optional (or stream (member t nil))) (values))
(defknown inspect (t) (values))
(defknown room (&optional (member t nil :default)) (values))
-(defknown ed (&optional (or symbol cons filename) &key (:init t) (:display t))
+(defknown ed (&optional (or symbol cons filename))
t)
(defknown dribble (&optional filename &key (:if-exists t)) (values))
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.11.1"
+"0.8.11.2"