Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!elroy.jpl.nasa.gov!sdd.hp.com!wuarchive!uunet!mcsun!hp4nl!kubix!kub.nl!horck From: horck@kub.nl (Arthur van Horck) Newsgroups: comp.text.tex Subject: Re: emacs tex-mode.el (was Re: xdvi in emacs ... (and much more)) Message-ID: <1991May24.135734.14217@kub.nl> Date: 24 May 91 13:57:34 GMT References: <1991May16.152416.17303@unibi.uni-bielefeld.de> <16491@helios.TAMU.EDU> Reply-To: horck@kub.nl Organization: KUB, The Netherlands Lines: 31 In article <16491@helios.TAMU.EDU>, jdm5548@tamsun.tamu.edu (James Darrell McCauley) writes: |> Perhaps some of you lispers and TeXies could add a function to |> tex-mode.el: TeX-comment-region (and possibly TeX-uncomment-region) |> so that it would insert %'s. Why not use plain old highlight-region.el? -------------------------------------------------------- (defun highlight-region (string) "Inserts STRING at the beginning of every line in the region." (interactive "sString to insert: ") (save-excursion (if (bolp) (forward-line -1)) (save-restriction (narrow-to-region (point) (mark)) (goto-char (point-min)) (replace-regexp "^" string)))) -------------------------------------------------------- I fear I've deleted the name of the author/poster; I use it all the time... It was posted to comp.emacs.sources some time ago. Hope this helps, Arthur -- ***--*--*---------------------- Arthur van Horck ----------------------------+ ** * * KUB-University Tilburg, the Netherlands Phone: (+31) 13 662232| * * * horck@kub.nl - kubvx1::horck - ...!hp4nl!kubix!horck| +-*--*-----------------------------SPIN\SMCT---------------------------------+