summaryrefslogtreecommitdiff
path: root/lisp/ediff-diff.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/ediff-diff.el')
-rw-r--r--lisp/ediff-diff.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/ediff-diff.el b/lisp/ediff-diff.el
index fffd99a96ef..a12959eea12 100644
--- a/lisp/ediff-diff.el
+++ b/lisp/ediff-diff.el
@@ -59,6 +59,11 @@ to a shell that you are not using or, better, fix your shell's startup file."
:type 'string
:group 'ediff-diff)
+(defcustom ediff-cmp-program "cmp"
+ "*Utility to use to determine if two files are identical.
+It must return code 0, if its arguments are identical files."
+ :type 'string
+ :group 'ediff-diff)
(defcustom ediff-diff-program "diff"
"*Program to use for generating the differential of the two files."
@@ -1235,6 +1240,11 @@ argument to `skip-chars-forward'."
(funcall fwd-word-fun))
(point))))
+(defun ediff-same-file-contents (f1 f2)
+ "T if F1 and F2 have identical contents."
+ (let ((res (call-process ediff-cmp-program nil nil nil f1 f2)))
+ (and (numberp res) (eq res 0))))
+
;;; Local Variables:
;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)