Path: utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!SPAM.ISTC.SRI.COM!wohler From: wohler@SPAM.ISTC.SRI.COM (Bill Wohler) Newsgroups: gnu.emacs.bug Subject: Re: `c-comment-edit' revisited Message-ID: <8901130049.AA04341@coco0.istc.sri.com> Date: 13 Jan 89 00:49:15 GMT References: <396@talos.UUCP> Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: SRI International, Menlo Park, CA Lines: 44 c-comment-edit is a command that copies a C comment into a temporary buffer for editing under a more suitable major mode (usually text-mode). i find it simpler to bind a key to the following: (defvar fill nil) (defun my-auto-fill-mode () "Toggles auto-fill-mode and performs other actions as necessary." (interactive) (make-variable-buffer-local 'fill) (setq fill (cond ((null fill) (auto-fill-mode 1) (set-fill-prefix)) (t (auto-fill-mode -1) (save-excursion (beginning-of-line) (set-fill-prefix)) nil))) (update-mode-line)) this toggles auto-fill mode and sets or cancels the fill prefix, thus you have to have the cursor in the right place before executing this. note that the default behavior of M-q is to convert: /* * stuff */ to /* stuff */ so i added the following to my c-mode-hook: (setq paragraph-separate (concat paragraph-separate "\\|^[ \t]*/\\*$")) enjoy! --bw