diff options
| author | Glenn Morris | 2012-11-28 00:37:38 -0800 |
|---|---|---|
| committer | Glenn Morris | 2012-11-28 00:37:38 -0800 |
| commit | 6247eff516ed92bf207867a32980cbba02854fa1 (patch) | |
| tree | e87c89a034ad9088919f0f1b58ce3c87e8f2ff1e | |
| parent | 8ecba97da2e4bbc8b0ca319de44689ce63dac967 (diff) | |
| download | emacs-6247eff516ed92bf207867a32980cbba02854fa1.tar.gz emacs-6247eff516ed92bf207867a32980cbba02854fa1.zip | |
Fix for jka-compr-compression-info-list not including version extension
* lisp/jka-cmpr-hook.el (jka-compr-get-compression-info):
Remove any version extension before checking filename.
(jka-compr-compression-info-list): Belated :version bump.
Fixes: debbugs:13006
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/jka-cmpr-hook.el | 15 |
2 files changed, 8 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a48ac37883f..735798e3f3e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-11-28 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * jka-cmpr-hook.el (jka-compr-get-compression-info): | ||
| 4 | Remove any version extension before checking filename. (Bug#13006) | ||
| 5 | (jka-compr-compression-info-list): Belated :version bump. | ||
| 6 | |||
| 1 | 2012-11-28 Chong Yidong <cyd@gnu.org> | 7 | 2012-11-28 Chong Yidong <cyd@gnu.org> |
| 2 | 8 | ||
| 3 | * simple.el (transient-mark-mode): Doc fix (Bug#11523). | 9 | * simple.el (transient-mark-mode): Doc fix (Bug#11523). |
diff --git a/lisp/jka-cmpr-hook.el b/lisp/jka-cmpr-hook.el index e4743ada045..75d1bbbad6b 100644 --- a/lisp/jka-cmpr-hook.el +++ b/lisp/jka-cmpr-hook.el | |||
| @@ -109,6 +109,7 @@ Otherwise, it is nil.") | |||
| 109 | "Return information about the compression scheme of FILENAME. | 109 | "Return information about the compression scheme of FILENAME. |
| 110 | The determination as to which compression scheme, if any, to use is | 110 | The determination as to which compression scheme, if any, to use is |
| 111 | based on the filename itself and `jka-compr-compression-info-list'." | 111 | based on the filename itself and `jka-compr-compression-info-list'." |
| 112 | (setq filename (file-name-sans-versions filename)) | ||
| 112 | (catch 'compression-info | 113 | (catch 'compression-info |
| 113 | (let ((case-fold-search nil)) | 114 | (let ((case-fold-search nil)) |
| 114 | (dolist (x jka-compr-compression-info-list) | 115 | (dolist (x jka-compr-compression-info-list) |
| @@ -191,19 +192,6 @@ options through Custom does this automatically." | |||
| 191 | 192 | ||
| 192 | ;; I have this defined so that .Z files are assumed to be in unix | 193 | ;; I have this defined so that .Z files are assumed to be in unix |
| 193 | ;; compress format; and .gz files, in gzip format, and .bz2 files in bzip fmt. | 194 | ;; compress format; and .gz files, in gzip format, and .bz2 files in bzip fmt. |
| 194 | |||
| 195 | ;; FIXME? It seems ugly that one has to add "\\(~\\|\\.~[0-9]+~\\)?" to | ||
| 196 | ;; all the regexps here, in order to match backup files etc. | ||
| 197 | ;; It's trivial to modify jka-compr-get-compression-info to match | ||
| 198 | ;; regexps against file-name-sans-versions, but this regexp is also | ||
| 199 | ;; used to build a file-name-handler-alist entry. | ||
| 200 | ;; find-file-name-handler does not use file-name-sans-versions. | ||
| 201 | ;; Perhaps it should, | ||
| 202 | ;; http://lists.gnu.org/archive/html/emacs-devel/2008-02/msg00812.html, | ||
| 203 | ;; but it's used all over the place and there are probably other ramifications. | ||
| 204 | ;; One could modify jka-compr-build-file-regexp to add the backup regexp, | ||
| 205 | ;; but jka-compr-compression-info-list is a defcustom to which | ||
| 206 | ;; anything could be added, so it's easiest to leave things as they are. | ||
| 207 | (defcustom jka-compr-compression-info-list | 195 | (defcustom jka-compr-compression-info-list |
| 208 | ;;[regexp | 196 | ;;[regexp |
| 209 | ;; compr-message compr-prog compr-args | 197 | ;; compr-message compr-prog compr-args |
| @@ -310,6 +298,7 @@ variables. Setting this through Custom does that automatically." | |||
| 310 | (boolean :tag "Strip Extension") | 298 | (boolean :tag "Strip Extension") |
| 311 | (string :tag "Magic Bytes"))) | 299 | (string :tag "Magic Bytes"))) |
| 312 | :set 'jka-compr-set | 300 | :set 'jka-compr-set |
| 301 | :version "24.1" ; removed version extension piece | ||
| 313 | :group 'jka-compr) | 302 | :group 'jka-compr) |
| 314 | 303 | ||
| 315 | (defcustom jka-compr-mode-alist-additions | 304 | (defcustom jka-compr-mode-alist-additions |