Mercurial > emacs
diff lisp/smerge-mode.el @ 91059:12589730c028
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 901)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-273
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sat, 20 Oct 2007 02:30:26 +0000 |
parents | 4b09bb044f38 |
children | 4bc33ffdda1a |
line wrap: on
line diff
--- a/lisp/smerge-mode.el Sat Oct 20 02:22:59 2007 +0000 +++ b/lisp/smerge-mode.el Sat Oct 20 02:30:26 2007 +0000 @@ -79,6 +79,10 @@ :group 'smerge :type 'boolean) +(defcustom smerge-auto-refine t + "Automatically highlight changes in detail as the user visits conflicts." + :type 'boolean) + (defface smerge-mine '((((min-colors 88) (background light)) (:foreground "blue1")) @@ -252,7 +256,9 @@ ;;;; ;; Define smerge-next and smerge-prev -(easy-mmode-define-navigation smerge smerge-begin-re "conflict") +(easy-mmode-define-navigation smerge smerge-begin-re "conflict" nil nil + (if smerge-auto-refine + (condition-case nil (smerge-refine) (error nil)))) (defconst smerge-match-names ["conflict" "mine" "base" "other"]) @@ -433,6 +439,12 @@ (error "`smerge-batch-resolve' is to be used only with -batch")) (while command-line-args-left (let ((file (pop command-line-args-left))) + (if (string-match "\\.rej\\'" file) + ;; .rej files should never contain diff3 markers, on the other hand, + ;; in Arch, .rej files are sometimes used to indicate that the + ;; main file has diff3 markers. So you can pass **/*.rej and + ;; it will DTRT. + (setq file (substring file 0 (match-beginning 0)))) (message "Resolving conflicts in %s..." file) (when (file-readable-p file) (with-current-buffer (find-file-noselect file)