;;; 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
(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)))))
(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))))))