]> git.eshelyaron.com Git - emacs.git/commitdiff
Match complete words in dns-mode
authorLassi Kortela <lassi@lassi.io>
Mon, 13 Jun 2022 14:32:45 +0000 (16:32 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 13 Jun 2022 14:32:45 +0000 (16:32 +0200)
* lisp/textmodes/dns-mode.el (dns-mode-font-lock-keywords): Match
complete words like SOA and not all words that contain the string
SOA (bug#55944).

Copyright-paperwork-exempt: yes

lisp/textmodes/dns-mode.el

index d4acbe24ebb1edd9e0171edfb886c37348ce8b43..42d547504c18930c44643dba850a2ccfe1f9c6d0 100644 (file)
                        "26.1" 'set)
 
 (defcustom dns-mode-font-lock-keywords
-  `((,(concat "^\\$" (regexp-opt dns-mode-control-entities))
+  `((,(concat "^\\$" (regexp-opt dns-mode-control-entities) "\\>")
      0 ,dns-mode-control-entity-face)
     ("^\\$[a-z0-9A-Z]+" 0 ,dns-mode-bad-control-entity-face)
-    (,(regexp-opt dns-mode-classes) 0 ,dns-mode-class-face)
-    (,(regexp-opt dns-mode-types) 0 ,dns-mode-type-face))
+    (,(regexp-opt dns-mode-classes 'words) 0 ,dns-mode-class-face)
+    (,(regexp-opt dns-mode-types 'words) 0 ,dns-mode-type-face))
   "Font lock keywords used to highlight text in DNS master file mode."
   :version "26.1"
   :type 'sexp)