Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!nrl-cmf!cmcl2!rutgers!mtune!mtgzz!drutx!jimb From: jimb@drutx.ATT.COM (jim bryant) Newsgroups: comp.emacs Subject: GNU 18.49 elisp question Message-ID: <6878@drutx.ATT.COM> Date: 2 Mar 88 23:48:39 GMT Organization: at&t denver Lines: 28 i'm trying to write a simple function that will set "fill-prefix" before calling "fill-region". for example # this is the comment block # that i would like to fill # it probably would fit on 2 lines how do i set "fill-prefix" to be the string between the beginning of the line and the first non-whitespace character? here's my function: (defun fill-unix-comment-block () (interactive) (save-excursion (beginning-of-line) (if (looking-at "#") (progn (skip-chars-forward " \t") (setq fill-prefix ???????what?????????) (fill-paragraph) (setq fill-prefix nil)) (fill-paragraph)))) thanks! jim bryant ihnp4!drutx!jimb