aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Reitter2014-11-14 07:22:01 -0500
committerDavid Reitter2014-11-14 07:22:01 -0500
commitc28ef9a4662324fe77910e6c82b72cef0c2aa7df (patch)
treeb85ec767f8761753a46f50ecae4d0d7e25e41438
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.
-rw-r--r--ChangeLog4
-rw-r--r--Makefile.in5
-rw-r--r--lisp/url/ChangeLog5
-rw-r--r--lisp/url/url-domsuf.el8
4 files changed, 18 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 174fe6a3d41..92c39959689 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
12014-11-14 David Reitter <david.reitter@gmail.com>
2
3 * Makefile.in (install-arch-indep): Compress publicsuffix.txt file.
4
12014-11-13 Lars Magne Ingebrigtsen <larsi@gnus.org> 52014-11-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 6
3 * .gitignore: Copy over sufficient ignorable files from the old 7 * .gitignore: Copy over sufficient ignorable files from the old
diff --git a/Makefile.in b/Makefile.in
index 8f5cacbfeb5..25d2a08d907 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -259,7 +259,7 @@ MKDIR_P = @MKDIR_P@
259# Create a link to a file in the same directory as the target. 259# Create a link to a file in the same directory as the target.
260LN_S_FILEONLY = @LN_S_FILEONLY@ 260LN_S_FILEONLY = @LN_S_FILEONLY@
261 261
262# We use gzip to compress installed .el files. 262# We use gzip to compress installed .el and some .txt files.
263GZIP_PROG = @GZIP_PROG@ 263GZIP_PROG = @GZIP_PROG@
264 264
265# ============================= Targets ============================== 265# ============================= Targets ==============================
@@ -600,11 +600,12 @@ install-arch-indep: lisp install-info install-man ${INSTALL_ARCH_INDEP_EXTRA}
600 subdir="$(DESTDIR)${datadir}/emacs/site-lisp" ; \ 600 subdir="$(DESTDIR)${datadir}/emacs/site-lisp" ; \
601 ${write_subdir} || true 601 ${write_subdir} || true
602 [ -z "${GZIP_PROG}" ] || { \ 602 [ -z "${GZIP_PROG}" ] || { \
603 echo "Compressing *.el ..." && \ 603 echo "Compressing *.el etc. ..." && \
604 cd "$(DESTDIR)${lispdir}" && \ 604 cd "$(DESTDIR)${lispdir}" && \
605 for f in `find . -name "*.elc" -print | sed 's/.elc$$/.el/'`; do \ 605 for f in `find . -name "*.elc" -print | sed 's/.elc$$/.el/'`; do \
606 ${GZIP_PROG} -9n "$$f"; \ 606 ${GZIP_PROG} -9n "$$f"; \
607 done; \ 607 done; \
608 ${GZIP_PROG} -9n "../etc/publicsuffix.txt"; \
608 } 609 }
609 -chmod -R a+r "$(DESTDIR)${datadir}/emacs/${version}" ${COPYDESTS} 610 -chmod -R a+r "$(DESTDIR)${datadir}/emacs/${version}" ${COPYDESTS}
610 611
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))