equivalence of two nicknames or channel names.")
(defun riece-identity-prefix (identity)
- "Return the component sans its server from IDENTITY."
+ "Return the component sans its server name from IDENTITY."
(aref identity 0))
(defun riece-identity-server (identity)
- "Return the server component in IDENTITY."
+ "Return the server name component in IDENTITY."
(aref identity 1))
(defun riece-make-identity (prefix server)
(vector prefix server))
(defun riece-identity-equal (ident1 ident2)
- "Return t, if IDENT1 and IDENT2 is equal."
+ "Return t, if IDENT1 and IDENT2 are equal."
(and (riece-identity-equal-no-server
(riece-identity-prefix ident1)
(riece-identity-prefix ident2))
prefix))
(defun riece-identity-equal-no-server (prefix1 prefix2)
- "Return t, if IDENT1 and IDENT2 is equal without server part."
+ "Return t, if IDENT1 and IDENT2 are equal without server part."
(equal (riece-identity-canonicalize-prefix prefix1)
(riece-identity-canonicalize-prefix prefix2)))
(riece-identity-server identity)))))
(if riece-abbrev-identity-string-function
(setq string (funcall riece-abbrev-identity-string-function string)))
- (put-text-property 0 (length string) 'riece-identity identity string)
+ (riece-put-text-property-nonsticky 0 (length string)
+ 'riece-identity identity
+ string)
(if prefix-only
- (put-text-property 0 (length string)
- 'riece-format-identity-prefix-only t
- string))
+ (riece-put-text-property-nonsticky 0 (length string)
+ 'riece-format-identity-prefix-only t
+ string))
string))
(defun riece-parse-identity (string)
(defun riece-completing-read-identity (prompt channels
&optional predicate require-match
- initial history default)
+ initial history default
+ no-server)
"Read an identity object in the minibuffer, with completion.
PROMPT is a string to prompt with; normally it ends in a colon and a space.
CHANNELS is a list of identity objects.
(completing-read
prompt
(mapcar (lambda (channel)
- (list (riece-format-identity channel)))
+ (list (riece-format-identity channel no-server)))
(delq nil (copy-sequence (or channels
riece-current-channels))))
predicate require-match initial history default))
(identity
(riece-parse-identity string)))
- (unless (string-match (concat "^\\(" riece-channel-regexp "\\|"
- riece-user-regexp "\\)")
- (riece-identity-prefix identity))
- (error "Invalid channel name!"))
+;;; (unless (string-match (concat "^\\(" riece-channel-regexp "\\|"
+;;; riece-user-regexp "\\)")
+;;; (riece-identity-prefix identity))
+;;; (error "Invalid channel name!"))
identity))
(provide 'riece-identity)