Function: smerge-resolve--extract-comment

smerge-resolve--extract-comment is a byte-compiled function defined in smerge-mode.el.gz.

Signature

(smerge-resolve--extract-comment BEG END)

Documentation

Extract the text within the comments that span BEG..END.

Source Code

;; Defined in /usr/src/emacs/lisp/vc/smerge-mode.el.gz
(defun smerge-resolve--extract-comment (beg end)
  "Extract the text within the comments that span BEG..END."
  (save-excursion
    (let ((comments ())
          combeg)
      (goto-char beg)
      (while (and (< (point) end)
                  (setq combeg (comment-search-forward end t)))
        (let ((beg (point)))
          (goto-char combeg)
          (comment-forward 1)
          (save-excursion
            (comment-enter-backward)
            (push " " comments)
            (push (buffer-substring-no-properties beg (point)) comments))))
      (push " " comments)
      (with-temp-buffer
        (apply #'insert (nreverse comments))
        (goto-char (point-min))
        (while (re-search-forward smerge-resolve--normalize-re
                                  nil t)
          (replace-match " "))
        (buffer-string)))))