GNU bug report logs - #23565
24.5; tcl-end-of-defun and tcl-eval-defun doesn't work reliable

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Rolf Ade <rolf@HIDDEN>; Keywords: confirmed; dated Wed, 18 May 2016 01:38:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 23565 <at> debbugs.gnu.org:


Received: (at 23565) by debbugs.gnu.org; 2 Jul 2018 12:04:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 02 08:04:23 2018
Received: from localhost ([127.0.0.1]:42663 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fZxZ9-0007k8-Bx
	for submit <at> debbugs.gnu.org; Mon, 02 Jul 2018 08:04:23 -0400
Received: from mxout3.interscholz.de ([85.236.196.238]:52427)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rolf@HIDDEN>) id 1fZxZ6-0007jt-Mc
 for 23565 <at> debbugs.gnu.org; Mon, 02 Jul 2018 08:04:21 -0400
Received: from localhost (mxout3 [127.0.0.1])
 by mxout3.interscholz.de (Postfix) with ESMTP id C66AB21690;
 Mon,  2 Jul 2018 14:04:14 +0200 (CEST)
X-Virus-Scanned: interscholz amavisd-new at mxout3.interscholz.de
Received: from server.web01.interscholz.net (server.web01.interscholz.net
 [85.236.196.138])
 by mxout3.interscholz.de (Postfix) with ESMTP id 3181C20F15;
 Mon,  2 Jul 2018 14:04:14 +0200 (CEST)
Received: from linux-qg7d (p5B317AFA.dip0.t-ipconnect.de [91.49.122.250])
 by server.web01.interscholz.net (Postfix) with ESMTPSA id 9CE3CF0001;
 Mon,  2 Jul 2018 14:04:13 +0200 (CEST)
From: Rolf Ade <rolf@HIDDEN>
To: Tom Tromey <tom@HIDDEN>
Subject: Re: bug#23565: 24.5;
 tcl-end-of-defun and tcl-eval-defun doesn't work reliable
References: <87mvnoe3pi.fsf@HIDDEN> <871scw3x6g.fsf@HIDDEN>
Date: Mon, 02 Jul 2018 14:04:13 +0200
In-Reply-To: <871scw3x6g.fsf@HIDDEN> (Tom Tromey's message of "Sun, 24 Jun
 2018 11:35:03 -0600")
Message-ID: <87zhz99742.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 23565
Cc: 23565 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)


I'm sorry for the delay in replying; I was on vacation and saw your mail
just this day, after comming back.

Thank you for taking care!

Tom Tromey <tom@HIDDEN> writes:
> I've checked in a fix for the tcl-end-of-defun problem.
> I think it should fix tcl-eval-defun as well, but I didn't test this.

I've build current master and did a few tests. Yes, it seems, that
tcl-end-of-defun as well as tcl-eval-defun now work for me as expected,
even in the reported-as-broken cases.

I'll copy masters tcl-mode.el over to my currently used 26.1
installation (and bytecompile, of course) and give it a try in my daily
Tcl coding, for a few days, to see, if I stumble over any unexpected
side-effect of the changes.

I'll report in a week or at most two (it varies a bit how much Tcl
coding I have to do and this is driven by others).

rolf






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#23565; Package emacs. Full text available.

Message received at 23565 <at> debbugs.gnu.org:


Received: (at 23565) by debbugs.gnu.org; 24 Jun 2018 17:35:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 24 13:35:09 2018
Received: from localhost ([127.0.0.1]:34067 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fX8uq-0002nX-Ti
	for submit <at> debbugs.gnu.org; Sun, 24 Jun 2018 13:35:09 -0400
Received: from gateway21.websitewelcome.com ([192.185.46.113]:36552)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tom@HIDDEN>) id 1fX8uo-0002nO-Jv
 for 23565 <at> debbugs.gnu.org; Sun, 24 Jun 2018 13:35:07 -0400
Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5])
 by gateway21.websitewelcome.com (Postfix) with ESMTP id 08639400CB9B6
 for <23565 <at> debbugs.gnu.org>; Sun, 24 Jun 2018 12:35:05 -0500 (CDT)
Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP
 id X8umfIQFIRPojX8umfuuFJ; Sun, 24 Jun 2018 12:35:05 -0500
