Ben Sturmfels

Auto-starting s-merge mode with Git

Ben Sturmfels at

I love that Emacs starts smerge-mode to highlight merge conflicts in a Bazaar controlled file. Defining the following function does the same for git controlled files:

(defun vc-git-find-file-hook ()
  (when (save-excursion
      (goto-char (point-min))
      (re-search-forward "^<<<<<<< " nil t))
    (smerge-start-session)))

Stephen Compall, Christopher Allan Webber likes this.