* riece-server.el (riece-find-server-name): Abolish. strict-naming strict-naming-mergepoint
authorueno <ueno>
Mon, 4 Aug 2003 04:34:47 +0000 (04:34 +0000)
committerueno <ueno>
Mon, 4 Aug 2003 04:34:47 +0000 (04:34 +0000)
* riece-alias.el: Add usage.

lisp/ChangeLog
lisp/riece-alias.el
lisp/riece-server.el

index df490d0..5564fca 100644 (file)
@@ -1,5 +1,11 @@
 2003-08-04  Daiki Ueno  <ueno@unixuser.org>
 
+       * riece-server.el (riece-find-server-name): Abolish.
+
+       * riece-alias.el: Add usage.
+
+2003-08-04  Daiki Ueno  <ueno@unixuser.org>
+
        * riece-mini.el (riece-mini-send-message): Use
        riece-completing-read-identity; don't use riece-own-channel-message.
 
index 0613bc7..dae97f5 100644 (file)
 ;; 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
index 6ca7939..d750824 100644 (file)
@@ -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.")))