X-Authority-Reason: nr=8
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; 
 s=default;
 h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=vCpCjSTVR45GJytmeppkJPXE2DjHiFghlgVFPiYgrKE=; b=TMuIWG1XWJ9EJNolImtWwwfIKO
 YkUB/iyyBwSYq7xSY2L9c8d+5g+svpoaP0orVKRSPEMuMo94sUwMfW1RMcvoONZpd5jXjfcEbVuPn
 31kgrL7V8m9aFBf2a+Fv7DuBg;
Received: from 75-166-79-120.hlrn.qwest.net ([75.166.79.120]:60290 helo=bapiya)
 by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
 (Exim 4.91) (envelope-from <tom@HIDDEN>)
 id 1fX8um-000BKN-Ny; Sun, 24 Jun 2018 12:35:04 -0500
From: Tom Tromey <tom@HIDDEN>
To: Rolf Ade <rolf@HIDDEN>
Subject: Re: bug#23565: 24.5;
 tcl-end-of-defun and tcl-eval-defun doesn't work reliable
References: <87mvnoe3pi.fsf@HIDDEN>
X-Attribution: Tom
Date: Sun, 24 Jun 2018 11:35:03 -0600
In-Reply-To: <87mvnoe3pi.fsf@HIDDEN> (Rolf Ade's message of
 "Wed, 18 May 2016 00:10:01 +0200")
Message-ID: <871scw3x6g.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-AntiAbuse: This header was added to track abuse,
 please include it with any abuse report
X-AntiAbuse: Primary Hostname - box5379.bluehost.com
X-AntiAbuse: Original Domain - debbugs.gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - tromey.com
X-BWhitelist: no
X-Source-IP: 75.166.79.120
X-Source-L: No
X-Exim-ID: 1fX8um-000BKN-Ny
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-Source-Sender: 75-166-79-120.hlrn.qwest.net (bapiya) [75.166.79.120]:60290
X-Source-Auth: tom+tromey.com
X-Email-Count: 2
X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20=
X-Local-Domain: yes
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 23565
Cc: 23565 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

I've checked in a fix for the tcl-end-of-defun problem.
I think it should fix tcl-eval-defun as well, but I didn't test this.

Tom




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#23565; Package emacs. Full text available.
Added tag(s) confirmed. Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 23565 <at> debbugs.gnu.org:


Received: (at 23565) by debbugs.gnu.org; 17 Jun 2016 03:55:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 16 23:55:11 2016
Received: from localhost ([127.0.0.1]:43698 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bDksB-0000FC-3J
	for submit <at> debbugs.gnu.org; Thu, 16 Jun 2016 23:55:11 -0400
Received: from mail-oi0-f66.google.com ([209.85.218.66]:34868)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1bDks9-0000Eo-N2
 for 23565 <at> debbugs.gnu.org; Thu, 16 Jun 2016 23:55:09 -0400
Received: by mail-oi0-f66.google.com with SMTP id u201so11552100oie.2
 for <23565 <at> debbugs.gnu.org>; Thu, 16 Jun 2016 20:55:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:from:date:message-id:subject:to:cc;
 bh=ifiX5MmaXAxN05iiXQaILlwTz3OGtER3azCimsxVutE=;
 b=x8c54NIeoV32cDKIPXXlTnCcvkAQxhfN4J1cVWRHEp5ykYNlSlAhhAkXZf4z7BA4tm
 8gtw10JcmhQq+/P1BUCHbknVeCXWsEOfkovfqJg+rdvmjtCdwNa5PAJBF1G7VPjh7ent
 dwgrFu4pjh+k3T2HKmAbliwGqGcr2wmKbB8SiI4UmVVttC8pyjC6oLebOv5M965oUJPZ
 aSymT20O0M56kqityuW3vOz3Vju+OH3iHH/n7ZNW3c6MA5iCYaIZAaqXRAUb3jzSkST7
 DuzlylRKCYNkRrf06GpphcVmsGNetZ0WPqutw6HA7AxYodk3kHZ9wQSJ8RPYsK4aGkbp
 jU2g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:sender:from:date:message-id:subject
 :to:cc;
 bh=ifiX5MmaXAxN05iiXQaILlwTz3OGtER3azCimsxVutE=;
 b=dzQr2jdfC8pdZSo/fGAsX0zB6j54iJPIaS6tJ/wEcI+vNLdB/FY9ejCyXRJ8apliLV
 ym30kk8XalSSXIexXfxJEtFWx5F3PsrwCg5PwebfeLfxLF3Aa8b9OYUTST9WaId6fLPD
 tbh81ljc3hPBcPK+W/PPByPAVXWrsClwo52fucfdXaBubHDkgu+3S/0O6OBAstHMV6yD
 c1S1OxVu7eCd8FkE3O4L+7BWfIS0I5siOL5aVlnlPBtQKjeX2ji6qUsIOLjpE2H23Zrf
 dcJJp7mUeqr5xw6kewtMZY3ueq5xA+j8RRw2S3P76q9E2wl0DSgTEuvL7H2VEkEmk0xU
 Z5lA==
X-Gm-Message-State: ALyK8tK1lDP1PAkB/FtWAayN1FgY3K+6UOWxfjR5LVGDsqx0BDDkTps49I3Xjtebk75beloMks52jU4gEqMGKA==
X-Received: by 10.202.197.137 with SMTP id v131mr3970204oif.178.1466135701296; 
 Thu, 16 Jun 2016 20:55:01 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.157.44.103 with HTTP; Thu, 16 Jun 2016 20:55:00 -0700 (PDT)
From: Noam Postavsky <npostavs@HIDDEN>
Date: Thu, 16 Jun 2016 23:55:00 -0400
X-Google-Sender-Auth: UBP62jt6muqhFWWj_NGDWgTO3bc
Message-ID: <CAM-tV--pJ97aW0pQ5EmiJ2ivOx2G0PkU8fgAnHShnUFAtiKwMg@HIDDEN>
Subject: Re: bug#23565: (24.5; tcl-end-of-defun and tcl-eval-defun doesn't
 work reliable)
