+;;; @ unread mark
+;;;
+(defun liece-emacs-unread-mark (chnl)
+ (if liece-display-unread-mark
+ (with-current-buffer liece-channel-list-buffer
+ (let ((buffer-read-only nil))
+ (goto-char (point-min))
+ (when (re-search-forward (concat "^ ?[0-9]+: " chnl "$") nil t)
+ (goto-char (match-end 0))
+ (insert (concat " " liece-emacs-unread-character)))))))
+
+(defun liece-emacs-read-mark (chnl)
+ (if liece-display-unread-mark
+ (with-current-buffer liece-channel-list-buffer
+ (let ((buffer-read-only nil))
+ (goto-char (point-min))
+ (when (re-search-forward
+ (concat "^ ?[0-9]+: " chnl " "
+ liece-emacs-unread-character "$") nil t)
+ (goto-char (- (match-end 0) 2))
+ (delete-char 2))))))
+
+(defun liece-emacs-redisplay-unread-mark ()
+ (if liece-display-unread-mark
+ (let ((chnl))
+ (dolist (chnl liece-channel-unread-list)
+ (liece-emacs-unread-mark chnl)))))
+