changeset 32217:44f7f2635fec

(smerge-diff): Setup the buffer's default-directory and add filename to the names so that diff-mode can jump to source.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 06 Oct 2000 16:07:31 +0000
parents 82e4865603dd
children 65d06b88701d
files lisp/smerge-mode.el
diffstat 1 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/smerge-mode.el	Fri Oct 06 16:02:27 2000 +0000
+++ b/lisp/smerge-mode.el	Fri Oct 06 16:07:31 2000 +0000
@@ -4,7 +4,7 @@
 
 ;; Author: Stefan Monnier <monnier@cs.yale.edu>
 ;; Keywords: merge diff3 cvs conflict
-;; Revision: $Id: smerge-mode.el,v 1.5 2000/08/16 19:51:55 monnier Exp $
+;; Revision: $Id: smerge-mode.el,v 1.6 2000/10/05 06:05:51 miles Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -349,16 +349,21 @@
   (let ((name1 (aref smerge-match-names n1))
 	(name2 (aref smerge-match-names n2))
 	(file1 (make-temp-file "smerge1"))
-	(file2 (make-temp-file "smerge2")))
+	(file2 (make-temp-file "smerge2"))
+	(dir default-directory)
+	(file (file-relative-name buffer-file-name)))
     (write-region (match-beginning n1) (match-end n1) file1)
     (write-region (match-beginning n2) (match-end n2) file2)
     (unwind-protect
 	(with-current-buffer (get-buffer-create smerge-diff-buffer-name)
+	  (setq default-directory dir)
 	  (let ((inhibit-read-only t))
 	    (erase-buffer)
 	    (apply 'call-process diff-command nil t nil
 		   (append smerge-diff-switches
-			   (list "-L" name1 "-L" name2 file1 file2))))
+			   (list "-L" (concat name1 "/" file)
+				 "-L" (concat name2 "/" file)
+				 file1 file2))))
 	  (goto-char (point-min))
 	  (diff-mode)
 	  (display-buffer (current-buffer) t))
@@ -472,6 +477,10 @@
 
 ;;; Change Log:
 ;; $Log: smerge-mode.el,v $
+;; Revision 1.6  2000/10/05 06:05:51  miles
+;; (smerge-mine-face, smerge-other-face, smerge-base-face, smerge-markers-face):
+;;   Add dark-background variants.
+;;
 ;; Revision 1.5  2000/08/16 19:51:55  monnier
 ;; (smerge-mode-menu): Doc fix.
 ;;