Hi, On 1 December 2023 at 01:50 +01, Dmitry Gutov wrote: > On 30/11/2023 01:21, Christophe TROESTLER wrote: >> + (prefix (buffer-substring-no-properties beg (min (+ beg 3) end))) >> + (face (if (string-equal "///" prefix) > > It'll probably be faster overall to use save-excursion and looking-at > instead of creating a substring. Thanks for your feedback. I did dome tests and the two are comparable (on Emacs 29.1) but here is a version that uses your suggestion. Best, C.