On 2016-10-17 09:02, Stefan Monnier wrote: >> Thanks! How is the package called? I don't see it list-packages :/ > > It's called sm-c-mode. And no, it's not in GNU ELPA, it's in elpa.git. Thanks! I'll look. >> The issue here is that “What a great example” is a string. I tried >> using a syntactic face function to mark the last ‘>’ as a string >> closer and the newline as a string opener, > > Never set `syntax-table` text properties from > font-lock-syntactic-face-function (this will bring nothing but > problems that are difficult to track down). Been there, done that. > Do it from syntax-propertize-function. Woops, this was a typo. I'm using a syntax-propertize-function. >> but that confused the existing function, which expects the docstring >> starter to be ‘"""’, not ‘\n’. Even after fixing this, python-mode >> was unusable: it inflooped when trying to find a whole defun, because >> the nav-end-of-defun function isn't ready to accept ‘\n’ as >> a string starter. > > Sounds like you need to adjust other parts of the code, yes. > > Alternatively, don't use `syntax-table` text properties at all, and > highlight the nested strings "by hand" (with regexps and/or manual > parsing). OK; I think I'll go with the solution I posted in the other subthread :) Thanks! Clément.