From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#13425: close this bug? Date: Thu, 02 Feb 2017 19:02:57 -0500 Message-ID: References: <87efzqhh93.fsf@tromey.com> <1485711505.6518.0@smtp.gmail.com> <=?UTF-8?Q?1485711505.6518.0@smtp.gmail.com> <1486062734.11108.0@smtp.gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1486080254 18843 195.159.176.226 (3 Feb 2017 00:04:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 3 Feb 2017 00:04:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 13425@debbugs.gnu.org, Tom Tromey To: Simen =?UTF-8?Q?Heggest=C3=B8yl?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 03 01:04:05 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZRMD-0004WY-2e for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Feb 2017 01:04:05 +0100 Original-Received: from localhost ([::1]:59527 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZRMI-0001si-Jf for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Feb 2017 19:04:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51665) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZRMD-0001sW-3V for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2017 19:04:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZRMA-0004uG-0z for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2017 19:04:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56117) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cZRM9-0004u0-Uh for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2017 19:04:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cZRM9-0002Iz-Md for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2017 19:04:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Feb 2017 00:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13425 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13425-submit@debbugs.gnu.org id=B13425.14860801868792 (code B ref 13425); Fri, 03 Feb 2017 00:04:01 +0000 Original-Received: (at 13425) by debbugs.gnu.org; 3 Feb 2017 00:03:06 +0000 Original-Received: from localhost ([127.0.0.1]:54316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZRLG-0002Hk-7v for submit@debbugs.gnu.org; Thu, 02 Feb 2017 19:03:06 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:50121) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZRLE-0002HF-8m for 13425@debbugs.gnu.org; Thu, 02 Feb 2017 19:03:05 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0ATKQAu3EVY/0gvq8AjOhoBAQEBAgEBAQEIAQEBAYM4AQEBAQEfhFuFVJwoAZZeGYYDBAICghFDEQECAQEBAQEBAWIohGkGViMQCzQSFBgNJC6IVK0Ui0QBAQEHAgEkixmKKQWPfIpqknOIJ4Y6kg81IXgTDoVzIIktAQEB X-IPAS-Result: A0ATKQAu3EVY/0gvq8AjOhoBAQEBAgEBAQEIAQEBAYM4AQEBAQEfhFuFVJwoAZZeGYYDBAICghFDEQECAQEBAQEBAWIohGkGViMQCzQSFBgNJC6IVK0Ui0QBAQEHAgEkixmKKQWPfIpqknOIJ4Y6kg81IXgTDoVzIIktAQEB X-IronPort-AV: E=Sophos;i="5.33,749,1477972800"; d="scan'208";a="291922653" Original-Received: from 192-171-47-72.cpe.pppoe.ca (HELO pastel.home) ([192.171.47.72]) by smtp.teksavvy.com with ESMTP; 02 Feb 2017 19:02:57 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 3010B6577E; Thu, 2 Feb 2017 19:02:57 -0500 (EST) In-Reply-To: <1486062734.11108.0@smtp.gmail.com> ("Simen =?UTF-8?Q?Heggest=C3=B8yl?="'s message of "Thu, 02 Feb 2017 20:12:14 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:128897 Archived-At: > + (save-excursion > + (re-search-forward "[{};)]" nil t) > + (eq (char-before) ?\{))) Looks OK. It will get confused if there's a comment jut at the wrong place with one of ";{})" inside, which is not unheard of. It's good enough for now, but a solution I've used frequently with SMIE is to call a "tokenize-backward" (usually a less discriminating one than the actual backward tokenizer I give to SMIE, to avoid inf-recursion) repeatedly rather than using a regexp-search. Stefan