]> git.eshelyaron.com Git - emacs.git/commitdiff
(diff): Use buffer-local vars diff-old-file and diff-new-file
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 5 May 2007 22:12:40 +0000 (22:12 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 5 May 2007 22:12:40 +0000 (22:12 +0000)
rather than storing their value in the revert-buffer function.

lisp/ChangeLog
lisp/diff.el

index 5bb3225f1aee40cff66502839e2eaafe3cf5f99a..a6680ef9afa72a909281e4f1d98053094e0aacc8 100644 (file)
@@ -1,3 +1,8 @@
+2007-05-05  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * diff.el (diff): Use buffer-local vars diff-old-file and diff-new-file
+       rather than storing their value in the revert-buffer function.
+
 2007-05-04  Nick Roberts  <nickrob@snap.net.nz>
 
        * t-mouse.el (t-mouse-mode): Do nothing on a graphical display
 
 2007-05-01  Davis Herring  <herring@lanl.gov>
 
-        * calendar/timeclock.el: Update version number.
-        (timeclock-modeline-display): Mention timeclock-use-display-time
-        in explanatory message.
-        (timeclock-in): Fix non-interactive workday specifications.
-        (timeclock-log): Don't kill the log buffer if it already existed.
-        Suppress warnings when finding the log.  Don't check for a nil
-        project twice.  Run hooks after killing the buffer (if
-        applicable).
-        (timeclock-geometric-mean): Rename to `timeclock-mean' (it never
-        was geometric).  All uses changed.
-        (timeclock-generate-report): Support prefix argument.
+       * calendar/timeclock.el: Update version number.
+       (timeclock-modeline-display): Mention timeclock-use-display-time
+       in explanatory message.
+       (timeclock-in): Fix non-interactive workday specifications.
+       (timeclock-log): Don't kill the log buffer if it already existed.
+       Suppress warnings when finding the log.  Don't check for a nil
+       project twice.  Run hooks after killing the buffer (if applicable).
+       (timeclock-geometric-mean): Rename to `timeclock-mean' (it never
+       was geometric).  All uses changed.
+       (timeclock-generate-report): Support prefix argument.
 
 2007-05-01  Romain Francoise  <romain@orebokech.com>
 
index 83de826bd03a8dfee1b518bb27457bf7f3e88e53..7149ef0d150e77aa1f99ce951a4d2d45b61ccd42 100644 (file)
@@ -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