From 4cded88b0ebb005f67447cd07da016eb0b7ef4a4 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 28 Jan 2021 17:05:06 +0100 Subject: [PATCH] * lisp/generic-x.el (hosts-generic-mode): Support IPv6 addresses. --- lisp/generic-x.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/generic-x.el b/lisp/generic-x.el index 60cf8468a4e..bd03f287fc7 100644 --- a/lisp/generic-x.el +++ b/lisp/generic-x.el @@ -365,7 +365,8 @@ your changes into effect." (define-generic-mode hosts-generic-mode '(?#) '("localhost") - '(("\\([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+\\)" 1 font-lock-constant-face)) + '(("\\([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+\\)" 1 font-lock-constant-face) + ("\\<\\([0-9A-Fa-f:]+\\)\\>" 1 font-lock-constant-face)) '("[hH][oO][sS][tT][sS]\\'") nil "Generic mode for HOSTS files.")) -- 2.39.5