* riece-button.el (riece-button-insinuate): Buttonize channel buffers.
authorueno <ueno>
Mon, 13 Oct 2003 05:36:55 +0000 (05:36 +0000)
committerueno <ueno>
Mon, 13 Oct 2003 05:36:55 +0000 (05:36 +0000)
* riece-history.el (riece-channel-list-history-face): New face.
(riece-history-format-channel-list-line): New function.
(riece-history-insinuate): Add ?+ to
riece-channel-list-mark-face-alist; add
riece-history-format-channel-list-line to
riece-format-channel-list-line-functions.

* riece-highlight.el (riece-channel-list-current-face): Arrange colors.

lisp/ChangeLog
lisp/riece-button.el
lisp/riece-highlight.el
lisp/riece-history.el

index d455de5..4590d95 100644 (file)
@@ -1,5 +1,18 @@
 2003-10-13  Daiki Ueno  <ueno@unixuser.org>
 
+       * riece-button.el (riece-button-insinuate): Buttonize channel buffers.
+
+       * riece-history.el (riece-channel-list-history-face): New face.
+       (riece-history-format-channel-list-line): New function.
+       (riece-history-insinuate): Add ?+ to
+       riece-channel-list-mark-face-alist; add
+       riece-history-format-channel-list-line to
+       riece-format-channel-list-line-functions.
+
+       * riece-highlight.el (riece-channel-list-current-face): Arrange colors.
+
+2003-10-13  Daiki Ueno  <ueno@unixuser.org>
+
        * riece-unread.el (riece-unread-after-display-message-function):
        Do nothing when message-target is already in
        riece-unread-channels; call riece-redisplay-buffers.
index f65e7bf..fcf3026 100644 (file)
@@ -60,7 +60,7 @@
       (message "%s" (substitute-command-keys
                     "Type \\[riece-command-join] to join the channel")))))
 
-(defun riece-button-add-channel-buttons (start end length)
+(defun riece-button-add-channel-buttons (start end)
   (save-excursion
     (catch 'done
       (while t
@@ -85,7 +85,7 @@
        (set-buffer riece-channel-list-buffer)
        (let ((inhibit-read-only t)
              buffer-read-only)
-         (riece-button-add-channel-buttons (point-min) (point-max) nil)))))
+         (riece-button-add-channel-buttons (point-min) (point-max))))))
 
 (defun riece-button-requires ()
   '(riece-highlight))
            (lambda ()
              (set-keymap-parent riece-channel-list-mode-map widget-keymap)
              (add-hook 'riece-update-buffer-functions
-                       'riece-button-update-channel-list-buffer t))))
+                       'riece-button-update-channel-list-buffer t)))
+  (add-hook 'riece-dialogue-mode-hook
+           (lambda ()
+             (set-keymap-parent riece-dialogue-mode-map widget-keymap)))
+  (add-hook 'riece-after-insert-functions 'riece-button-add-channel-buttons))
 
 (provide 'riece-button)
 
index a56b4fa..8eefc61 100644 (file)
 (defface riece-channel-list-current-face
   '((((class color)
       (background dark))
-     (:foreground "PaleTurquoise" :underline t))
+     (:foreground "turquoise" :underline t))
     (((class color)
       (background light))
-     (:foreground "ForestGreen" :underline t))
+     (:foreground "SeaGreen" :underline t))
     (t
      ()))
   "Face used for displaying the current channel."
index 65da960..e49b356 100644 (file)
   :type 'integer
   :group 'riece-history)
 
+(defface riece-channel-list-history-face
+  '((((class color)
+      (background dark))
+     (:foreground "PaleTurquoise"))
+    (((class color)
+      (background light))
+     (:foreground "SeaGreen3"))
+    (t
+     (:bold t)))
+  "Face used for displaying history channels."
+  :group 'riece-highlight-faces)
+(defvar riece-channel-list-history-face 'riece-channel-list-history-face)
+
 (defvar riece-channel-history nil)
 
 (defun riece-guess-channel-from-history ()
            index (1+ index)))
     (nreverse result)))
 
+(defun riece-history-format-channel-list-line (index channel)
+  (if (and (not (ring-empty-p riece-channel-history))
+          (riece-identity-equal channel (ring-ref riece-channel-history 0)))
+      (concat (format "%2d:+" index)
+               (riece-format-identity channel)
+               "\n")))
+
 ;;; (defun riece-history-requires ()
 ;;;   (if (memq 'riece-guess riece-addons)
 ;;;       '(riece-guess)))
              (setq riece-channel-history nil)))
   (add-hook 'riece-after-switch-to-channel-functions
            (lambda (last)
-             (ring-insert riece-channel-history last)))
+             (unless (riece-identity-equal last riece-current-channel)
+               (ring-insert riece-channel-history last))))
+  (add-hook 'riece-format-channel-list-line-functions
+           'riece-history-format-channel-list-line)
+  (if (memq 'riece-highlight riece-addons)
+      (setq riece-channel-list-mark-face-alist
+           (cons '(?+ . riece-channel-list-history-face)
+                 riece-channel-list-mark-face-alist)))
 ;;;  (if (memq 'riece-guess riece-addons)
 ;;;      (add-hook 'riece-guess-channel-try-functions
 ;;;            'riece-guess-channel-from-history))