On 2017-01-11 20:19, Noam Postavsky wrote: > On Wed, Jan 11, 2017 at 10:44 AM, Clément Pit--Claudel > wrote: >> >> As far as I can tell from the docs, the following syntax table should recognize // … line comments and nestable (* … *) comments properly: >> >> (defvar example-syntax-table >> (let ((table (make-syntax-table))) >> (modify-syntax-entry ?* ". 23" table) >> (modify-syntax-entry ?/ ". 12c" table) >> (modify-syntax-entry ?\n "> c" table) >> (modify-syntax-entry ?\( "()1n" table) >> (modify-syntax-entry ?\) ")(4n" table) >> table)) > [...] >> In this example, the last line (“which incorrectly extends past the newline?”), is considered to be a comment, because the sequence "(/" is treated as a multiline comment opener. > > You don't want "a" style comment chars combining with "c" style > comment chars. Unfortunately, Emacs doesn't implement that. I think > you'll have to implement these kind of comments with a > syntax-propertize-function. Yeah, that's what I was afraid of. Is there code that depends on this (a mixing with c)? If not, could we consider changing the semantics of "c" instead? This mixing isn't clear from the documentation, AFAICT. I guess such a change would break the hypothetical situation in which one would need to be able to say that a character is an opener for both "a" and "c", but a closer for only "c", though. Cheers, Clément.