|
From: | Drew Adams |
Subject: | bug#7494: 24.0.50; Why is `prefix-region' in a library by itself? |
Date: | Fri, 26 Nov 2010 14:48:50 -0800 |
(defun prefix-region (prefix) "Insert PREFIX at the beginning of each line between mark and point." (interactive "sPrefix string: ") (let ((end (region-end))) (save-excursion (goto-char (region-beginning)) (beginning-of-line) (save-restriction (narrow-to-region (point) end) (while (not (eobp)) (insert prefix) (forward-line 1)))))) (provide 'prefix-region) What's that about?
[Prev in Thread] | Current Thread | [Next in Thread] |