* riece-identity.el: Require 'riece-compat.
authorueno <ueno>
Mon, 4 Aug 2003 01:58:04 +0000 (01:58 +0000)
committerueno <ueno>
Mon, 4 Aug 2003 01:58:04 +0000 (01:58 +0000)
(riece-identity-prefix-case-table): New variable.

lisp/ChangeLog
lisp/riece-identity.el

index 20bbe10..c920dd3 100644 (file)
@@ -1,23 +1,21 @@
 2003-08-04  Daiki Ueno  <ueno@unixuser.org>
 
-       * riece-filter.el (riece-handle-numeric-reply): Decode messages.
-       (riece-handle-message): Ditto.
-
-       * riece-identity.el (riece-abbrev-identity-string-function): New
-       variable.
+       * riece-identity.el: Require 'riece-compat.
+       (riece-identity-prefix-case-table): New variable.
+       (riece-abbrev-identity-string-function): New variable.
        (riece-expand-identity-string-function): New variable.
        (riece-format-identity): Rename from riece-decode-identity.
        (riece-parse-identity): Rename from riece-encode-identity.
        (riece-with-identity-buffer): Abolish.
-       (riece-identity-canonicalize-prefix): Use case-table.
+       (riece-identity-canonicalize-prefix): Use case-table.   
+
+       * riece-filter.el (riece-handle-numeric-reply): Decode messages.
+       (riece-handle-message): Ditto.
 
        * riece-alias.el: New add-on.
        * COMPILE (riece-modules): Add riece-alias.
        * Makefile.am (EXTRA_DIST): Add riece-alias.el.
 
-       * riece-identity.el (riece-with-identity-buffer): Use
-       riece-with-server-buffer.
-
        * riece-emacs.el (riece-set-case-syntax-pair): New alias.
        * riece-xemacs.el (riece-set-case-syntax-pair): New alias.
        * riece-identity.el (riece-identity-canonicalize-prefix): Simplified.
index 92382db..0def749 100644 (file)
 (require 'riece-globals)
 (require 'riece-coding)
 (require 'riece-server)
+(require 'riece-compat)                        ;riece-set-case-syntax-pair
 
+(defvar riece-abbrev-identity-string-function nil)
+(defvar riece-expand-identity-string-function nil)
+
+(defvar riece-identity-prefix-case-table
+  (let ((table (copy-case-table (standard-case-table))))
+    (riece-set-case-syntax-pair ?\[ ?{ table)
+    (riece-set-case-syntax-pair ?\] ?} table)
+    (riece-set-case-syntax-pair ?\\ ?| table)
+    (riece-set-case-syntax-pair ?~ ?^ table)
+    table))
+    
 (defun riece-identity-prefix (identity)
   "Return the component sans its server from IDENTITY."
   (aref identity 0))
 
-(defvar riece-abbrev-identity-string-function nil)
-(defvar riece-expand-identity-string-function nil)
-
 (defun riece-identity-server (identity)
   "Return the server component in IDENTITY."
   (aref identity 1))
@@ -61,17 +70,12 @@ RFC2812, 2.2 \"Character codes\" says:
    considered to be the lower case equivalents of the characters []\~,
    respectively. This is a critical issue when determining the
    equivalence of two nicknames or channel names."
-  (let* ((old (current-case-table))
-        (new (copy-case-table old)))
+  (let ((old-table (current-case-table)))
     (unwind-protect
        (progn
-         (riece-set-case-syntax-pair ?\[ ?{ new)
-         (riece-set-case-syntax-pair ?\] ?} new)
-         (riece-set-case-syntax-pair ?\\ ?| new)
-         (riece-set-case-syntax-pair ?~ ?^ new)
-         (set-case-table new)
+         (set-case-table riece-identity-prefix-case-table)
          (downcase prefix))
-      (set-case-table old))))
+      (set-case-table old-table))))
 
 (defun riece-identity-equal-no-server (prefix1 prefix2)
   "Return t, if IDENT1 and IDENT2 is equal without server."