Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!bard From: bard@brigid.cs.cornell.edu (Bard Bloom) Newsgroups: comp.emacs Subject: Re: insert char. in first column. Message-ID: <37936@cornell.UUCP> Date: 1 Mar 90 03:54:08 GMT References: <13714@fs2.NISC.SRI.COM> Sender: nobody@cornell.UUCP Reply-To: bard@cs.cornell.edu (Bard Bloom) Organization: Cornell Univ. CS Dept, Ithaca NY Lines: 25 My own "Insert stuff in left margin". The stuff it inserts is sticky. -- Bard the emacs gargoyle (defvar inleft-string "> " "Default string for inleft.") (defun inleft (p m s) "In the region BEG to END, inserts STRING at the beginning of each line." (interactive (list (if (< (point) (mark)) (point-marker) (mark-marker)) (if (< (point) (mark)) (mark-marker) (point-marker)) (progn (setq inleft-string (read-string "Inleft String:" inleft-string)) inleft-string) )) (goto-char p) (beginning-of-line 1) (while (and (<= (point-marker) m) (not (eobp))) (insert-before-markers s) (next-line 1) (beginning-of-line 1)))