summaryrefslogtreecommitdiff
path: root/lisp/generic-x.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-01-28 17:05:06 +0100
committerStefan Kangas <stefan@marxist.se>2021-01-28 18:24:45 +0100
commit4cded88b0ebb005f67447cd07da016eb0b7ef4a4 (patch)
treed2a0f7ae9aa002a4c715f390ce8e149378bb3c30 /lisp/generic-x.el
parent80d964ec8b64a1c604c99aa51ecdbd813d739a90 (diff)
downloademacs-4cded88b0ebb005f67447cd07da016eb0b7ef4a4.tar.gz
* lisp/generic-x.el (hosts-generic-mode): Support IPv6 addresses.
Diffstat (limited to 'lisp/generic-x.el')
-rw-r--r--lisp/generic-x.el3
1 files changed, 2 insertions, 1 deletions
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."))