* lisp/generic-x.el (hosts-generic-mode): Support IPv6 addresses.

This commit is contained in:
Stefan Kangas 2021-01-28 17:05:06 +01:00
parent 80d964ec8b
commit 4cded88b0e

View file

@ -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."))