Cleanups and improvements for FFAP and URL.
commit9f9aa0448aa1b5317d8903e33db1e3bb27e98ece
authorChong Yidong <cyd@gnu.org>
Thu, 10 May 2012 06:27:12 +0000 (10 14:27 +0800)
committerChong Yidong <cyd@gnu.org>
Thu, 10 May 2012 06:27:12 +0000 (10 14:27 +0800)
tree326360d5b258a5c269c20f12a19a9cead3fbf0f7
parent97107e2e531ee355f517990eed735fa657b7105b
Cleanups and improvements for FFAP and URL.

* ffap.el (ffap-url-unwrap-local): Make it work right.
Use url-generic-parse-url, and handle host names and Windows
filenames properly.
(ffap-url-unwrap-remote): Use url-generic-parse-url.
(ffap-url-unwrap-remote): Accept list values, specifying a list of
URL schemes to work on.
(ffap--toggle-read-only): New function.
(ffap-read-only, ffap-read-only-other-window)
(ffap-read-only-other-frame): Use it.
(ffap-fixup-url): Don't check ffap-ftp-regexp, since it is not
necessary for ffap-url-unwrap-remote.

* url-parse.el (url-path-and-query, url-port-if-non-default): New
functions.
(url-generic-parse-url): Don't set the portspec slot if it is not
specified; that is what `url-port' is for.
(url-port): Only require the scheme to be specified to call
url-scheme-get-property.

* url-util.el (url-encode-url): Use url-path-and-query.

* url-vars.el (url-mime-charset-string): Load mm-util lazily.

Fixes: debbugs:9131
etc/NEWS
lisp/ChangeLog
lisp/ffap.el
lisp/url/ChangeLog
lisp/url/url-parse.el
lisp/url/url-util.el
lisp/url/url-vars.el