]> code.delx.au - gnu-emacs/blobdiff - lisp/diff.el
2004-05-08 John Wiegley <johnw@newartisans.com>
[gnu-emacs] / lisp / diff.el
index 231130db21224750b4cbef68efd98f9eae5d743d..c985b66036e605b9ea7e57a07520909543e27d97 100644 (file)
@@ -36,7 +36,7 @@
 
 ;;;###autoload
 (defcustom diff-switches "-c"
-  "*A string or list of strings specifying switches to be be passed to diff."
+  "*A string or list of strings specifying switches to be passed to diff."
   :type '(choice string (repeat string))
   :group 'diff)
 
@@ -111,6 +111,7 @@ With prefix arg, prompt for diff switches."
                       ,(shell-quote-argument (or new-alt new)))
                     " "))
         (buf (get-buffer-create "*Diff*"))
+        (thisdir default-directory)
         proc)
     (save-excursion
       (display-buffer buf)
@@ -125,6 +126,7 @@ With prefix arg, prompt for diff switches."
              (diff ',old ',new ',switches ',no-async)))
       (set (make-local-variable 'diff-old-temp-file) old-alt)
       (set (make-local-variable 'diff-new-temp-file) new-alt)
+      (setq default-directory thisdir)
       (insert command "\n")
       (if (and (not no-async) (fboundp 'start-process))
          (progn