Normalize modeline indicator.
* riece-xemacs.el (riece-normalize-modeline-indicator): New alias.
* riece-emacs.el (riece-normalize-modeline-string): New function.
(riece-normalize-modeline-string-1): New function.
2004-12-13 Daiki Ueno <ueno@unixuser.org>
+ * riece-display.el (riece-update-channel-list-indicator):
+ Normalize modeline indicator.
+
+ * riece-xemacs.el (riece-normalize-modeline-indicator): New alias.
+ * riece-emacs.el (riece-normalize-modeline-string): New function.
+ (riece-normalize-modeline-string-1): New function.
+
+2004-12-13 Daiki Ueno <ueno@unixuser.org>
+
* test/Makefile.am (EXTRA_DIST): Add test-riece.el.
* test/test-riece.el: New test cases.
(while pointer
(if (cdr pointer)
(setcdr pointer (cons "," (cdr pointer))))
- (setq pointer (cdr (cdr pointer)))))
+ (setq pointer (cdr (cdr pointer))))
+ (setq riece-channel-list-indicator
+ (riece-normalize-modeline-string riece-channel-list-indicator)))
(setq riece-channel-list-indicator "No channel")))
(defun riece-update-status-indicators ()
(add-text-properties 0 (length string) properties string)
string)
+(defun riece-normalize-modeline-string-1 (string)
+ (if string
+ (if (listp (car string))
+ (cons (car (car string)) (riece-normalize-modeline-string-1
+ (append (cdr (car string)) (cdr string))))
+ (cons (car string) (riece-normalize-modeline-string-1
+ (cdr string))))))
+
+(defun riece-normalize-modeline-string (string)
+ (if (listp string)
+ (apply #'concat (riece-normalize-modeline-string-1 string))
+ string))
+
(defun riece-put-text-property-nonsticky (start end prop value
&optional object)
(add-text-properties start end
(set-extent-properties extent properties)
(cons extent string)))
+(defalias 'riece-normalize-modeline-indicator 'identity)
+
(defalias 'riece-facep 'find-face)
(defun riece-put-text-property-nonsticky (start end prop value