Actually jde-gen's default "cflow" templates are comment/quote aware.
That is, the tempo-templates include a hook that expands the abbrev
with a control flow template everywhere except when point is inside
of a comment or a double quoted string.

The problem is that the tempo-templates are activated by abbrev-mode,
which is not case sensitive and which doesn't make the text that
triggered the abbrev expansion available to the expander of that text.

There's also no mecahnism through which a template can say "oh wait,
cancel the expansion and leave the text unmolested."

So, abbrev-mode expands abbrevs without regard to case, and the
jde cflow templates are forced to choose one case or the other to
use in contexts (quotes and strings) when the full expansion is not
appropriate.

In sum, this is a minor annoyance, but I'm sure you'll agree that it's
much better than getting if () { } inserted when you're trying to compose
a comment (which is what earlier versions of the templates did before I
added the quote-or-string hook).

Eric

In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] writes:
: 
: Hi,
: 
: Is it possible to suppress abbreviation mode for comments?  For example, if
: I want to start a sentence in my comment with the word "If", abbreviation
: mode always kicks in and changes it to lowercase "if", thinking that I am
: entering a java keyword.  I can of course Type "If" C-q SPC every time, but
: considering that most often in a comment I one is not typing code, but
: comments, it would be nice if abbreviation was disabled for this.  I suppose
: if you wanted to be really fancy abbreviation mode could ignore everything
: except text inside <code></code> blocks.
: 
: Ian
: 
: .
: 

Reply via email to