From: Stefan Monnier Date: Fri, 6 Oct 2000 16:07:31 +0000 (+0000) Subject: (smerge-diff): Setup the buffer's default-directory X-Git-Tag: emacs-pretest-21.0.90~1100 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d73aed133bcd95d74d7e166b1bb5531328d607e2;p=emacs.git (smerge-diff): Setup the buffer's default-directory and add filename to the names so that diff-mode can jump to source. --- diff --git a/lisp/smerge-mode.el b/lisp/smerge-mode.el index 09c6c45abed..9805286ac29 100644 --- a/lisp/smerge-mode.el +++ b/lisp/smerge-mode.el @@ -4,7 +4,7 @@ ;; Author: Stefan Monnier ;; 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 @@ The point is moved to the end of the conflict." (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 @@ The point is moved to the end of the conflict." ;;; 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. ;;