-;; 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)
- (condition-case nil
- (eq 0 (apply 'call-process
- (append (list diff-util nil nil nil option) files)))
- (error (format "Cannot execute program %S." diff-util)))
- )
-
-(defun ediff-diff-mandatory-option (diff-util)
- (let ((file (if (boundp 'null-device) null-device "/dev/null")))
- (cond ((not (memq system-type '(ms-dos windows-nt windows-95)))
- "")
- ((and (string= diff-util ediff-diff-program)
- (ediff-test-utility
- ediff-diff-program "--binary" (list file file)))
- "--binary ")
- ((and (string= diff-util ediff-diff3-program)
- (ediff-test-utility
- ediff-diff3-program "--binary" (list file file file)))
- "--binary ")
- (t ""))))
-
-
-;; must be before ediff-reset-diff-options to avoid compiler errors