From: ueno Date: Mon, 4 Aug 2003 04:34:47 +0000 (+0000) Subject: * riece-server.el (riece-find-server-name): Abolish. X-Git-Tag: strict-naming-mergepoint X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fstrict-naming;p=elisp%2Friece.git * riece-server.el (riece-find-server-name): Abolish. * riece-alias.el: Add usage. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index df490d0..5564fca 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2003-08-04 Daiki Ueno + * riece-server.el (riece-find-server-name): Abolish. + + * riece-alias.el: Add usage. + +2003-08-04 Daiki Ueno + * riece-mini.el (riece-mini-send-message): Use riece-completing-read-identity; don't use riece-own-channel-message. diff --git a/lisp/riece-alias.el b/lisp/riece-alias.el index 0613bc7..dae97f5 100644 --- a/lisp/riece-alias.el +++ b/lisp/riece-alias.el @@ -21,6 +21,15 @@ ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. +;; This add-on allows you to define aliases for IRC names. + +;; To use, add the following line to your ~/.riece/init.el: +;; (add-to-list 'riece-addons 'riece-alias) + +;; For example, if you want to define an alias `#l' for `#Liece', you +;; can customize riece-alias-alist as follows: +;; (setq riece-alias-alist '(("#Liece" . "#l"))) + ;;; Code: (defgroup riece-alias nil diff --git a/lisp/riece-server.el b/lisp/riece-server.el index 6ca7939..d750824 100644 --- a/lisp/riece-server.el +++ b/lisp/riece-server.el @@ -101,16 +101,6 @@ the `riece-server-keyword-map' variable." riece-save-variables-are-dirty t)) (cdr entry))) -(defun riece-find-server-name () - (or riece-overriding-server-name - ;already in the server buffer - (if (local-variable-p 'riece-server-name (current-buffer)) - riece-server-name - (if riece-current-channel - (riece-identity-server riece-current-channel) - (if (riece-server-opened "") - ""))))) - (defun riece-server-process-name (server-name) (if (equal server-name "") "IRC" @@ -133,7 +123,16 @@ the `riece-server-keyword-map' variable." (process-send-string process (riece-encode-coding-string string)))) (defun riece-send-string (string) - (let ((process (riece-server-process (riece-find-server-name)))) + (let* ((server-name + (or riece-overriding-server-name + ;already in the server buffer + (if (local-variable-p 'riece-server-name (current-buffer)) + riece-server-name + (if riece-current-channel + (riece-identity-server riece-current-channel) + (if (riece-server-opened "") + ""))))) + (process (riece-server-process server-name))) (unless process (error "%s" (substitute-command-keys "Type \\[riece-command-open-server] to open server.")))