unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Diego Berrocal <cestdiego@gmail.com>
Cc: 24739@debbugs.gnu.org
Subject: bug#24739: 25.1; conf-mode can't handle non escaped single quotes
Date: Sat, 27 Jul 2019 15:43:15 +0200	[thread overview]
Message-ID: <87lfwjh9u4.fsf@mouse.gnus.org> (raw)
In-Reply-To: <CAG83E83XiCRkBooQSJZo4sNMXuSddY=o05aok47NanGfC=H-wQ@mail.gmail.com> (Diego Berrocal's message of "Wed, 19 Oct 2016 16:37:36 +0000")

Diego Berrocal <cestdiego@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





  reply	other threads:[~2019-07-27 13:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-19 16:37 bug#24739: 25.1; conf-mode can't handle non escaped single quotes Diego Berrocal
2019-07-27 13:43 ` Lars Ingebrigtsen [this message]
2019-07-27 16:53   ` Noam Postavsky
2019-07-28  9:50     ` Lars Ingebrigtsen
2021-08-21 15:39       ` Michalis V.
2021-08-22 21:40         ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lfwjh9u4.fsf@mouse.gnus.org \
    --to=larsi@gnus.org \
    --cc=24739@debbugs.gnu.org \
    --cc=cestdiego@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).