From 79f28143bee6cd16182441e69d9b2ba5a4cdd664 Mon Sep 17 00:00:00 2001 From: Jesper Harder Date: Tue, 6 Jun 2006 18:45:21 +0000 Subject: [PATCH] (ediff-diff-mandatory-option): Protect against file-error. --- lisp/ChangeLog | 5 +++++ lisp/ediff-diff.el | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2aedcbc3280..23c99963e35 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-06-06 Jesper Harder + + * ediff-diff.el (ediff-test-utility): Protect against + file-error. + 2006-06-06 Chong Yidong * diff-mode.el (diff-mode): Set buffer-read-only to t when diff --git a/lisp/ediff-diff.el b/lisp/ediff-diff.el index 57456367522..7746954292d 100644 --- a/lisp/ediff-diff.el +++ b/lisp/ediff-diff.el @@ -65,8 +65,10 @@ Must produce output compatible with Unix's diff3 program." ;; The following functions needed for setting diff/diff3 options ;; test if diff supports the --binary option (defsubst ediff-test-utility (diff-util option &optional files) - (eq 0 (apply 'call-process - (append (list diff-util nil nil nil option) files)))) + (condition-case () + (eq 0 (apply 'call-process + (append (list diff-util nil nil nil option) files))) + (file-error nil))) (defun ediff-diff-mandatory-option (diff-util) (let ((file (if (boundp 'null-device) null-device "/dev/null"))) -- 2.39.5