wohler@SPAM.ISTC.SRI.COM (Bill Wohler) (01/13/89)
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