home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / gnu / emacs / help / 4832 < prev    next >
Encoding:
Text File  |  1992-11-17  |  1.6 KB  |  40 lines

  1. Newsgroups: gnu.emacs.help
  2. Path: sparky!uunet!caen!hellgate.utah.edu!eeide
  3. From: eeide%asylum.cs.utah.edu@cs.utah.edu (Eric Eide)
  4. Subject: Re: fill-paragraph in TeX mode?
  5. Message-ID: <EEIDE.92Nov17141003@asylum.cs.utah.edu>
  6. In-reply-to: jdlb@mamane.ifa.hawaii.edu's message of 16 Nov 92 23:39:24 GMT
  7. Organization: University of Utah Department of Computer Science
  8. References: <1992Nov16.233924.4138@news.Hawaii.Edu>
  9. Distribution: usa
  10. Date: 17 Nov 92 14:10:03
  11. Lines: 27
  12.  
  13. JF Pitot de La Beaujardiere (jdlb@mamane.ifa.hawaii.edu) asks:
  14.  
  15. JF> The fill-paragraph command (M-q) in emacs has problems with TeX files, in
  16. JF> that it treats a backslash (\) at the start of a line as the start of a new
  17. JF> paragraph.  Is there a way to work around this, or does anyone have a
  18. JF> better fill-paragraph?
  19.  
  20. This is what I use:
  21.  
  22. (setq TeX-mode-hook
  23.       '(lambda ()
  24.         (setq paragraph-separate "^[ \t]*\\($\\|[\f%]\\|\\\\.*[]}][ \t]*$\\)")
  25.         ;; "^[ \t]*\\($\\|[\f%]\\|\\\\[^ \t\n]+[ \t]*$\\)" is a reasonable but
  26.         ;; somewhat inferior alternative.  The regular expression in GNU Emacs'
  27.         ;; "tex-mode.el" ("^[ \t]*$\\|^[\f\\\\%]") is not good to me.
  28.         )))
  29.  
  30. I also use Kyle Jones' "filladapt" package which provides enhanced paragraph
  31. filling.  For me, it is a *must have* package.  It's available via FTP in the
  32. Emacs Lisp archive at Ohio State.
  33.  
  34. Happy filling.
  35.  
  36. --
  37. -------------------------------------------------------------------------------
  38. Eric Eide          |          University of Utah Department of Computer Science
  39. eeide@cs.utah.edu  | Buddhist to hot dog vendor: "Make me one with everything."
  40.