Mercurial > emacs
diff lisp/diff.el @ 80857:b8d11546ac61
(diff): Use buffer-local vars diff-old-file and diff-new-file
rather than storing their value in the revert-buffer function.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sat, 05 May 2007 22:12:40 +0000 |
parents | e3694f1cb928 |
children | b98604865ea0 d7172f202ab8 |
line wrap: on
line diff
--- a/lisp/diff.el Sat May 05 00:36:21 2007 +0000 +++ b/lisp/diff.el Sat May 05 22:12:40 2007 +0000 @@ -124,9 +124,13 @@ (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 @@ (provide 'diff) -;;; arch-tag: 7de2c29b-7ea5-4b85-9b9d-72dd860de2bd +;; arch-tag: 7de2c29b-7ea5-4b85-9b9d-72dd860de2bd ;;; diff.el ends here