mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-23 07:19:15 +00:00
(smerge-ediff): Add name-{mine,other,base} args.
This commit is contained in:
parent
e989b9bcaf
commit
15092da1f1
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
;; Author: Stefan Monnier <monnier@cs.yale.edu>
|
;; Author: Stefan Monnier <monnier@cs.yale.edu>
|
||||||
;; Keywords: merge diff3 cvs conflict
|
;; 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.
|
;; 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-B)
|
||||||
(defvar ediff-buffer-C)
|
(defvar ediff-buffer-C)
|
||||||
|
|
||||||
(defun smerge-ediff ()
|
(defun smerge-ediff (&optional name-mine name-other name-base)
|
||||||
"Invoke ediff to resolve the conflicts."
|
"Invoke ediff to resolve the conflicts.
|
||||||
|
NAME-MINE, NAME-OTHER, and NAME-BASE, if non-nil, are used for the
|
||||||
|
buffer names."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let* ((buf (current-buffer))
|
(let* ((buf (current-buffer))
|
||||||
(mode major-mode)
|
(mode major-mode)
|
||||||
;;(ediff-default-variant 'default-B)
|
;;(ediff-default-variant 'default-B)
|
||||||
(config (current-window-configuration))
|
(config (current-window-configuration))
|
||||||
(filename (file-name-nondirectory buffer-file-name))
|
(filename (file-name-nondirectory buffer-file-name))
|
||||||
(mine (generate-new-buffer (concat "*" filename " MINE*")))
|
(mine (generate-new-buffer
|
||||||
(other (generate-new-buffer (concat "*" filename " OTHER*")))
|
(or name-mine (concat "*" filename " MINE*"))))
|
||||||
|
(other (generate-new-buffer
|
||||||
|
(or name-other (concat "*" filename " OTHER*"))))
|
||||||
base)
|
base)
|
||||||
(with-current-buffer mine
|
(with-current-buffer mine
|
||||||
(buffer-disable-undo)
|
(buffer-disable-undo)
|
||||||
@ -450,7 +454,8 @@ The point is moved to the end of the conflict."
|
|||||||
(funcall mode))
|
(funcall mode))
|
||||||
|
|
||||||
(when base
|
(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
|
(with-current-buffer base
|
||||||
(buffer-disable-undo)
|
(buffer-disable-undo)
|
||||||
(insert-buffer-substring buf)
|
(insert-buffer-substring buf)
|
||||||
|
Loading…
Reference in New Issue
Block a user