riece-freeze-indicator on the modeline of the command buffer.
(riece-dialogue-mode): Make riece-freeze-indicator local to the
buffer whose major-mode is derived from riece-dialogue-mode.
* riece-display.el: Add autoload setting for derived-mode-class.
(riece-update-status-indicators): Check riece-freeze flag for each
buffer visible in the selected frame.
* riece-commands.el: Add autoload setting for derived-mode-class.
(riece-command-toggle-freeze): Don't switch to the channel buffer
if major-mode of the current buffer is derived from
riece-dialogue-mode. Which allows to lock "*Others*" buffer.
(riece-command-toggle-own-freeze): Ditto.
* riece-globals.el (riece-freeze): Fix doc.
(riece-freeze-indicator): Add doc.
(riece-channel-indicator): Fix doc.
(riece-long-channel-indicator): Fix doc.
(riece-channel-list-indicator): Fix doc.
(riece-user-indicator): Fix doc.
(riece-away-indicator): Add doc.
(riece-operator-indicator): Add doc.
+2004-03-28 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-command-mode): Don't display
+ riece-freeze-indicator on the modeline of the command buffer.
+ (riece-dialogue-mode): Make riece-freeze-indicator local to the
+ buffer whose major-mode is derived from riece-dialogue-mode.
+
+ * riece-display.el: Add autoload setting for derived-mode-class.
+ (riece-update-status-indicators): Check riece-freeze flag for each
+ buffer visible in the selected frame.
+
+ * riece-commands.el: Add autoload setting for derived-mode-class.
+ (riece-command-toggle-freeze): Don't switch to the channel buffer
+ if major-mode of the current buffer is derived from
+ riece-dialogue-mode. Which allows to lock "*Others*" buffer.
+ (riece-command-toggle-own-freeze): Ditto.
+
+ * riece-globals.el (riece-freeze): Fix doc.
+ (riece-freeze-indicator): Add doc.
+ (riece-channel-indicator): Fix doc.
+ (riece-long-channel-indicator): Fix doc.
+ (riece-channel-list-indicator): Fix doc.
+ (riece-user-indicator): Fix doc.
+ (riece-away-indicator): Add doc.
+ (riece-operator-indicator): Add doc.
+
2004-03-24 Daiki Ueno <ueno@unixuser.org>
* riece-unread.el (riece-unread-after-display-message-function):
(require 'riece-identity)
(require 'riece-message)
+(autoload 'derived-mode-class "derived")
+
;;; Channel movement:
(defun riece-command-switch-to-channel (channel)
(interactive (list (riece-completing-read-identity
"Prevent automatic scrolling of the dialogue window.
If prefix argument ARG is non-nil, toggle frozen status."
(interactive "P")
- (with-current-buffer (if (and riece-channel-buffer-mode
- riece-channel-buffer)
- riece-channel-buffer
- riece-dialogue-buffer)
+ (with-current-buffer (if (eq (derived-mode-class major-mode)
+ 'riece-dialogue-mode)
+ (current-buffer)
+ (if (and riece-channel-buffer-mode
+ riece-channel-buffer)
+ riece-channel-buffer
+ riece-dialogue-buffer))
(setq riece-freeze (if arg
(< 0 (prefix-numeric-value arg))
(not riece-freeze)))
The difference from `riece-command-freeze' is that your messages are hidden.
If prefix argument ARG is non-nil, toggle frozen status."
(interactive "P")
- (with-current-buffer (if (and riece-channel-buffer-mode
- riece-channel-buffer)
- riece-channel-buffer
- riece-dialogue-buffer)
+ (with-current-buffer (if (eq (derived-mode-class major-mode)
+ 'riece-dialogue-mode)
+ (current-buffer)
+ (if (and riece-channel-buffer-mode
+ riece-channel-buffer)
+ riece-channel-buffer
+ riece-dialogue-buffer))
(if (if arg
(< 0 (prefix-numeric-value arg))
(not (eq riece-freeze 'own)))
(setq riece-freeze 'own)
- (setq riece-freeze nil)))
- (riece-emit-signal 'buffer-freeze-changed
- (current-buffer) riece-freeze))
+ (setq riece-freeze nil))
+ (riece-emit-signal 'buffer-freeze-changed
+ (current-buffer) riece-freeze)))
(eval-when-compile
(autoload 'riece-exit "riece"))
(require 'riece-layout)
(require 'riece-signal)
+(autoload 'derived-mode-class "derived")
+
(defvar riece-channel-buffer-format "*Channel:%s*"
"Format of channel message buffer.")
(defvar riece-channel-buffer-alist nil
"O"
"-")
riece-user-indicator riece-real-nickname))))
- (setq riece-freeze-indicator
- (with-current-buffer (if (and riece-channel-buffer-mode
- riece-channel-buffer)
- riece-channel-buffer
- riece-dialogue-buffer)
- (if (eq riece-freeze 'own)
- "f"
- (if riece-freeze
- "F"
- "-")))))
+ (walk-windows
+ (lambda (window)
+ (with-current-buffer (window-buffer window)
+ (if (eq (derived-mode-class major-mode)
+ 'riece-dialogue-mode)
+ (setq riece-freeze-indicator
+ (if (eq riece-freeze 'own)
+ "f"
+ (if riece-freeze
+ "F"
+ "-"))))))))
(defun riece-update-buffers (&optional buffers)
(unless buffers
;;; Variables local to the channel buffers:
(defvar riece-freeze nil
- "If t, channel window is not scrolled.
-If 'own, channel window is not scrolled until you speak.
+ "If t, channel window is locked and will not be scrolled.
+If 'own, channel window is locked until the user begins to speak.
+Local to the channel buffers.")
+
+(defvar riece-freeze-indicator nil
+ "String displayed on the modeline to allow the user to tell if the
+channel buffer is locked.
Local to the channel buffers.")
;;; Modeline indicators:
(defvar riece-channel-indicator "None"
- "A modeline indicator of the current channel.")
+ "String displayed on the modeline to indicate the current channel.")
(defvar riece-long-channel-indicator "None"
- "A modeline indicator of the current channel.")
+ "String displayed on the modeline to indicate the current channel.
+Generally, this string will contain more information than
+riece-channel-indicator.")
(defvar riece-channel-list-indicator "No channel"
- "A modeline indicator of the current joined channels.")
-(defvar riece-user-indicator nil)
-
-(defvar riece-away-indicator "-")
-(defvar riece-operator-indicator "-")
-(defvar riece-freeze-indicator "-")
+ "String displayed on the modeline to show the joined channels.")
+(defvar riece-user-indicator nil
+ "String displayed on the modeline to show the current nickname.")
+
+(defvar riece-away-indicator "-"
+ "String displayed on the modeline to allow the user to tell if the
+user is away.")
+(defvar riece-operator-indicator "-"
+ "String displayed on the modeline to allow the user to tell if the
+user is a operator.")
;;; Buffers:
(defvar riece-command-buffer nil
'("Riece: "
riece-away-indicator
riece-operator-indicator
- riece-freeze-indicator
" "
riece-user-indicator
" "
\\{riece-dialogue-mode-map}"
(kill-all-local-variables)
(make-local-variable 'riece-freeze)
+ (make-local-variable 'riece-freeze-indicator)
(setq riece-freeze riece-default-freeze
riece-away-indicator "-"
riece-operator-indicator "-"