From 35311bc307da04895ca5a4ea657de711dfe7ab78 Mon Sep 17 00:00:00 2001 From: bg66 Date: Fri, 30 Jun 2000 02:27:51 +0000 Subject: [PATCH] 2000-06-30 Akira Ohashi * liece-misc.el (liece-server-host): When `liece-server' is string return host only. --- lisp/liece-misc.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/liece-misc.el b/lisp/liece-misc.el index 496a372..3603ef6 100644 --- a/lisp/liece-misc.el +++ b/lisp/liece-misc.el @@ -271,7 +271,10 @@ (defmacro liece-server-host () '(if (listp liece-server) (plist-get liece-server ':host) - liece-server)) + (if (or (string-match "^\\[\\([^]]+\\)\\]:?[0-9]*" liece-server) + (string-match "^\\([^:]+\\):?[0-9]*" liece-server)) + (match-string 1 liece-server) + liece-server))) (defmacro liece-clean-hostname (hostname) "Return the arg HOSTNAME, but if is a dotted-quad, put brackets around it." -- 1.7.10.4