* riece-display.el (riece-channel-buffer-create): Add new hook.
[riece] / lisp / riece-channel.el
index 0d32bdf..5e9971a 100644 (file)
 
 ;;; Code:
 
-(eval-when-compile (require 'riece-inlines))   ;scandinavian-downcase
-
 (require 'riece-options)
 (require 'riece-identity)
 
 ;;; String representation of a channel:
 (defconst riece-channel-regexp "^[+&#!]")
-(defconst riece-channel-modeless-regexp "^[+!]")
 
 (defun riece-channel-p (string)
   "Return t if STRING is a channel.
 \(i.e. it matches `riece-channel-regexp')"
   (string-match riece-channel-regexp string))
 
-(defun riece-channel-modeless-p (string)
-  "Return t if STRING is a modeless channel.
-\(i.e. it matches `riece-channel-modeless-regexp')"
-  (string-match riece-channel-modeless-regexp string))
-
 ;;; Channel object:
 (defun riece-find-channel (name)
   "Get a channel object named NAME from the server buffer."
   (riece-with-server-buffer
-   (let ((symbol (intern-soft (scandinavian-downcase
+   (let ((symbol (intern-soft (riece-identity-canonicalize-prefix
                               (riece-identity-prefix name))
                              riece-obarray)))
      (if symbol
@@ -55,8 +47,9 @@
 
 (defun riece-forget-channel (name)
   (riece-with-server-buffer
-   (let ((symbol (intern-soft (scandinavian-downcase
-                              (riece-identity-prefix name)))))
+   (let ((symbol (intern-soft (riece-identity-canonicalize-prefix
+                              (riece-identity-prefix name))
+                             riece-obarray)))
      (when symbol
        (makunbound symbol)
        (unintern (symbol-name symbol) riece-obarray)))))
@@ -72,12 +65,12 @@ the channel key, respectively."
 
 (defun riece-get-channel (name)
   (riece-with-server-buffer
-   (let ((symbol (intern-soft (scandinavian-downcase
+   (let ((symbol (intern-soft (riece-identity-canonicalize-prefix
                               (riece-identity-prefix name))
                              riece-obarray)))
      (if symbol
         (symbol-value symbol)
-       (set (intern (scandinavian-downcase
+       (set (intern (riece-identity-canonicalize-prefix
                     (riece-identity-prefix name))
                    riece-obarray)
            (riece-make-channel))))))