From: bg66 Date: Fri, 30 Jun 2000 02:27:51 +0000 (+0000) Subject: 2000-06-30 Akira Ohashi X-Git-Tag: liece-1_4_4-1~59 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=35311bc307da04895ca5a4ea657de711dfe7ab78;p=elisp%2Fliece.git 2000-06-30 Akira Ohashi * liece-misc.el (liece-server-host): When `liece-server' is string return host only. --- 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."