diff options
| author | Stefan Monnier | 2007-05-05 22:12:40 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-05-05 22:12:40 +0000 |
| commit | d4871b4f713899671cc3dc0fcece2faaaae8a317 (patch) | |
| tree | 5929243fc87c5e5f217128f7759531504ce6119e /lisp/diff.el | |
| parent | bdd1961c05a52eddd5c58640f424864111d92c0f (diff) | |
| download | emacs-d4871b4f713899671cc3dc0fcece2faaaae8a317.tar.gz emacs-d4871b4f713899671cc3dc0fcece2faaaae8a317.zip | |
(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.el | 10 |
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." | |||
| 124 | (erase-buffer)) | 124 | (erase-buffer)) |
| 125 | (buffer-enable-undo (current-buffer)) | 125 | (buffer-enable-undo (current-buffer)) |
| 126 | (diff-mode) | 126 | (diff-mode) |
| 127 | ;; Use below 2 vars for backward-compatibility. | ||
| 128 | (set (make-local-variable 'diff-old-file) old) | ||
| 129 | (set (make-local-variable 'diff-new-file) new) | ||
| 130 | (set (make-local-variable 'diff-extra-args) (list switches no-async)) | ||
| 127 | (set (make-local-variable 'revert-buffer-function) | 131 | (set (make-local-variable 'revert-buffer-function) |
| 128 | `(lambda (ignore-auto noconfirm) | 132 | (lambda (ignore-auto noconfirm) |
| 129 | (diff ',old ',new ',switches ',no-async))) | 133 | (apply 'diff diff-old-file diff-new-file diff-extra-args))) |
| 130 | (set (make-local-variable 'diff-old-temp-file) old-alt) | 134 | (set (make-local-variable 'diff-old-temp-file) old-alt) |
| 131 | (set (make-local-variable 'diff-new-temp-file) new-alt) | 135 | (set (make-local-variable 'diff-new-temp-file) new-alt) |
| 132 | (setq default-directory thisdir) | 136 | (setq default-directory thisdir) |
| @@ -186,5 +190,5 @@ With prefix arg, prompt for diff switches." | |||
| 186 | 190 | ||
| 187 | (provide 'diff) | 191 | (provide 'diff) |
| 188 | 192 | ||
| 189 | ;;; arch-tag: 7de2c29b-7ea5-4b85-9b9d-72dd860de2bd | 193 | ;; arch-tag: 7de2c29b-7ea5-4b85-9b9d-72dd860de2bd |
| 190 | ;;; diff.el ends here | 194 | ;;; diff.el ends here |