aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2013-01-02 18:54:10 -0800
committerGlenn Morris2013-01-02 18:54:10 -0800
commit220740a35be2a87e7d3fdcf42fe710017d0d067a (patch)
tree564772c5db3a08e41bb0d03160100ad05f075d0a
parent75e78d1e904bde7eae13b78202f99081543701dc (diff)
downloademacs-220740a35be2a87e7d3fdcf42fe710017d0d067a.tar.gz
emacs-220740a35be2a87e7d3fdcf42fe710017d0d067a.zip
etags.el fix for compressed files
* lisp/progmodes/etags.el (tags-compression-info-list): Doc fix. (tag-find-file-of-tag-noselect): Check auto-compression-mode rather than 'jka-compr being loaded. Fixes: debbugs:13338
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/progmodes/etags.el11
2 files changed, 8 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 04ba7f802ca..34c13ad67fd 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
12013-01-03 Glenn Morris <rgm@gnu.org> 12013-01-03 Glenn Morris <rgm@gnu.org>
2 2
3 * progmodes/etags.el (tags-compression-info-list): Doc fix.
4 (tag-find-file-of-tag-noselect): Check auto-compression-mode
5 rather than 'jka-compr being loaded. (Bug#13338)
6
3 * subr.el (eval-after-load): Don't purecopy the form, so that it 7 * subr.el (eval-after-load): Don't purecopy the form, so that it
4 can be nconc'd later on; reverts 2009-11-11 change. (Bug#13331) 8 can be nconc'd later on; reverts 2009-11-11 change. (Bug#13331)
5 9
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index 3799fbc1e2d..dc16a2ce762 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -67,11 +67,8 @@ Use the `etags' program to make a tags table file."
67;;;###autoload 67;;;###autoload
68(defcustom tags-compression-info-list 68(defcustom tags-compression-info-list
69 (purecopy '("" ".Z" ".bz2" ".gz" ".xz" ".tgz")) 69 (purecopy '("" ".Z" ".bz2" ".gz" ".xz" ".tgz"))
70 "List of extensions tried by etags when jka-compr is used. 70 "List of extensions tried by etags when `auto-compression-mode' is on.
71An empty string means search the non-compressed file. 71An empty string means search the non-compressed file."
72These extensions will be tried only if jka-compr was activated
73\(i.e. via customize of `auto-compression-mode' or by calling the function
74`auto-compression-mode')."
75 :version "24.1" ; added xz 72 :version "24.1" ; added xz
76 :type '(repeat string) 73 :type '(repeat string)
77 :group 'etags) 74 :group 'etags)
@@ -1180,7 +1177,7 @@ error message."
1180 "Find the right line in the specified FILE." 1177 "Find the right line in the specified FILE."
1181 ;; If interested in compressed-files, search files with extensions. 1178 ;; If interested in compressed-files, search files with extensions.
1182 ;; Otherwise, search only the real file. 1179 ;; Otherwise, search only the real file.
1183 (let* ((buffer-search-extensions (if (featurep 'jka-compr) 1180 (let* ((buffer-search-extensions (if auto-compression-mode
1184 tags-compression-info-list 1181 tags-compression-info-list
1185 '(""))) 1182 '("")))
1186 the-buffer 1183 the-buffer
@@ -1204,7 +1201,7 @@ error message."
1204 (setq file-search-extensions (cdr file-search-extensions)) 1201 (setq file-search-extensions (cdr file-search-extensions))
1205 (setq the-buffer (find-file-noselect (concat file (car file-search-extensions)))))) 1202 (setq the-buffer (find-file-noselect (concat file (car file-search-extensions))))))
1206 (if (not the-buffer) 1203 (if (not the-buffer)
1207 (if (featurep 'jka-compr) 1204 (if auto-compression-mode
1208 (error "File %s (with or without extensions %s) not found" file tags-compression-info-list) 1205 (error "File %s (with or without extensions %s) not found" file tags-compression-info-list)
1209 (error "File %s not found" file)) 1206 (error "File %s not found" file))
1210 (set-buffer the-buffer)))) 1207 (set-buffer the-buffer))))