diff options
| -rw-r--r-- | lisp/progmodes/tcl.el | 2 | ||||
| -rw-r--r-- | test/lisp/progmodes/tcl-tests.el | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el index fad62e100a4..586d8cc0ed0 100644 --- a/lisp/progmodes/tcl.el +++ b/lisp/progmodes/tcl.el | |||
| @@ -360,7 +360,7 @@ Add functions to the hook with `add-hook': | |||
| 360 | 360 | ||
| 361 | 361 | ||
| 362 | (defvar tcl-proc-list | 362 | (defvar tcl-proc-list |
| 363 | '("proc" "method" "itcl_class" "body" "configbody" "class") | 363 | '("proc" "method" "itcl_class" "body" "configbody" "class" "namespace") |
| 364 | "List of commands whose first argument defines something. | 364 | "List of commands whose first argument defines something. |
| 365 | This exists because some people (eg, me) use `defvar' et al. | 365 | This exists because some people (eg, me) use `defvar' et al. |
| 366 | Call `tcl-set-proc-regexp' and `tcl-set-font-lock-keywords' | 366 | Call `tcl-set-proc-regexp' and `tcl-set-font-lock-keywords' |
diff --git a/test/lisp/progmodes/tcl-tests.el b/test/lisp/progmodes/tcl-tests.el index 55211b70be2..061488636d0 100644 --- a/test/lisp/progmodes/tcl-tests.el +++ b/test/lisp/progmodes/tcl-tests.el | |||
| @@ -63,6 +63,15 @@ | |||
| 63 | (insert "proc inthis {} {\n # nothing\n") | 63 | (insert "proc inthis {} {\n # nothing\n") |
| 64 | (should (equal "inthis" (add-log-current-defun))))) | 64 | (should (equal "inthis" (add-log-current-defun))))) |
| 65 | 65 | ||
| 66 | ;; From bug#32035 | ||
| 67 | (ert-deftest tcl-mode-namespace-indent () | ||
| 68 | (with-temp-buffer | ||
| 69 | (tcl-mode) | ||
| 70 | (let ((text "namespace eval Foo {\n variable foo\n}\n")) | ||
| 71 | (insert text) | ||
| 72 | (indent-region (point-min) (point-max)) | ||
| 73 | (should (equal (buffer-string) text))))) | ||
| 74 | |||
| 66 | (provide 'tcl-tests) | 75 | (provide 'tcl-tests) |
| 67 | 76 | ||
| 68 | ;;; tcl-tests.el ends here | 77 | ;;; tcl-tests.el ends here |