是这个吗?
(save-restriction
(narrow-to-region (region-beginning) (region-end))
(deactivate-mark)
(goto-char (point-min))
(funcall fn c)
(while (< (point) (point-max))
(next-line)
(when (< (point) (point-max))
(funcall fn c))))