bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#66660: [PATCH] Fix dns-mode-syntax-table


From: Stefan Kangas
Subject: bug#66660: [PATCH] Fix dns-mode-syntax-table
Date: Sat, 21 Oct 2023 02:41:43 -0700

Lassi Kortela <lassi@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@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@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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]