diff lisp/minibuf.el @ 217:d44af0c54775 r20-4b7

Import from CVS: tag r20-4b7
author cvs
date Mon, 13 Aug 2007 10:08:34 +0200
parents 1f0dabaa0855
children 12579d965149
line wrap: on
line diff
--- a/lisp/minibuf.el	Mon Aug 13 10:07:42 2007 +0200
+++ b/lisp/minibuf.el	Mon Aug 13 10:08:34 2007 +0200
@@ -209,13 +209,21 @@
        (eq ?/ (char-before (point)))
        (not (save-excursion
 	      (goto-char (point-min))
-	      (and (looking-at "^/.+:~?")
+	      (and (looking-at "^/.+:~?[^/]*/.+")
 		   (re-search-forward "^/.+:~?[^/]*" nil t)
 		   (progn
 		     (delete-region (point) (point-max))
 		     t))))
+       (not (save-excursion
+	      (goto-char (point-min))
+	      (and (looking-at "^.+://[^/]*/.+")
+		   (re-search-forward "^.+:/" nil t)
+		   (progn
+		     (delete-region (point) (point-max))
+		     t))))
        (not (eq (point) (1+ (point-min)))) ; permit `//hostname/path/to/file'
-       (not (eq ?: (char-after (- (point) 2)))) ; permit `http://url/goes/here'
+       (or (not (eq ?: (char-after (- (point) 2)))) ; permit `http://url/goes/here'
+	   (eq ?/ (char-after (point-min))))
        (delete-region (point-min) (point)))
   (insert ?/))