Function: majutsu-conflict--refine-snapshots
majutsu-conflict--refine-snapshots is a natively compiled function
defined in majutsu-conflict.el.
Signature
(majutsu-conflict--refine-snapshots)
Documentation
Add word-level refinement to JJ snapshot-style conflicts.
Compares each ------- section with the following +++++++ section.
Source Code
;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-conflict.el
(defun majutsu-conflict--refine-snapshots ()
"Add word-level refinement to JJ snapshot-style conflicts.
Compares each ------- section with the following +++++++ section."
(dolist (conflict (majutsu-conflict-parse-buffer))
(when (eq (majutsu-conflict-style conflict) 'jj-snapshot)
(save-excursion
(let ((end (majutsu-conflict-end-pos conflict))
(marker-len (majutsu-conflict-marker-len conflict)))
(goto-char (majutsu-conflict-begin-pos conflict))
(forward-line 1)
(while (< (point) end)
(if (eq (car-safe (majutsu-conflict--line-marker-at-point marker-len))
'remove)
(progn
(forward-line 1)
(let ((remove-start (point)))
(while (and (< (point) end)
(not (majutsu-conflict--line-marker-at-point marker-len)))
(forward-line 1))
(let ((remove-end (point)))
(when (and (< (point) end)
(eq (car-safe (majutsu-conflict--line-marker-at-point marker-len))
'add))
(forward-line 1)
(let ((add-start (point)))
(while (and (< (point) end)
(not (majutsu-conflict--line-marker-at-point marker-len)))
(forward-line 1))
(let ((add-end (point)))
(when (and (< remove-start remove-end)
(< add-start add-end))
(majutsu-conflict--refine-pair
remove-start remove-end add-start add-end))))))))
(forward-line 1))))))))