Hi Philip,
thanks for the comments. I'll look at wrapping anything approach when time permits...
Meanwhile, following your comment, I'd propose something like
--- cut here ---
(defun surround-region-or-point (before after &optional put-after)
"Insert `before' before mark or region,
`after' after mark or region and
put mark after `after' if `put-after' is not nil"
;; insert the first string before the mark or region-beginning
(if (use-region-p)
(with-restriction (region-beginning) (region-end)
;; Insert `before' before region
(goto-char (point-min))
(insert before)
(goto-char (point-max)))
(insert before))
;; Insert the second string after the point or mark
(if put-after
(insert after) ; put point after second string
(save-excursion (insert after)))) ; put point before second string
--- cut here ---
Wouldn't it serve a couple of scenarios?
Best, /PA