(url-generic-parse-url): Bind deactivate-mark.
This commit is contained in:
parent
be1674ab1b
commit
c074ba4a56
2 changed files with 79 additions and 73 deletions
|
@ -1,3 +1,7 @@
|
|||
2009-11-27 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* url-parse.el (url-generic-parse-url): Bind deactivate-mark.
|
||||
|
||||
2009-11-08 Kai Tetzlaff <kai.tetzlaff@web.de> (tiny change)
|
||||
|
||||
* url-http.el (url-http-handle-authentication): Use proxy server,
|
||||
|
|
|
@ -91,6 +91,9 @@ TYPE USER PASSWORD HOST PORTSPEC FILENAME TARGET ATTRIBUTES FULLNESS."
|
|||
(url-parse-make-urlobj nil nil nil nil nil url))
|
||||
(t
|
||||
(with-temp-buffer
|
||||
;; Don't let those temp-buffer modifications accidentally
|
||||
;; deactivate the mark of the current-buffer.
|
||||
(let ((deactivate-mark nil))
|
||||
(set-syntax-table url-parse-syntax-table)
|
||||
(let ((save-pos nil)
|
||||
(prot nil)
|
||||
|
@ -109,17 +112,15 @@ TYPE USER PASSWORD HOST PORTSPEC FILENAME TARGET ATTRIBUTES FULLNESS."
|
|||
(setq save-pos (point))
|
||||
|
||||
;; 3.1. Scheme
|
||||
(if (not (looking-at "//"))
|
||||
(progn
|
||||
(unless (looking-at "//")
|
||||
(skip-chars-forward "a-zA-Z+.\\-")
|
||||
(downcase-region save-pos (point))
|
||||
(setq prot (buffer-substring save-pos (point)))
|
||||
(skip-chars-forward ":")
|
||||
(setq save-pos (point))))
|
||||
(setq save-pos (point)))
|
||||
|
||||
;; 3.2. Authority
|
||||
(if (looking-at "//")
|
||||
(progn
|
||||
(when (looking-at "//")
|
||||
(setq full t)
|
||||
(forward-char 2)
|
||||
(setq save-pos (point))
|
||||
|
@ -138,7 +139,7 @@ TYPE USER PASSWORD HOST PORTSPEC FILENAME TARGET ATTRIBUTES FULLNESS."
|
|||
(if (string-match ":$" host)
|
||||
(setq host (substring host 0 (match-beginning 0))))
|
||||
(setq host (downcase host)
|
||||
save-pos (point))))
|
||||
save-pos (point)))
|
||||
|
||||
(if (not port)
|
||||
(setq port (url-scheme-get-property prot 'default-port)))
|
||||
|
@ -162,15 +163,16 @@ TYPE USER PASSWORD HOST PORTSPEC FILENAME TARGET ATTRIBUTES FULLNESS."
|
|||
(point-max))))
|
||||
(goto-char save-pos)
|
||||
(skip-chars-forward "^;")
|
||||
(if (not (eobp))
|
||||
(setq attr (url-parse-args (buffer-substring (point) (point-max)) t)
|
||||
(unless (eobp)
|
||||
(setq attr (url-parse-args (buffer-substring (point) (point-max))
|
||||
t)
|
||||
attr (nreverse attr))))
|
||||
|
||||
(setq file (buffer-substring save-pos (point)))
|
||||
(if (and host (string-match "%[0-9][0-9]" host))
|
||||
(setq host (url-unhex-string host)))
|
||||
(url-parse-make-urlobj
|
||||
prot user pass host port file refs attr full))))))
|
||||
prot user pass host port file refs attr full)))))))
|
||||
|
||||
(provide 'url-parse)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue