From ebfc245261dbb0135b402bf50d8689224d3850e1 Mon Sep 17 00:00:00 2001 From: ueno Date: Fri, 5 Nov 2004 03:38:32 +0000 Subject: [PATCH] * riece-alias.el (riece-alias-abbrev-atmark): Don't append "@" to a channel on default server. --- lisp/ChangeLog | 5 +++++ lisp/riece-alias.el | 19 ++++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 914c0c9..c3394dc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2004-11-05 Daiki Ueno + * riece-alias.el (riece-alias-abbrev-atmark): Don't append "@" to + a channel on default server. + +2004-11-05 Daiki Ueno + * riece-alias.el (riece-alias-use-atmark): New user option. If this option enabled, atmark "@" will be used to separate prefix and server. (e.g. "#riece@server") diff --git a/lisp/riece-alias.el b/lisp/riece-alias.el index a617687..7b94277 100644 --- a/lisp/riece-alias.el +++ b/lisp/riece-alias.el @@ -92,7 +92,7 @@ (server (substring string (match-end 0)))) (concat (riece-alias-escape-atmark prefix) "@" (riece-alias-escape-atmark server))) - (concat (riece-alias-escape-atmark string) "@"))) + (riece-alias-escape-atmark string))) (defun riece-alias-expand-atmark (string) (let ((index 0) @@ -107,14 +107,15 @@ index (+ (match-beginning 0) (/ length 2))) (unless (zerop (% length 2)) (setq prefix (substring string 0 index)))) - (setq server (substring string index) - index 0) - (if (equal server "") - prefix - (while (string-match "@@" server index) - (setq server (replace-match "@" nil nil server) - index (1- (match-end 0)))) - (concat prefix " " server)))) + (if (null prefix) + string + (setq server (substring string index) + index 0) + (if (equal server "") + (while (string-match "@@" server index) + (setq server (replace-match "@" nil nil server) + index (1- (match-end 0)))) + (concat prefix " " server))))) (defun riece-alias-abbrev-identity-string (string) (if riece-alias-enable-percent-hack -- 1.7.10.4