comparison lisp/files.el @ 863:42375619fa45

[xemacs-hg @ 2002-06-04 06:03:59 by andyp] merge 21.4 windows changes, minimally tested
author andyp
date Tue, 04 Jun 2002 06:05:53 +0000
parents e7ee5f8bde58
children 5df795348f45
comparison
equal deleted inserted replaced
862:278c743f1578 863:42375619fa45
2987 (funcall revert-buffer-insert-file-contents-function 2987 (funcall revert-buffer-insert-file-contents-function
2988 file-name nil) 2988 file-name nil)
2989 (if (not (file-exists-p file-name)) 2989 (if (not (file-exists-p file-name))
2990 (error "File %s no longer exists!" file-name)) 2990 (error "File %s no longer exists!" file-name))
2991 (widen) 2991 (widen)
2992 (insert-file-contents file-name t nil nil t) 2992 (insert-file-contents file-name nil nil nil t)
2993 (setq bmin (point-min) 2993 (setq bmin (point-min)
2994 bmax (point-max)))))) 2994 bmax (point-max))))))
2995 (if (not (and (eq bmin (point-min)) 2995 (if (not (and (eq bmin (point-min))
2996 (eq bmax (point-max)) 2996 (eq bmax (point-max))
2997 (eq (compare-buffer-substrings 2997 (eq (compare-buffer-substrings
2998 newbuf bmin bmax (current-buffer) bmin bmax) 0))) 2998 newbuf bmin bmax (current-buffer) bmin bmax) 0)))
2999 newbuf 2999 newbuf
3000 nil))) 3000 (and (kill-buffer newbuf) nil))))
3001 3001
3002 (defvar recover-file-diff-program "diff" 3002 (defvar recover-file-diff-program "diff"
3003 "Absolute or relative name of the `diff' program used by `recover-file'.") 3003 "Absolute or relative name of the `diff' program used by `recover-file'.")
3004 (defvar recover-file-diff-arguments '("-c") 3004 (defvar recover-file-diff-arguments '("-c")
3005 "List of arguments (switches) to pass to `diff' by `recover-file'.") 3005 "List of arguments (switches) to pass to `diff' by `recover-file'.")