Next: Indentation, Previous: Editing Programs, Up: Editing Programs [Contents][Index]
Hemlock has commenting commands which can be used in almost any language. The behavior of these commands is determined by several Hemlock variables which language modes should define appropriately.
This is the most basic commenting command. If there is already a comment on the current line, then this moves the point to the start of the comment. If there no comment, this creates an empty one.
This command normally indents the comment to start at Comment Column. The comment indents differently in the following cases:
Although the rules about replication in the comment start are oriented toward Lisp commenting styles, you can exploit these properties in other languages.
When given a prefix argument, this command indents any existing comment on that many consecutive lines. This is useful for fixing up the indentation of a group of comments.
This commend ends the current comment and starts a new comment on a blank line, indenting the comment the same way that Indent for Comment does. When not in a comment, this command is the same as Indent New Line.
These commands are similar to Previous Line or Next Line followed by Indent for Comment. Any empty comment on the current line is deleted before moving to the new line.
This command kills any comment on the current line. When given a prefix argument, it kills comments on that many consecutive lines. Undo will restore the unmodified text.
This command sets the comment column to its prefix argument. If used without a prefix argument, it sets the comment column to the column the point is at.
These variables determine the behavior of the comment commands.
The string which indicates the start of a comment. If this is nil, then there is no defined comment syntax.
The string which ends a comment. If this is nil, then the comment is terminated by the end of the line.
The string inserted to begin a new comment.
The column that normal comments start at.
Next: Indentation, Previous: Editing Programs, Up: Editing Programs [Contents][Index]