GNU bug report logs -
#23565
24.5; tcl-end-of-defun and tcl-eval-defun doesn't work reliable
Previous Next
Reported by: Rolf Ade <rolf <at> pointsman.de>
Date: Wed, 18 May 2016 01:38:02 UTC
Severity: normal
Tags: confirmed, fixed
Found in version 24.5
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 23565 <at> debbugs.gnu.org (full text, mbox):
tag 23565 + confirmed
quit
It has to do with the tcl-omit-ws-regexp which is used to set the
buffer local value of defun-prompt-regexp (why isn't it called
tcl-defun-prompt-regexp?). The current setting, along with commentary
is:
;; Here's another stab. I think this one actually works.
;; We have to be careful that the open-brace following this regexp
;; is indeed the one corresponding to the function's body so
;; that end-of-defun works correctly. Tricky cases are:
;; proc foo { {arg1 def} arg2 } {
;; as well as
;; proc foo { \n {arg1 def} \n arg2 } {
;; The current setting handles the first case properly but not the second.
;; It also fails if `proc' is not in column-0 (e.g. it's in a namespace).
(defconst tcl-omit-ws-regexp "^[^]\" \t\n#}][^\n\"#]+[ \t]+")
If I remove the " from the second character set, then the examples
given in this bug report work, but probably some others might break (I
don't know tcl well enough to come up with any).
;; this works for given examples
(defconst tcl-omit-ws-regexp "^[^]\" \t\n#}][^\n#]+[ \t]+")
A regexp based approach is probably always doomed to have some bad
cases, so perhaps the real fix is to define a
beginning-of-defun-function for tcl-mode.
This bug report was last modified 5 years and 281 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.