GNU bug report logs - #24739
25.1; conf-mode can't handle non escaped single quotes

Previous Next

Package: emacs;

Reported by: Diego Berrocal <cestdiego <at> gmail.com>

Date: Wed, 19 Oct 2016 16:39:02 UTC

Severity: minor

Tags: confirmed

Found in version 25.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 24739 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Diego Berrocal <cestdiego <at> gmail.com>
Cc: 24739 <at> debbugs.gnu.org
Subject: Re: bug#24739: 25.1; conf-mode can't handle non escaped single quotes
Date: Sat, 27 Jul 2019 15:43:15 +0200
Diego Berrocal <cestdiego <at> gmail.com> 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




This bug report was last modified 3 years and 269 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.