[closure-cvs] CVS closure/src/gui

thenriksen thenriksen at common-lisp.net
Wed Jan 2 09:10:00 UTC 2008


Update of /project/closure/cvsroot/closure/src/gui
In directory clnet:/tmp/cvs-serv8124/src/gui

Modified Files:
	clim-gui.lisp 
Log Message:
If we get an URI with no protocol specified, add http:// to it and
reparse. This allows (closure:visit "planet.lisp.org"), though still
not (closure:visit #u"planet.lisp.org").


--- /project/closure/cvsroot/closure/src/gui/clim-gui.lisp	2008/01/02 08:54:12	1.35
+++ /project/closure/cvsroot/closure/src/gui/clim-gui.lisp	2008/01/02 09:10:00	1.36
@@ -4,7 +4,7 @@
 ;;;   Created: 2002-07-22
 ;;;    Author: Gilbert Baumann <gilbert at base-engineering.com>
 ;;;   License: MIT style (see below)
-;;;       $Id: clim-gui.lisp,v 1.35 2008/01/02 08:54:12 thenriksen Exp $
+;;;       $Id: clim-gui.lisp,v 1.36 2008/01/02 09:10:00 thenriksen Exp $
 ;;; ---------------------------------------------------------------------------
 ;;;  (c) copyright 2002 by Gilbert Baumann
 
@@ -28,6 +28,11 @@
 ;;;  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 ;; $Log: clim-gui.lisp,v $
+;; Revision 1.36  2008/01/02 09:10:00  thenriksen
+;; If we get an URI with no protocol specified, add http:// to it and
+;; reparse. This allows (closure:visit "planet.lisp.org"), though still
+;; not (closure:visit #u"planet.lisp.org").
+;;
 ;; Revision 1.35  2008/01/02 08:54:12  thenriksen
 ;; Created a new package, CLIM-GUI instead of putting everything in
 ;; CLIM-USER. Also removed some stale code from clim-gui.lisp. Perhaps
@@ -538,7 +543,11 @@
 
 (defun parse-url* (url)
   (etypecase url
-    (string (url:parse-url url))
+    (string
+     (let ((parsed-url (url:parse-url url)))
+       (if (url:url-protocol parsed-url)
+           parsed-url
+           (parse-url* (concatenate 'string "http://" url)))))
     (url:url url)))
 
 (defun send-closure-command (command &rest args)




More information about the Closure-cvs mailing list