To: 23565 <at> debbugs.gnu.org
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 23565
Cc: Rolf Ade <rolf@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#23565; Package emacs. Full text available.

Message received at 23565 <at> debbugs.gnu.org:


Received: (at 23565) by debbugs.gnu.org; 18 May 2016 12:41:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 18 08:41:04 2016
Received: from localhost ([127.0.0.1]:56607 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1b30me-00078o-JR
	for submit <at> debbugs.gnu.org; Wed, 18 May 2016 08:41:04 -0400
Received: from mxout3.interscholz.de ([85.236.196.238]:48926)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rolf@HIDDEN>) id 1b30mc-00078E-RN
 for 23565 <at> debbugs.gnu.org; Wed, 18 May 2016 08:41:03 -0400
Received: from localhost (mxout3 [127.0.0.1])
 by mxout3.interscholz.de (Postfix) with ESMTP id 289FE21D88
 for <23565 <at> debbugs.gnu.org>; Wed, 18 May 2016 14:40:55 +0200 (CEST)
X-Virus-Scanned: interscholz amavisd-new at mxout3.interscholz.de
Received: from server.web01.interscholz.net (server.web01.interscholz.net
 [85.236.196.138])
 by mxout3.interscholz.de (Postfix) with ESMTP id 9648320138
 for <23565 <at> debbugs.gnu.org>; Wed, 18 May 2016 14:40:54 +0200 (CEST)
Received: from linux-qg7d.site (p4FFBE4BD.dip0.t-ipconnect.de [79.251.228.189])
 by server.web01.interscholz.net (Postfix) with ESMTPSA id 0155234016E
 for <23565 <at> debbugs.gnu.org>; Wed, 18 May 2016 14:40:53 +0200 (CEST)
Message-ID: <573C62D4.8050302@HIDDEN>
Date: Wed, 18 May 2016 14:40:52 +0200
From: Rolf Ade <rolf@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:24.0) Gecko/20100101 Thunderbird/24.2.0
MIME-Version: 1.0
To: 23565 <at> debbugs.gnu.org
Subject: Re: bug#23565: Acknowledgement (24.5;
 tcl-end-of-defun and tcl-eval-defun doesn't work reliable)
References: <87mvnoe3pi.fsf@HIDDEN>
 <handler.23565.B.146353542425998.ack <at> debbugs.gnu.org>
