* riece-log.el (riece-log-requires): New function.
authorbg66 <bg66>
Wed, 3 Dec 2003 05:40:13 +0000 (05:40 +0000)
committerbg66 <bg66>
Wed, 3 Dec 2003 05:40:13 +0000 (05:40 +0000)
(riece-log-flashback): Revert 'riece-identity property and button.

lisp/ChangeLog
lisp/riece-log.el

index e31cad8..1536fd3 100644 (file)
@@ -1,3 +1,8 @@
+2003-12-03  OHASHI Akira  <bg66@koka-in.org>
+
+       * riece-log.el (riece-log-requires): New function.
+       (riece-log-flashback): Revert 'riece-identity property and button.
+
 2003-11-28  OHASHI Akira  <bg66@koka-in.org>
 
        * riece-unread.el (riece-unread-after-display-message-function):
index caa1e9c..bba2e17 100644 (file)
@@ -30,7 +30,8 @@
 
 ;;; Code:
 
-(eval-when-compile (require 'riece-message))
+(eval-when-compile (require 'riece-message)
+                  (require 'riece-button))
 
 (defgroup riece-log nil
   "Save irc log"
@@ -113,6 +114,16 @@ If integer, flash back only this line numbers. t means all lines."
          (let (buffer-read-only)
            (goto-char (point-max))
            (insert string)
+           (goto-char (point-min))
+           (while (re-search-forward
+                   "^[0-9][0-9]:[0-9][0-9] [<>]\\([^<>]+\\)[<>] " nil t)
+             (put-text-property (match-beginning 1) (match-end 1)
+                                'riece-identity
+                                (riece-make-identity
+                                 (match-string-no-properties 1)
+                                 (riece-identity-server identity))))
+           (if (memq 'riece-button riece-addons)
+               (riece-button-update-buffer))
            (goto-char (point-max))
            (set-window-point (get-buffer-window (current-buffer))
                              (point))))))))
@@ -123,6 +134,10 @@ If integer, flash back only this line numbers. t means all lines."
       (find-file (riece-log-get-directory channel))
     (find-file riece-log-directory)))
 
+(defun riece-log-requires ()
+  (if (memq 'riece-button riece-addons)
+      '(riece-button)))
+
 (defun riece-log-insinuate ()
   ;; FIXME: Use `riece-after-insert-functions' for trapping change,
   ;; notice, wallops and so on. But must add argument.