home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / alt / lucidem / help / 802 < prev    next >
Encoding:
Text File  |  1992-12-14  |  991 b   |  31 lines

  1. x-gateway: rodan.UU.NET from help-lucid-emacs to alt.lucid-emacs.help; Mon, 14 Dec 1992 15:30:41 EST
  2. Return-Path: <guttman@linus.mitre.org>
  3. Posted-Date: Mon, 14 Dec 92 15:30:21 -0500
  4. Date: Mon, 14 Dec 1992 15:30:21 -0500
  5. From: guttman@linus.mitre.org
  6. Message-ID: <9212142030.AA02572@circe.mitre.org>
  7. Subject: Re: Filling commented paragraphs
  8. X-Postal-Address: MITRE, Mail Stop A156 \\ 202 Burlington Rd. \\ Bedford, MA 01730
  9. Newsgroups: alt.lucid-emacs.help
  10. Path: sparky!uunet!wendy-fate.uu.net!help-lucid-emacs
  11. Sender: help-lucid-emacs-request@lucid.com
  12. Lines: 17
  13.  
  14. I use the procedure enclosed, bound to the key M-C-g.
  15.  
  16.     Josh
  17.  
  18. (defun fill-commented-paragraph ()
  19.    "Fill current paragraph ignoring comment-chars and whitespace."
  20.    (interactive)
  21.    (save-excursion
  22.      (beginning-of-line)   
  23.      (let* ((line-start (point))
  24.         (fill-prefix
  25.           (progn
  26.         (while (looking-at "\\s<\\|\\s ")
  27.           (forward-char 1))
  28.         (buffer-substring line-start (point)))))
  29.       (fill-paragraph nil))))
  30.  
  31.