2003-08-25 Daiki Ueno <ueno@unixuser.org>
+ * riece-unread.el (riece-unread-update-channel-list-buffer):
+ Restore channel marks if exist.
+
+ * riece-naming.el (riece-naming-assert-join): Don't set
+ riece-redisplay-buffers.
+ (riece-naming-assert-part): Ditto.
+ (riece-naming-assert-rename): Ditto.
+
+ * riece-display.el (riece-redisplay-buffers): Abolish.
+ (riece-update-user-list-buffer): Don't check
+ riece-redisplay-buffers.
+ (riece-update-channel-list-buffer): Ditto; prefix "*" at the
+ beginning of the current channel.
+ (riece-switch-to-channel): Don't set riece-redisplay-buffers.
+ (riece-join-channel): Ditto.
+ (riece-part-channel): Ditto.
+
+2003-08-25 Daiki Ueno <ueno@unixuser.org>
+
* riece-display.el (riece-join-channel): Parse non-nil elements in
riece-default-channel-binding.
riece-update-short-channel-indicator
riece-update-channel-list-indicator))
-(defvar riece-redisplay-buffer nil
- "Non-nil means the buffer needs to be updated.
-Local to the buffers.")
-
(defun riece-update-user-list-buffer ()
(save-excursion
(set-buffer riece-user-list-buffer)
- (when (and riece-redisplay-buffer
- riece-current-channel
+ (when (and riece-current-channel
(riece-channel-p (riece-identity-prefix riece-current-channel)))
(let (users operators speakers)
(with-current-buffer (process-buffer (riece-server-process
(if (member (car users) speakers)
(insert "+" (car users) "\n")
(insert " " (car users) "\n")))
- (setq users (cdr users)))))
- (setq riece-redisplay-buffer nil))))
+ (setq users (cdr users))))))))
(defun riece-update-channel-list-buffer ()
(save-excursion
(set-buffer riece-channel-list-buffer)
- (when riece-redisplay-buffer
- (let ((inhibit-read-only t)
- buffer-read-only
- (index 1)
- (channels riece-current-channels))
- (erase-buffer)
- (while channels
- (if (car channels)
- (let ((point (point)))
- (insert (format "%2d: %s\n" index
+ (let ((inhibit-read-only t)
+ buffer-read-only
+ (index 1)
+ (channels riece-current-channels))
+ (erase-buffer)
+ (while channels
+ (if (car channels)
+ (let ((point (point)))
+ (insert (format "%2d:%c%s\n" index
+ (if (riece-identity-equal
+ (car channels)
+ riece-current-channel)
+ ?*
+ ?\ )
(riece-format-identity (car channels))))
- (put-text-property point (point) 'riece-identity
- (car channels))))
- (setq index (1+ index)
- channels (cdr channels))))
- (setq riece-redisplay-buffer nil))))
+ (put-text-property point (point) 'riece-identity
+ (car channels))))
+ (setq index (1+ index)
+ channels (cdr channels))))))
(defun riece-update-channel-indicator ()
(setq riece-channel-indicator
(defun riece-switch-to-channel (identity)
(setq riece-last-channel riece-current-channel
riece-current-channel identity)
- (with-current-buffer riece-user-list-buffer
- (setq riece-redisplay-buffer t))
(run-hooks 'riece-channel-switch-hook))
(defun riece-join-channel (identity)
(if channel
(riece-parse-identity channel)))
riece-default-channel-binding)))
- (riece-channel-buffer-create identity)
- (with-current-buffer riece-channel-list-buffer
- (setq riece-redisplay-buffer t))))
+ (riece-channel-buffer-create identity)))
(defun riece-switch-to-nearest-channel (pointer)
(let ((start riece-current-channels)
(if pointer
(setcar pointer nil))
(if (riece-identity-equal identity riece-current-channel)
- (riece-switch-to-nearest-channel pointer))
- (with-current-buffer riece-channel-list-buffer
- (setq riece-redisplay-buffer t))))
+ (riece-switch-to-nearest-channel pointer))))
(defun riece-redisplay-buffers (&optional force)
(riece-update-buffers)
(let ((channel-identity (riece-make-identity channel-name
riece-server-name)))
(riece-join-channel channel-identity)
- (riece-switch-to-channel channel-identity))
- (if (and riece-current-channel
- (riece-identity-equal (riece-make-identity channel-name
- riece-server-name)
- riece-current-channel))
- (with-current-buffer riece-user-list-buffer
- (setq riece-redisplay-buffer t)))))
+ (riece-switch-to-channel channel-identity))))
(defun riece-naming-assert-part (user-name channel-name)
(riece-user-toggle-channel user-name channel-name nil)
(riece-channel-toggle-speaker channel-name user-name nil)
(if (riece-identity-equal-no-server user-name riece-real-nickname)
(riece-part-channel (riece-make-identity channel-name
- riece-server-name))
- (if (and riece-current-channel
- (riece-identity-equal (riece-make-identity channel-name
- riece-server-name)
- riece-current-channel))
- (with-current-buffer riece-user-list-buffer
- (setq riece-redisplay-buffer t)))))
+ riece-server-name))))
(defun riece-naming-assert-rename (old-name new-name)
(if (riece-identity-equal-no-server old-name riece-real-nickname)
pointer (member old-name users))
(if pointer
(setcar pointer new-name))
- (if (and riece-current-channel
- (riece-identity-equal (riece-make-identity (car channels)
- riece-server-name)
- riece-current-channel))
- (with-current-buffer riece-user-list-buffer
- (setq riece-redisplay-buffer t)))
(setq channels (cdr channels)))
(riece-rename-user old-name new-name)))