* riece-ignore.el (riece-ignore-message-filter): Set the
authorueno <ueno>
Tue, 18 May 2004 06:23:45 +0000 (06:23 +0000)
committerueno <ueno>
Tue, 18 May 2004 06:23:45 +0000 (06:23 +0000)
major-mode of riece-ignore-buffer riece-dialogue-mode.

lisp/ChangeLog
lisp/riece-ignore.el

index 6f62326..bd997a4 100644 (file)
@@ -1,5 +1,10 @@
 2004-05-18  Daiki Ueno  <ueno@unixuser.org>
 
+       * riece-ignore.el (riece-ignore-message-filter): Set the
+       major-mode of riece-ignore-buffer riece-dialogue-mode.
+
+2004-05-18  Daiki Ueno  <ueno@unixuser.org>
+
        * riece-ignore.el (riece-ignore-buffer-name): New user option.
        (riece-ignore-discard-message): Fixed custom spec to follow the
        logging option.
index 9a455e6..6b3bbaf 100644 (file)
@@ -96,12 +96,18 @@ Otherwise, they are not removed from IRC buffers, but are hidden with
       (if riece-ignore-discard-message
          (when (eq riece-ignore-discard-message 'log)
            (unless riece-ignore-buffer
-             (setq riece-ignore-buffer
-                   (riece-get-buffer-create riece-ignore-buffer-name)))
+             (with-current-buffer (setq riece-ignore-buffer
+                                        (riece-get-buffer-create
+                                         riece-ignore-buffer-name
+                                         'riece-dialogue-mode))
+               (riece-dialogue-mode)))
            (save-excursion
              (set-buffer riece-ignore-buffer)
              (goto-char (point-max))
-             (insert (riece-format-message message t))))
+             (let ((inhibit-read-only t)
+                   buffer-read-only)
+               (insert (concat (format-time-string "%H:%M") " "
+                               (riece-format-message message t))))))
        (put-text-property 0 (length (riece-message-text message))
                           'invisible 'riece-ignore
                           (riece-message-text message))