Help me, please!
I write a fair bit of tcl mode with long embedded strings. In certain
circumstances, I've found that the tcl mode indenter starts treating
expressions as strings. I've narrowed it down to either a problem with
syntax tables, or tcl-omit-ws-regexp. I'm going to look into it
further, but if someone who knows this stuff better could take a quick
look and see anything obvious, I'd be grateful.
Here is an example:
if 1 {
set foo "bite
me [yeah]
"
Put that in a tcl-mode buffer, place your point after the second quote
and type M-C-a (tcl-beginning-of-defun). You'll note that the cursor
ends up on the 'm' of "me", where it should end up on the 'i' of
"if". If you get rid of the [] on the second line, it does the right
thing.
The problem seems to be coming from beginning-of-defun-raw, defined in
prim/lisp.el. It does a re-search-backward for defun-prompt-regexp
concatenated with "\\s(". It is finding the '[' in the second line of
the string, which I don't believe it should because it is in a
string. Seems like some problem with syntax table handling.
Any ideas?
-Jin