]> code.delx.au - gnu-emacs/blobdiff - lisp/diff.el
Fix last change to custom-push-theme.
[gnu-emacs] / lisp / diff.el
index 231130db21224750b4cbef68efd98f9eae5d743d..7602ecb0e378bfb531d58cb3ca12af0c35f05afd 100644 (file)
@@ -1,6 +1,7 @@
 ;;; diff.el --- run `diff' in compilation-mode
 
-;; Copyright (C) 1992, 1994, 1996, 2001, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 1994, 1996, 2001, 2002, 2003, 2004,
+;;   2005 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: unix, tools
@@ -19,8 +20,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -36,7 +37,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 +112,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 +127,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