GNU bug report logs - #66660
[PATCH] Fix dns-mode-syntax-table

Previous Next

Package: emacs;

Reported by: Lassi Kortela <lassi <at> lassi.io>

Date: Sat, 21 Oct 2023 06:18:01 UTC

Severity: normal

Tags: patch

Fixed in version 30.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Lassi Kortela <lassi <at> lassi.io>, 66660 <at> debbugs.gnu.org
Subject: bug#66660: [PATCH] Fix dns-mode-syntax-table
Date: Sat, 21 Oct 2023 02:41:43 -0700
Lassi Kortela <lassi <at> lassi.io> writes:

> On the following two lines, the text in double quotes was not
> highlighted.
>
> @ IN TXT "v=spf1 include:simplelists.com -all"
>
> srfi IN TXT "v=spf1 include:simplelists.com -all"
>
> On the following line, the part "k=rsa was not highlighted, and the
> rest of the line ;p=MIGf[...]QAB" starting at the semicolon was
> incorrectly highlighted as a comment instead of a string literal.
>
> selector1._domainkey.srfi IN TXT "k=rsa;p=MIGf[...]QAB"
>
> The patch causes the parts in double quotes to be highlighted as string
> literals. Since the part starting at the semicolon is inside a string,
> it is no longer incorrectly highlighted as a comment.
>
> Motion commands such as forward-sexp are likewise fixed.

Thanks, this seems to have already been fixed on master:

    commit c586d984f279aa61de4f5dfc4f6df660188dd0f6
    Author: Stefan Kangas <stefankangas <at> gmail.com>
    Date:   Tue Sep 5 23:06:21 2023 +0200

        Make `dns-mode` fontify quoted values correctly

        * lisp/textmodes/dns-mode.el (dns-mode-syntax-table): Fontify
        quoted values correctly.  (Bug#62214)
        Suggested by Trent W. Buck <trentbuck <at> gmail.com>.

However, the patch on master only has:

+    (modify-syntax-entry ?\" "\""   table)

But your patch has this:

+    (modify-syntax-entry ?\" "\"" table)
+    (modify-syntax-entry ?\\ "\\" table)

Do we need the second line there, too?  If yes, why?

Perhaps this fix should be cherry-picked to emacs-29, as well.

Thanks.




This bug report was last modified 1 year and 214 days ago.

Previous Next


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