diff options
author | Konstantin Kharlamov <Hi-Angel@yandex.ru> | 2019-02-18 09:15:08 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2019-02-18 09:15:08 -0500 |
commit | 2eecaa28972320a1b8886ac8cde353c2a2f4aa44 (patch) | |
tree | 4a91a934d0a134a3868937b47debd8c900e58450 /lisp/vc/smerge-mode.el | |
parent | b05702d7eb803dbf536e4b589bb80838150559a3 (diff) | |
download | emacs-2eecaa28972320a1b8886ac8cde353c2a2f4aa44.tar.gz |
* lisp/vc/smerge-mode.el (smerge-vc-next-conflict): New command
Copyright-paperwork-exempt: yes
Diffstat (limited to 'lisp/vc/smerge-mode.el')
-rw-r--r-- | lisp/vc/smerge-mode.el | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el index 569797e18dd..ffca78ba8a3 100644 --- a/lisp/vc/smerge-mode.el +++ b/lisp/vc/smerge-mode.el @@ -1432,6 +1432,20 @@ If no conflict maker is found, turn off `smerge-mode'." (smerge-next)) (error (smerge-auto-leave)))) +(require 'vc) + +(defun smerge-vc-next-conflict () + "Tries to go to next conflict in current file, otherwise tries +to open next conflicted file version-control-system wise" + (interactive) + (let ((buffer (current-buffer))) + (when (not (smerge-goto-next-conflict)) + (vc-find-conflicted-file) + (if (eq buffer (current-buffer)) + (message "No conflicts found") + (goto-char 0) + (smerge-goto-next-conflict))))) + (provide 'smerge-mode) ;;; smerge-mode.el ends here |