* riece-options.el (riece-addons): Add riece-button.
authorueno <ueno>
Mon, 13 Oct 2003 03:40:08 +0000 (03:40 +0000)
committerueno <ueno>
Mon, 13 Oct 2003 03:40:08 +0000 (03:40 +0000)
* riece-display.el (riece-update-channel-list-buffer): Avoid to
use format to preserve 'riece-identity property.

* riece-unread.el (riece-unread-update-channel-list-buffer):
Simplified.
(riece-unread-insinuate): Delay adding
riece-unread-update-channel-list-buffer to
riece-update-buffer-functions.

* riece-button.el: New add-on.
* COMPILE (riece-modules): Add riece-button.
* Makefile.am (EXTRA_DIST): Add riece-button.el

lisp/COMPILE
lisp/ChangeLog
lisp/riece-display.el
lisp/riece-options.el
lisp/riece-unread.el
lisp/riece.el

index 5c796d0..2cbc846 100644 (file)
@@ -52,7 +52,8 @@
                riece-alias
                riece-skk-kakutei
                riece-guess
-               riece-history))))
+               riece-history
+               riece-button))))
 
 (defun riece-compile-modules (modules)
   (let ((load-path (cons nil load-path)))
index 40e9934..718ea81 100644 (file)
@@ -1,3 +1,20 @@
+2003-10-13  Daiki Ueno  <ueno@unixuser.org>
+
+       * riece-options.el (riece-addons): Add riece-button.
+
+       * riece-display.el (riece-update-channel-list-buffer): Avoid to
+       use format to preserve 'riece-identity property.
+
+       * riece-unread.el (riece-unread-update-channel-list-buffer):
+       Simplified.
+       (riece-unread-insinuate): Delay adding
+       riece-unread-update-channel-list-buffer to
+       riece-update-buffer-functions.
+
+       * riece-button.el: New add-on.
+       * COMPILE (riece-modules): Add riece-button.
+       * Makefile.am (EXTRA_DIST): Add riece-button.el
+
 2003-10-08  Daiki Ueno  <ueno@unixuser.org>
 
        * riece-server.el (riece-close-server-process): 
index 62d2125..d29f785 100644 (file)
          (while channels
            (if (car channels)
                (let ((point (point)))
-                 (insert (format "%2d: %s\n" index
-                                 (riece-format-identity (car channels))))
-                 (put-text-property point (point) 'riece-identity
-                                    (car channels))))
+                 (insert (format "%2d: " index)
+                         (riece-format-identity (car channels))
+                         "\n")))
            (setq index (1+ index)
                  channels (cdr channels)))))))
 
index 44dfc92..0872933 100644 (file)
@@ -105,7 +105,8 @@ way is to put Riece variables on .emacs or file loaded from there."
                          riece-guess
                          riece-unread
                          riece-history
-                         riece-url)
+                         riece-url
+                         riece-button)
   "Add-ons insinuated into Riece."
   :type '(repeat symbol)
   :group 'riece-options)
index 1056ee2..9e89695 100644 (file)
              buffer-read-only)
          (goto-char (point-min))
          (while (not (eobp))
-           (if (looking-at "\\( ?[0-9]+:\\)\\(.\\)\\(.+\\)")
-               (let ((channel (save-match-data
-                                (riece-parse-identity (match-string 3)))))
+           (if (looking-at "\\( ?[0-9]+:\\)\\(.\\)")
+               (let ((channel (get-text-property (match-end 0)
+                                                 'riece-identity)))
                  (replace-match
                   (concat "\\1"
-                          (if (member channel riece-unread-channels)
+                          (if (riece-identity-member channel
+                                                     riece-unread-channels)
                               "!"
-                            "\\2")
-                          "\\3"))))
+                            "\\2")))))
            (forward-line))))))
       
 (defun riece-unread-switch-to-channel ()
            'riece-unread-after-display-message-function)
   (add-hook 'riece-after-switch-to-channel-functions
            'riece-unread-after-switch-to-channel-function)
-  (add-hook 'riece-update-buffer-functions
-           'riece-unread-update-channel-list-buffer t)
+  (add-hook 'riece-channel-list-mode-hook
+           (lambda ()
+             (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
index f4077f6..0e67411 100644 (file)
@@ -368,7 +368,6 @@ Instead, these commands are available:
 All normal editing commands are turned off."
   (kill-all-local-variables)
   (buffer-disable-undo)
-  (make-local-variable 'riece-redisplay-buffer)
   (setq major-mode 'riece-channel-list-mode
         mode-name "Channels"
        mode-line-buffer-identification
@@ -385,7 +384,6 @@ Instead, these commands are available:
 \\{riece-user-list-mode-map}"
   (kill-all-local-variables)
   (buffer-disable-undo)
-  (make-local-variable 'riece-redisplay-buffer)
   (setq major-mode 'riece-user-list-mode
         mode-name "User list"
        mode-line-buffer-identification