From: ueno Date: Mon, 4 Aug 2003 01:58:04 +0000 (+0000) Subject: * riece-identity.el: Require 'riece-compat. X-Git-Tag: strict-naming-mergepoint~3 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98dce38bc57db8fa2e1c23cdffd00a3c328453dc;p=elisp%2Friece.git * riece-identity.el: Require 'riece-compat. (riece-identity-prefix-case-table): New variable. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 20bbe10..c920dd3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,23 +1,21 @@ 2003-08-04 Daiki Ueno - * 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. diff --git a/lisp/riece-identity.el b/lisp/riece-identity.el index 92382db..0def749 100644 --- a/lisp/riece-identity.el +++ b/lisp/riece-identity.el @@ -27,14 +27,23 @@ (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."