Subject: Re: bug#24739: 25.1; conf-mode can't handle non escaped single quotes

From: Lars Ingebrigtsen <[email-masked]>
Date: Sat, 27 Jul 2019 15:43:15 +0200

Diego Berrocal <[email-masked]> writes:

> when in conf-mode, if one property has a value that has a single
> non escaped quote, then it will keep searching for the matching quote
> until the end of the file, which makes next properties not able to be
> font-locked
>
> Reproduction text:
>
> Switch to scratch buffer
>
> M-x conf-mode
>
> firstProperty=Hi I'm Diego
> secondProperty=I have a stringquote style.

(I'm going through older Emacs bug reports that have received no
response.)

I can confirm that this bug is still present in Emacs 27 -- everything
after the quote is in font-lock-string-face.

The confusing thing is that I can't even determine what's doing the
font-locking of that thing here.

This is the definition:

(defvar conf-font-lock-keywords
  '(;; [section] (do this first because it may look like a parameter)
    ("^[ \t]*\\[\\(.+\\)\\]" 1 'font-lock-type-face)
    ;; var=val or var[index]=val
    ("^[ \t]*\\(.+?\\)\\(?:\\[\\(.*?\\)\\]\\)?[ \t]*="
     (1 'font-lock-variable-name-face)
     (2 'font-lock-constant-face nil t))
    ;; section { ... } (do this last because some assign ...{...)
    ("^[ \t]*\\([^=:\n]+?\\)[ \t\n]*{[^{}]*?$" 1 'font-lock-type-face prepend))
  "Keywords to highlight in Conf mode.")

No font-lock-string-face in sight, and there's no mention of it in the
file.  So is this some general font-lock thing that's configured
somewhere else?  Anybody know how this stuff works?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no