summaryrefslogtreecommitdiff
path: root/lisp/jka-compr.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2005-06-25 14:14:21 +0000
committerRichard M. Stallman <rms@gnu.org>2005-06-25 14:14:21 +0000
commit1de280979d95db42b821d655ff0c8bb1753b6032 (patch)
tree5b2c96c92bb0c0801475f49acb7c4b43adc5ab90 /lisp/jka-compr.el
parent1ea8590d28d27f9fa391eb75a6bc8ace091d0e51 (diff)
downloademacs-1de280979d95db42b821d655ff0c8bb1753b6032.tar.gz
(jka-compr-insert-file-contents):
Special handling if cannot find the uncompression program.
Diffstat (limited to 'lisp/jka-compr.el')
-rw-r--r--lisp/jka-compr.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el
index ca5e158349d..f282957512c 100644
--- a/lisp/jka-compr.el
+++ b/lisp/jka-compr.el
@@ -474,6 +474,9 @@ There should be no more than seven characters after the final `/'."
(delete-region (point) (point-max)))
(goto-char start))
(error
+ ;; If the file we wanted to uncompress does not exist,
+ ;; handle that according to VISIT as `insert-file-contents'
+ ;; would, maybe signaling the same error it normally would.
(if (and (eq (car error-code) 'file-error)
(eq (nth 3 error-code) local-file))
(if visit
@@ -481,6 +484,13 @@ There should be no more than seven characters after the final `/'."
(signal 'file-error
(cons "Opening input file"
(nthcdr 2 error-code))))
+ ;; If the uncompression program can't be found,
+ ;; signal that as a non-file error
+ ;; so that find-file-noselect-1 won't handle it.
+ (if (and (eq (car error-code) 'file-error)
+ (equal (cadr error-code) "Searching for program"))
+ (error "Uncompression program `%s' not found"
+ (nth 3 error-code)))
(signal (car error-code) (cdr error-code))))))
(and