[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24767: jgraph comments not recognized any more

From: Alan Mackenzie
Subject: bug#24767: jgraph comments not recognized any more
Date: Mon, 24 Oct 2016 19:34:51 +0000
User-agent: Mutt/1.5.24 (2015-08-30)

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:


.  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

Maybe the solution (in master) would be to add the checking of the
comment flags into this subsidiary loop.

>         Stefan

Alan Mackenzie (Nuremberg, Germany).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]