From: Mark Wooding Date: Wed, 20 Sep 2017 15:07:23 +0000 (+0100) Subject: el/dot-emacs.el: Turn on `smerge-mode' if we see conflict markers. X-Git-Url: https://git.distorted.org.uk/~mdw/profile/commitdiff_plain/5d824e2fc0f7bb18c222539ce4cb2785c5a66d9e el/dot-emacs.el: Turn on `smerge-mode' if we see conflict markers. This seems like generally a good thing. --- diff --git a/el/dot-emacs.el b/el/dot-emacs.el index c6c038c..c46143c 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -3979,6 +3979,13 @@ there is sadness." (propertize (number-to-string n) 'face (if (> n 0) 'bold 'shadow)))))) +(defun mdw-try-smerge () + (save-excursion + (goto-char (point-min)) + (when (re-search-forward "^<<<<<<< " nil t) + (smerge-mode 1)))) +(add-hook 'find-file-hook 'mdw-try-smerge t) + ;;;-------------------------------------------------------------------------- ;;; MPC configuration.