* riece.el (riece-dialogue-mode-map): Bind "N" instead of "\C-n"
[riece] / lisp / riece.el
index 2c95c7c..3cf1ef3 100644 (file)
@@ -30,8 +30,6 @@
 (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))
 
@@ -149,10 +147,9 @@ If optional argument SAFE is nil, overwrite previous definitions."
     "j" riece-command-join
     "\C-k" riece-command-kick
     "l" riece-command-list
-    "m" riece-dialogue-enter-message
     "M" riece-command-change-mode
     "n" riece-command-change-nickname
-    "\C-n" riece-command-names
+    "N" riece-command-names
     "o" other-window
     "O" riece-command-open-server
     "C" riece-command-close-server
@@ -257,7 +254,6 @@ If optional argument CONFIRM is non-nil, ask which IRC server to connect."
   (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 ()
@@ -272,12 +268,11 @@ If optional argument CONFIRM is non-nil, ask which IRC server to connect."
        riece-current-channels nil
        riece-current-channel nil
        riece-user-indicator nil
-       riece-channel-indicator "None"
+       riece-long-channel-indicator "None"
        riece-channel-list-indicator "No channel"
        riece-away-indicator "-"
        riece-operator-indicator "-"
-       riece-freeze-indicator "-"
-       riece-channel-history nil)
+       riece-freeze-indicator "-")
   (delete-other-windows)
   (run-hooks 'riece-exit-hook))
 
@@ -303,7 +298,7 @@ For a list of the generic commands type \\[riece-command-generic] ? RET.
           " "
           riece-user-indicator
           " "
-          riece-short-channel-indicator)))
+          riece-channel-indicator)))
   (riece-simplify-mode-line-format)
   (use-local-map riece-command-mode-map)
 
@@ -365,20 +360,22 @@ Instead, these commands are available:
           riece-operator-indicator
           riece-freeze-indicator
           " "
-          riece-channel-indicator))))
+          riece-long-channel-indicator))))
 
 (defun riece-channel-list-mode ()
   "Major mode for displaying channel list.
 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
        (riece-mode-line-buffer-identification '("Riece: "))
        truncate-lines t
        buffer-read-only t)
+  (make-local-hook 'riece-update-buffer-functions)
+  (add-hook 'riece-update-buffer-functions
+           'riece-update-channel-list-buffer nil t)
   (use-local-map riece-channel-list-mode-map)
   (run-hooks 'riece-channel-list-mode-hook))
 
@@ -389,16 +386,18 @@ 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
        (riece-mode-line-buffer-identification
-        '("Riece: " riece-channel-indicator " "))
+        '("Riece: " riece-long-channel-indicator " "))
        truncate-lines t
        buffer-read-only t)
   (if (boundp 'transient-mark-mode)
       (set (make-local-variable 'transient-mark-mode) t))
+  (make-local-hook 'riece-update-buffer-functions)
+  (add-hook 'riece-update-buffer-functions
+           'riece-update-user-list-buffer nil t)
   (use-local-map riece-user-list-mode-map)
   (run-hooks 'riece-user-list-mode-hook))
 
@@ -473,9 +472,12 @@ Instead, these commands are available:
       (setq queue (cdr queue)))
     (if dependencies
        (error "Circular add-on dependency found"))
+    (setq addons (nreverse addons))
     (while addons
       (require (car addons))           ;implicit dependency
       (funcall (intern (concat (symbol-name (car addons)) "-insinuate")))
+      (if riece-debug
+         (message "Add-on %S is loaded" (car addons)))
       (setq addons (cdr addons)))))
 
 (provide 'riece)