# HG changeset patch # User Richard M. Stallman # Date 1119708861 0 # Node ID e6ea4d9f64f3920e0a8a371e519eec64126d64f4 # Parent d30261824cd5127e4ada19980da37c6ddd608c7f (jka-compr-insert-file-contents): Special handling if cannot find the uncompression program. diff -r d30261824cd5 -r e6ea4d9f64f3 lisp/jka-compr.el --- a/lisp/jka-compr.el Sat Jun 25 14:12:45 2005 +0000 +++ b/lisp/jka-compr.el Sat Jun 25 14:14:21 2005 +0000 @@ -474,6 +474,9 @@ (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 @@ (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