From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#24767: jgraph comments not recognized any more Date: Mon, 24 Oct 2016 19:34:51 +0000 Message-ID: <20161024193451.GA4544@acm.fritz.box> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1477337797 19434 195.159.176.226 (24 Oct 2016 19:36:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 24 Oct 2016 19:36:37 +0000 (UTC) User-Agent: Mutt/1.5.24 (2015-08-30) Cc: 24767@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 24 21:36:30 2016 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 1byl2c-0002cc-IX for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Oct 2016 21:36:14 +0200 Original-Received: from localhost ([::1]:49393 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byl2e-0001mL-Rp for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Oct 2016 15:36:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byl2T-0001jm-RV for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2016 15:36:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1byl2Q-0001ij-0S for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2016 15:36:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39440) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1byl2P-0001iR-Tq for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2016 15:36:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1byl2P-0007NO-O9 for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2016 15:36:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Oct 2016 19:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24767 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24767-submit@debbugs.gnu.org id=B24767.147733771928301 (code B ref 24767); Mon, 24 Oct 2016 19:36:01 +0000 Original-Received: (at 24767) by debbugs.gnu.org; 24 Oct 2016 19:35:19 +0000 Original-Received: from localhost ([127.0.0.1]:54838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byl1i-0007MN-Oy for submit@debbugs.gnu.org; Mon, 24 Oct 2016 15:35:18 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:17307) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byl1g-0007ME-Us for 24767@debbugs.gnu.org; Mon, 24 Oct 2016 15:35:17 -0400 Original-Received: (qmail 84870 invoked by uid 3782); 24 Oct 2016 19:35:15 -0000 Original-Received: from acm.muc.de (p548C73C8.dip0.t-ipconnect.de [84.140.115.200]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 24 Oct 2016 21:35:13 +0200 Original-Received: (qmail 4646 invoked by uid 1000); 24 Oct 2016 19:34:51 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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:124970 Archived-At: Hello, Stefan. On Sat, Oct 22, 2016 at 05:24:01PM -0400, Stefan Monnier wrote: > Package: Emacs > Try the following: > % emacs -Q -l .../elpa/packages/jgraph-mode/jgraph-mode.el ~/foo.jgr > (* hello *) > The string "(* hello *)" should be highlighted as a comment, and is > indeed correctly highlighted this way in Emacs-25 (and Emacs-24), but > not in "master". > The particularity of jgraph-mode's handling of (*...*) is that ?(, ?), > and ?* are given "symbol" syntax, so I guess that src/syntax.c was > modified in a way which makes it skip the whole (* as being a symbol. Suppose the jgraph buffer contains: he(*llo*) . Is this supposed to analyse as the symbol "he" followed by a comment, or should it be the symbol "he(*llo*)"? Currently, even Emacs-25 doesn't recognise the "(*llo*)" as a comment. It seems to me more likely that the comment should be recognised, but I don't know jgraph. To blame for this is the section of code in scan_sexps_forward (in Emacs-25) just after the label symstarted: where there is a subsidiary loop on "(from < end)" which doesn't do any checking on the comment flags. Maybe the solution (in master) would be to add the checking of the comment flags into this subsidiary loop. > Stefan -- Alan Mackenzie (Nuremberg, Germany).