From: Stefan Monnier Date: Fri, 4 Oct 2002 15:25:22 +0000 (+0000) Subject: (smerge-ediff): Add name-{mine,other,base} args. X-Git-Tag: ttn-vms-21-2-B4~12940 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=15092da1f12bee3c343ada5d9633b6ff4a38f73c;p=emacs.git (smerge-ediff): Add name-{mine,other,base} args. --- diff --git a/lisp/smerge-mode.el b/lisp/smerge-mode.el index 80b0d9945a9..47663a59c97 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.16 2002/08/15 00:24:56 monnier Exp $ +;; Revision: $Id: smerge-mode.el,v 1.17 2002/09/03 01:20:20 monnier Exp $ ;; This file is part of GNU Emacs. @@ -417,16 +417,20 @@ The point is moved to the end of the conflict." (defvar ediff-buffer-B) (defvar ediff-buffer-C) -(defun smerge-ediff () - "Invoke ediff to resolve the conflicts." +(defun smerge-ediff (&optional name-mine name-other name-base) + "Invoke ediff to resolve the conflicts. +NAME-MINE, NAME-OTHER, and NAME-BASE, if non-nil, are used for the +buffer names." (interactive) (let* ((buf (current-buffer)) (mode major-mode) ;;(ediff-default-variant 'default-B) (config (current-window-configuration)) (filename (file-name-nondirectory buffer-file-name)) - (mine (generate-new-buffer (concat "*" filename " MINE*"))) - (other (generate-new-buffer (concat "*" filename " OTHER*"))) + (mine (generate-new-buffer + (or name-mine (concat "*" filename " MINE*")))) + (other (generate-new-buffer + (or name-other (concat "*" filename " OTHER*")))) base) (with-current-buffer mine (buffer-disable-undo) @@ -450,7 +454,8 @@ The point is moved to the end of the conflict." (funcall mode)) (when base - (setq base (generate-new-buffer (concat "*" filename " BASE*"))) + (setq base (generate-new-buffer + (or name-base (concat "*" filename " BASE*")))) (with-current-buffer base (buffer-disable-undo) (insert-buffer-substring buf)