(riece-connection-timeout): Abolish.
* riece-globals.el (riece-channel-history): New variable.
(riece-last-channel): Abolish.
* riece-display.el: Autoload ring-insert.
(riece-switch-to-channel): Update riece-channel-history.
(riece-switch-to-nearest-channel): Ditto.
* riece-server.el (riece-clear-system): Abolish.
* riece.el (riece-exit): Merge riece-clear-system.
(riece): Initialize riece-channel-history.
+2003-08-27 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-options.el (riece-channel-history-length): New user option.
+ (riece-connection-timeout): Abolish.
+
+ * riece-globals.el (riece-channel-history): New variable.
+ (riece-last-channel): Abolish.
+
+ * riece-display.el: Autoload ring-insert.
+ (riece-switch-to-channel): Update riece-channel-history.
+ (riece-switch-to-nearest-channel): Ditto.
+
+ * riece-server.el (riece-clear-system): Abolish.
+ * riece.el (riece-exit): Merge riece-clear-system.
+ (riece): Initialize riece-channel-history.
+
2003-08-26 Daiki Ueno <ueno@unixuser.org>
* riece-filter.el (riece-sentinel): Suppress status message when
(require 'riece-misc)
(require 'riece-layout)
+(autoload 'ring-insert "ring")
+
(defvar riece-update-buffer-functions
'(riece-update-user-list-buffer
riece-update-channel-list-buffer
(current-buffer)))
(defun riece-switch-to-channel (identity)
- (setq riece-last-channel riece-current-channel
- riece-current-channel identity)
+ (ring-insert riece-channel-history riece-current-channel)
+ (setq riece-current-channel identity)
(run-hooks 'riece-channel-switch-hook))
(defun riece-join-channel (identity)
(setq identity (car pointer)))
(if identity
(riece-switch-to-channel identity)
- (setq riece-last-channel riece-current-channel
- riece-current-channel nil))))
+ (ring-insert riece-channel-history riece-current-channel)
+ (setq riece-current-channel nil))))
(defun riece-part-channel (identity)
(let ((pointer (riece-identity-member identity riece-current-channels)))
"The channel you currently have joined.")
(defvar riece-current-channels nil
"The channels you have currently joined.")
-(defvar riece-last-channel nil
- "The channel you had joined the last time.")
+(defvar riece-channel-history nil
+ "List of channels user has visited.")
(defvar riece-save-variables-are-dirty nil
"Non nil if the variables in `riece-saved-forms' are changed.")
:type 'boolean
:group 'riece-options)
-(defcustom riece-connection-timeout 60
- "Default timeout interval."
- :type 'integer
- :group 'riece-server)
-
(defcustom riece-buffer-dispose-function #'bury-buffer
"Function called after the buffer was disposed."
:type 'function
:type 'function
:group 'riece-options)
+(defcustom riece-channel-history-length 3
+ "Length of riece-channel-history."
+ :type 'integer
+ :group 'riece-options)
+
(provide 'riece-options)
;;; riece-options.el ends here
(put 'riece-server-keyword-bind 'lisp-indent-function 1)
(put 'riece-server-keyword-bind 'edebug-form-spec '(form body))
-(defun riece-clear-system ()
- (while riece-buffer-list
- (if (and (get-buffer (car riece-buffer-list))
- (buffer-live-p (car riece-buffer-list)))
- (funcall riece-buffer-dispose-function (car riece-buffer-list)))
- (setq riece-buffer-list (cdr riece-buffer-list)))
- (setq riece-current-channels nil
- riece-current-channel nil
- riece-user-indicator nil
- riece-channel-indicator "None"
- riece-channel-list-indicator "No channel"
- riece-away-indicator "-"
- riece-operator-indicator "-"
- riece-freeze-indicator "-")
- (delete-other-windows))
-
(defun riece-server-parse-string (string)
"Convert a STRING set as `riece-server' and return a property list."
(when (or (string-match "^\\[\\([^]]+\\)\\]:?\\([0-9]*\\)" string)
(require 'riece-compat)
(require 'riece-commands)
+(autoload 'make-ring "ring")
+
(defvar riece-channel-list-mode-map (make-sparse-keymap))
(defvar riece-user-list-mode-map (make-sparse-keymap))
(riece-redisplay-buffers)
(riece-open-server riece-server "")
(run-hooks 'riece-startup-hook)
+ (setq riece-channel-history (make-ring riece-channel-history-length))
(message "%s" (substitute-command-keys "Type \\[describe-mode] for help")))
(defun riece-exit ()
- (setq riece-server nil)
(if riece-save-variables-are-dirty
(riece-save-variables-files))
- (riece-clear-system)
+ (while riece-buffer-list
+ (if (and (get-buffer (car riece-buffer-list))
+ (buffer-live-p (car riece-buffer-list)))
+ (funcall riece-buffer-dispose-function (car riece-buffer-list)))
+ (setq riece-buffer-list (cdr riece-buffer-list)))
+ (setq riece-server nil
+ riece-current-channels nil
+ riece-current-channel nil
+ riece-user-indicator nil
+ riece-channel-indicator "None"
+ riece-channel-list-indicator "No channel"
+ riece-away-indicator "-"
+ riece-operator-indicator "-"
+ riece-freeze-indicator "-"
+ riece-channel-history nil)
+ (delete-other-windows)
(run-hooks 'riece-exit-hook))
(defun riece-command-mode ()