In-Reply-To: <handler.23565.B.146353542425998.ack <at> debbugs.gnu.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 23565
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)


I missed to note, that the reported misbehavior is still there in
emacs 25.0.94.1.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#23565; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 18 May 2016 01:37:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 17 21:37:04 2016
Received: from localhost ([127.0.0.1]:56366 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1b2qQ4-0006lF-Aq
	for submit <at> debbugs.gnu.org; Tue, 17 May 2016 21:37:04 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33542)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rolf@HIDDEN>) id 1b2qQ1-0006kj-0n
 for submit <at> debbugs.gnu.org; Tue, 17 May 2016 21:37:02 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rolf@HIDDEN>) id 1b2qPu-0005xW-AG
 for submit <at> debbugs.gnu.org; Tue, 17 May 2016 21:36:55 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:40176)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <rolf@HIDDEN>) id 1b2qPu-0005xH-5x
 for submit <at> debbugs.gnu.org; Tue, 17 May 2016 21:36:54 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:49945)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <rolf@HIDDEN>) id 1b2qPp-0005xc-O5
 for bug-gnu-emacs@HIDDEN; Tue, 17 May 2016 21:36:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rolf@HIDDEN>) id 1b2nBp-0004SO-3f
 for bug-gnu-emacs@HIDDEN; Tue, 17 May 2016 18:10:12 -0400
Received: from mxout3.interscholz.de ([85.236.196.238]:42960)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <rolf@HIDDEN>) id 1b2nBo-0004PY-TY
 for bug-gnu-emacs@HIDDEN; Tue, 17 May 2016 18:10:09 -0400
Received: from localhost (mxout3 [127.0.0.1])
 by mxout3.interscholz.de (Postfix) with ESMTP id 3AC6020F53
 for <bug-gnu-emacs@HIDDEN>; Wed, 18 May 2016 00:10:06 +0200 (CEST)
X-Virus-Scanned: interscholz amavisd-new at mxout3.interscholz.de
Received: from server.web01.interscholz.net (server.web01.interscholz.net
 [85.236.196.138])
 by mxout3.interscholz.de (Postfix) with ESMTP id 0606E202D9
 for <bug-gnu-emacs@HIDDEN>; Wed, 18 May 2016 00:10:04 +0200 (CEST)
Received: from linux-qg7d.fritz.box (p4FFBE6E1.dip0.t-ipconnect.de
 [79.251.230.225])
 by server.web01.interscholz.net (Postfix) with ESMTPSA id E7405340098;
 Wed, 18 May 2016 00:10:01 +0200 (CEST)
From: Rolf Ade <rolf@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.5; tcl-end-of-defun and tcl-eval-defun doesn't work reliable
Date: Wed, 18 May 2016 00:10:01 +0200
Message-ID: <87mvnoe3pi.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)



Recipt:

- Start emacs -Q

- Open some buffer and enable tcl-mode (M-x tcl-mode).

Copy the following tcl code into it:

proc bad {{value ""}} {
    # do something
}

proc good {value} {
    # do something
}


This is valid tcl code, creating two functions (or procedures, als Tcl
also calls them). The first function has an optional argument. If that
argument isn't given, the argument variable 'value' will have the
default value ("" in the bad example) given in the proc definition. The
second is an example for a function. that always expects one argument.

- Put the point at the beginning of the proc bad and call
  tcl-end-of-defun (which is an alias of end-of-defun, therefor all
  keybindings to that will work). Now the point is (marked as: _P_
 
proc bad {{value ""}} _P_{
    # do something
}

This is wrong, this is not the end of the proc. In general,
tcl-end-of-defun does work. Look at the proc good. Placing the point at
the beginning of proc good and calling tcl-end-of-defun, the point is
where expected:

proc good {value} {
    # do something
}_P_

This is only an example of the mis-functioning. It seems always to show
up, if a proc definition has the syntax for one ore more optional
arguments with the empty string (given as "" in the code) as default
value.

Since tcl-eval-defun is implemented with the help of end-of-defun, it
suffers from this, too. 



In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10)
 of 2015-04-11 on linux-qg7d
Windowing system distributor `The X.Org Foundation', version 11.0.11203000




Acknowledgement sent to Rolf Ade <rolf@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#23565; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 2 Jul 2018 12:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.