> > Where is the comment character defined for each programming mode? C-u C-h a > > didn't show me a variable name either. > > Jeff > > comment-start, comment-end, comment-add
These will, at best, show one type of comment. Languages often have several. There can be no definitive place to store such information. Some languages require an entire keyword whose position might be significant. For example ECHO THIS REM IS NOT A COMMENT. THIS ENTIRE STRING WILL PRINT. REM ECHO THIS ECHO COMMAND IS COMMENTED OUT BY A REM COMMAND Cobol has comments in a particular set of columns. No character actually marks the comment. Anything in those columns is simply ignored by the compiler. For many languages the syntax table often has them all however modes support comment syntax that can't be represented by the syntax table. In this case the mode designer has a couple options. The most common is probably to use font-lock-syntactic-keywords. Basically a function looks at the text and determines if any of it is comment and marks it by putting the comment start or comment fence syntax property on a particular character and the comment end (or another fence) on another. But there are other ways to handle comments depending on the goals of the mode writer. It's generally easier to detect comments in a mode than it is to generically create them. _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs