aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorDavid Reitter2014-11-14 07:22:01 -0500
committerDavid Reitter2014-11-14 07:22:01 -0500
commitc28ef9a4662324fe77910e6c82b72cef0c2aa7df (patch)
treeb85ec767f8761753a46f50ecae4d0d7e25e41438 /lisp
parenta5cbb7d9cc072db90201dd6e7e597c424a7d015e (diff)
downloademacs-c28ef9a4662324fe77910e6c82b72cef0c2aa7df.tar.gz
emacs-c28ef9a4662324fe77910e6c82b72cef0c2aa7df.zip
Compress publicsuffix file to save space
* url-domsuf.el (url-domsuf-parse-file): Read compressed publicsuffix file if available. * Makefile.in (install-arch-indep): Compress publicsuffix.txt file.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/url/ChangeLog5
-rw-r--r--lisp/url/url-domsuf.el8
2 files changed, 11 insertions, 2 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 13628773137..1be4ca70a80 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,8 @@
12014-11-14 David Reitter <david.reitter@gmail.com>
2
3 * url-domsuf.el (url-domsuf-parse-file): Read compressed
4 publicsuffix file if available.
5
12014-11-05 Teodor Zlatanov <tzz@lifelogs.com> 62014-11-05 Teodor Zlatanov <tzz@lifelogs.com>
2 7
3 * url-http.el (url-user-agent): New variable, can be function or 8 * url-http.el (url-user-agent): New variable, can be function or
diff --git a/lisp/url/url-domsuf.el b/lisp/url/url-domsuf.el
index 365cf561ae2..b7f92597e2f 100644
--- a/lisp/url/url-domsuf.el
+++ b/lisp/url/url-domsuf.el
@@ -32,8 +32,12 @@
32 32
33(defun url-domsuf-parse-file () 33(defun url-domsuf-parse-file ()
34 (with-temp-buffer 34 (with-temp-buffer
35 (insert-file-contents 35 (with-auto-compression-mode
36 (expand-file-name "publicsuffix.txt" data-directory)) 36 (insert-file-contents
37 (let* ((suffixfile (expand-file-name "publicsuffix.txt" data-directory))
38 (compressed-file (concat suffixfile ".gz")))
39 (or (and (file-readable-p compressed-file) compressed-file)
40 suffixfile))))
37 (let ((domains nil) 41 (let ((domains nil)
38 domain exception) 42 domain exception)
39 (while (not (eobp)) 43 (while (not (eobp))