all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#7494: 24.0.50; Why is `prefix-region' in a library by itself?
@ 2010-11-26 22:48 Drew Adams
  2010-11-27  2:10 ` Leo
  2010-11-27  2:39 ` Stefan Monnier
  0 siblings, 2 replies; 11+ messages in thread
From: Drew Adams @ 2010-11-26 22:48 UTC (permalink / raw)
  To: 7494

(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?






^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-11-27 18:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-26 22:48 bug#7494: 24.0.50; Why is `prefix-region' in a library by itself? Drew Adams
2010-11-27  2:10 ` Leo
2010-11-27  2:18   ` Drew Adams
2010-11-27  2:39 ` Stefan Monnier
2010-11-27  3:00   ` Drew Adams
2010-11-27  8:09     ` Eli Zaretskii
2010-11-27 14:20       ` Stefan Monnier
2010-11-27 15:35         ` Eli Zaretskii
2010-11-27 16:11       ` Drew Adams
2010-11-27 18:30         ` Stefan Monnier
2010-11-27  6:50   ` Thierry Volpiatto

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.