summaryrefslogtreecommitdiff
path: root/lisp/diff.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2007-05-05 22:12:40 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2007-05-05 22:12:40 +0000
commitd4871b4f713899671cc3dc0fcece2faaaae8a317 (patch)
tree5929243fc87c5e5f217128f7759531504ce6119e /lisp/diff.el
parentbdd1961c05a52eddd5c58640f424864111d92c0f (diff)
downloademacs-d4871b4f713899671cc3dc0fcece2faaaae8a317.tar.gz
(diff): Use buffer-local vars diff-old-file and diff-new-file
rather than storing their value in the revert-buffer function.
Diffstat (limited to 'lisp/diff.el')
-rw-r--r--lisp/diff.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/diff.el b/lisp/diff.el
index 83de826bd03..7149ef0d150 100644
--- a/lisp/diff.el
+++ b/lisp/diff.el
@@ -124,9 +124,13 @@ With prefix arg, prompt for diff switches."
(erase-buffer))
(buffer-enable-undo (current-buffer))
(diff-mode)
+ ;; Use below 2 vars for backward-compatibility.
+ (set (make-local-variable 'diff-old-file) old)
+ (set (make-local-variable 'diff-new-file) new)
+ (set (make-local-variable 'diff-extra-args) (list switches no-async))
(set (make-local-variable 'revert-buffer-function)
- `(lambda (ignore-auto noconfirm)
- (diff ',old ',new ',switches ',no-async)))
+ (lambda (ignore-auto noconfirm)
+ (apply 'diff diff-old-file diff-new-file diff-extra-args)))
(set (make-local-variable 'diff-old-temp-file) old-alt)
(set (make-local-variable 'diff-new-temp-file) new-alt)
(setq default-directory thisdir)
@@ -186,5 +190,5 @@ With prefix arg, prompt for diff switches."
(provide 'diff)
-;;; arch-tag: 7de2c29b-7ea5-4b85-9b9d-72dd860de2bd
+;; arch-tag: 7de2c29b-7ea5-4b85-9b9d-72dd860de2bd
;;; diff.el ends here