Forum OpenACS Q&A: New emacs doesn't handle strings in Tcl well

In upgrading my dev computer to Redhat 8, I also ended up with a newer version of emacs. This version (21.2), seems to handle strings differently in Tcl.

If you type


if {1 = 1} {
   set my_query "
(hit tab here)SELECT

When you hit tab, it won't indent. Has anybody encountered this? How would I go about fixing it? It's extremely annoying!
Collapse
Posted by Bart Teeuwisse on
Jade,

as far as I know this is not a new 'feature' of emacs 21.2. The culprit is the " after 'set my_query". Having opened a string emacs will not indent the next line as that TAB would introduce a tab character in the string. If that is what you want you should type C-q TAB.

If it doesn't matter if there is a tab in the string, as is the case for SQL queries you could use { instead of ". Emacs then indents as you expected.

/Bart