aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2005-06-25 14:14:21 +0000
committerRichard M. Stallman2005-06-25 14:14:21 +0000
commit7bbae30c23e8fc44bc3202c5e30ac593baca659b (patch)
treea01e6167f9342b39f3c2754099600d16156667bb
parent1265f1776f7b1ebda1109d808b5d679488817434 (diff)
downloademacs-7bbae30c23e8fc44bc3202c5e30ac593baca659b.tar.gz
emacs-7bbae30c23e8fc44bc3202c5e30ac593baca659b.zip
(jka-compr-insert-file-contents):
Special handling if cannot find the uncompression program.
-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 `/'."
474 (delete-region (point) (point-max))) 474 (delete-region (point) (point-max)))
475 (goto-char start)) 475 (goto-char start))
476 (error 476 (error
477 ;; If the file we wanted to uncompress does not exist,
478 ;; handle that according to VISIT as `insert-file-contents'
479 ;; would, maybe signaling the same error it normally would.
477 (if (and (eq (car error-code) 'file-error) 480 (if (and (eq (car error-code) 'file-error)
478 (eq (nth 3 error-code) local-file)) 481 (eq (nth 3 error-code) local-file))
479 (if visit 482 (if visit
@@ -481,6 +484,13 @@ There should be no more than seven characters after the final `/'."
481 (signal 'file-error 484 (signal 'file-error
482 (cons "Opening input file" 485 (cons "Opening input file"
483 (nthcdr 2 error-code)))) 486 (nthcdr 2 error-code))))
487 ;; If the uncompression program can't be found,
488 ;; signal that as a non-file error
489 ;; so that find-file-noselect-1 won't handle it.
490 (if (and (eq (car error-code) 'file-error)
491 (equal (cadr error-code) "Searching for program"))
492 (error "Uncompression program `%s' not found"
493 (nth 3 error-code)))
484 (signal (car error-code) (cdr error-code)))))) 494 (signal (car error-code) (cdr error-code))))))
485 495
486 (and 496 (and