Subject: bug#32035: 27.0.50; master; tcl-mode indentation broken in namespaces

From: Tom Tromey <[email-masked]>
Date: Mon, 02 Jul 2018 14:48:07 -0600

>>>>> "GM" == Glenn Morris <[email-masked]> writes:

GM> Explicitly cc'ing the author of the cited commit.

Thanks.

>> With a file in tcl-mode (foo.tcl, say), I enter
>> 
>> namespace eval Foo {
>> variable foo
>> 
>> I would expect the second line to be indented (basically because of the
>> {, indicating it's beginning the namespace), but now it has indentation
>> 0.
>> 
>> If I revert commit cd5bb4bf3dbad8941d25823f398b595b8f0edbb9, "Fix two
>> tcl-mode defun-related bugs" (which fixes #23565) then I get the
>> expected indentation.

The appended worked for me, could you try it?
If it works for you I will write a test or two and install it.

Note that evaling this in Emacs isn't enough, see the doc comment of the
variable in question.

Tom

diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el
index fad62e100a..586d8cc0ed 100644
--- a/lisp/progmodes/tcl.el
+++ b/lisp/progmodes/tcl.el
@@ -360,7 +360,7 @@ tcl-mode-hook

 (defvar tcl-proc-list
-  '("proc" "method" "itcl_class" "body" "configbody" "class")
+  '("proc" "method" "itcl_class" "body" "configbody" "class" "namespace")
   "List of commands whose first argument defines something.
 This exists because some people (eg, me) use `defvar' et al.
 Call `tcl-set-proc-regexp' and `tcl-set-font-lock-keywords'