From: ueno Date: Mon, 13 Oct 2003 03:40:08 +0000 (+0000) Subject: * riece-options.el (riece-addons): Add riece-button. X-Git-Tag: riece-0_1_3~11 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=fab6c24e623671047b344382eb87754be3caf984;p=elisp%2Friece.git * 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 --- diff --git a/lisp/COMPILE b/lisp/COMPILE index 5c796d0..2cbc846 100644 --- a/lisp/COMPILE +++ b/lisp/COMPILE @@ -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))) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 40e9934..718ea81 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,20 @@ +2003-10-13 Daiki Ueno + + * 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 * riece-server.el (riece-close-server-process): diff --git a/lisp/riece-display.el b/lisp/riece-display.el index 62d2125..d29f785 100644 --- a/lisp/riece-display.el +++ b/lisp/riece-display.el @@ -80,10 +80,9 @@ (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))))))) diff --git a/lisp/riece-options.el b/lisp/riece-options.el index 44dfc92..0872933 100644 --- a/lisp/riece-options.el +++ b/lisp/riece-options.el @@ -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) diff --git a/lisp/riece-unread.el b/lisp/riece-unread.el index 1056ee2..9e89695 100644 --- a/lisp/riece-unread.el +++ b/lisp/riece-unread.el @@ -81,15 +81,15 @@ 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 () @@ -118,8 +118,10 @@ '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 diff --git a/lisp/riece.el b/lisp/riece.el index f4077f6..0e67411 100644 --- a/lisp/riece.el +++ b/lisp/riece.el @@ -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