Index: /branches/ide-1.0/ccl/examples/cocoa-doc.lisp
===================================================================
--- /branches/ide-1.0/ccl/examples/cocoa-doc.lisp	(revision 6748)
+++ /branches/ide-1.0/ccl/examples/cocoa-doc.lisp	(revision 6749)
@@ -1,3 +1,31 @@
 (in-package "CCL")
+
+(def-cocoa-default *hyperspec-http-url-string* :string "http://www.lisp.org/HyperSpec/" "HTTP URL for HyperSpec lookup")
+
+(def-cocoa-default *hyperspec-file-url-string* :string "file:///" "filesystem URL for HyperSpec lookup")
+
+(defloadvar *hyperspec-root-url* nil)
+(defloadvar *hyperspec-map-sym-hash* nil)
+
+
+(defloadvar *hyperspec-map-sym-url* nil)
+
+(def-cocoa-default *hyperspec-use-file-url* :bool nil "selects hyperspec url scheme")
+
+
+(def-cocoa-default *hyperspec-lookup-enabled* :bool nil "enables hyperspec lookup"
+                   (lambda (old new)
+                     (unless (eq new old)
+                       (if new
+                         (setup-hyperspec-root-url)
+                         (progn
+                           (when *hyperspec-root-url*
+                             (#/release *hyperspec-root-url*))
+                           (setq *hyperspec-root-url* nil)
+                           (when *hyperspec-map-sym-url*
+                             (#/release *hyperspec-map-sym-url*))
+                           (setq *hyperspec-root-url* nil)
+                           (setq *hyperspec-map-sym-hash* nil))))))
+
 
 (defclass display-document (ns:ns-document)
@@ -68,14 +96,19 @@
   (call-next-method controller))
 
-(defloadvar *hyperspec-map-sym-hash* nil)
-
-(defloadvar *hyperspec-root-url* nil)
-
-(defloadvar *hyperspec-map-sym-url* nil)
 
 (defun hyperspec-root-url ()
   (or *hyperspec-root-url*
-      (set *hyperspec-root-url* (prompt-for-hyperspec-root-url))))
+      (set *hyperspec-root-url* (setup-hyperspec-root-url))))
 
+(defun setup-hyperspec-root-url ()
+  (make-instance 'ns:ns-url
+                 :with-string
+                 (%make-nsstring 
+                  (if *hyperspec-use-file-url*
+                    *hyperspec-file-url-string*
+                    *hyperspec-http-url-string*))))
+    
+                               
+                             
 
 (defun hyperspec-map-hash (document)
