X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Friece-unread.el;h=8f42ddcfe10ca52d6cfa773e21b2db3a9c63d768;hb=dff1257be3180cbc2add200fca1113c995dd72b1;hp=66168725819675f7c483386012e4a61fb852e3aa;hpb=a6249119739da36eb2a5af62fef86d1255cf0968;p=riece diff --git a/lisp/riece-unread.el b/lisp/riece-unread.el index 6616872..8f42ddc 100644 --- a/lisp/riece-unread.el +++ b/lisp/riece-unread.el @@ -31,7 +31,8 @@ ;;; Code: -(eval-when-compile (require 'riece-message)) +(require 'riece-message) +(require 'riece-commands) (defvar riece-unread-channels nil) @@ -59,7 +60,8 @@ (goto-char (point-min)) (while (not (eobp)) (if (looking-at "\\( ?[0-9]+:\\)\\([ !]\\)\\(.+\\)") - (let ((channel (match-string 3))) + (let ((channel (save-match-data + (riece-parse-identity (match-string 3))))) (replace-match (concat "\\1" (if (member channel riece-unread-channels) @@ -83,8 +85,8 @@ 'riece-unread-display-message-function) (add-hook 'riece-channel-switch-hook 'riece-unread-channel-switch-hook) - (add-hook 'riece-update-buffers-hook - 'riece-unread-update-channel-list-buffer) + (add-hook 'riece-update-buffer-functions + 'riece-unread-update-channel-list-buffer t) (define-key riece-command-mode-map "\C-c\C-u" 'riece-unread-switch-to-channel) (define-key riece-dialogue-mode-map