[CMake] *Patch* fill-paragraph command in emacs for comments using cmake-mode.el

James Bigler bigler at cs.utah.edu
Thu Aug 2 13:56:16 EDT 2007


I think there is something missing from the patch.  It doesn't change the 
behavior at all.  I'm assuming this is due to the functions not being registered 
as the default fill functions.

When I tried to run cmake-fill-comment-paragraph explicitly on a long comment 
line, it got stuck in what appears is an infinite loop.

One of the other things I've toyed with is modifying paragraph-start.

(defun cmake-mode ()
    ...
    (setq paragraph-start "^\f\\|IF\\|$")

)

The IF in there is a CMake keyword.  I think there is probably a more elegant 
way to check for a newline or something that would prevent you from pulling in 
other text.

This does a good job of justifying all the text without pulling in the trailing 
IF(MYVAR), but it doesn't start subsequent lines with #'s until I manually add 
one to the second line.  Then it behaves properly.

James


More information about the CMake mailing list