aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2006-09-01 02:31:24 +0000
committerStefan Monnier2006-09-01 02:31:24 +0000
commitfb7dc310ed646b55225d58d1a7a3ed7fbdda9847 (patch)
treef9a94a6e9ebebea9aa5c16ea51f4438d86e290d2
parentadcc7a37ed52334adbbb5adc81f12bf51f1ac239 (diff)
downloademacs-fb7dc310ed646b55225d58d1a7a3ed7fbdda9847.tar.gz
emacs-fb7dc310ed646b55225d58d1a7a3ed7fbdda9847.zip
(url-recreate-url-attributes): New function, code moved from `url-recreate-url'.
(url-recreate-url): Use it. Put the `url-target' at the end of the URL.
-rw-r--r--lisp/url/url-parse.el23
1 files changed, 13 insertions, 10 deletions
diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el
index f84bf1a7ba2..1e4d93a861e 100644
--- a/lisp/url/url-parse.el
+++ b/lisp/url/url-parse.el
@@ -100,17 +100,20 @@
100 (not (equal (url-port urlobj) 100 (not (equal (url-port urlobj)
101 (url-scheme-get-property (url-type urlobj) 'default-port)))) 101 (url-scheme-get-property (url-type urlobj) 'default-port))))
102 (format ":%d" (url-port urlobj))) 102 (format ":%d" (url-port urlobj)))
103 (or (url-filename urlobj) "/") 103 (or (url-filename urlobj) "/")
104 (url-recreate-url-attributes urlobj)
104 (if (url-target urlobj) 105 (if (url-target urlobj)
105 (concat "#" (url-target urlobj))) 106 (concat "#" (url-target urlobj)))))
106 (if (url-attributes urlobj) 107
107 (concat ";" 108(defun url-recreate-url-attributes (urlobj)
108 (mapconcat 109 "Recreate the attributes of an URL string from the parsed URLOBJ."
109 (function 110 (when (url-attributes urlobj)
110 (lambda (x) 111 (concat ";"
111 (if (cdr x) 112 (mapconcat (lambda (x)
112 (concat (car x) "=" (cdr x)) 113 (if (cdr x)
113 (car x)))) (url-attributes urlobj) ";"))))) 114 (concat (car x) "=" (cdr x))
115 (car x)))
116 (url-attributes urlobj) ";"))))
114 117
115;;;###autoload 118;;;###autoload
116(defun url-generic-parse-url (url) 119(defun url-generic-parse-url (url)