* riece-display.el (riece-configure-windows): Select other window
authorueno <ueno>
Fri, 30 May 2003 21:50:40 +0000 (21:50 +0000)
committerueno <ueno>
Fri, 30 May 2003 21:50:40 +0000 (21:50 +0000)
when minibuffer is active.

* riece-commands.el (riece-command-list): New command.
(riece-command-enter-message-as-notice): New command.
* riece.el (riece-command-mode-map): Bind
riece-command-enter-message-as-notice and riece-command-list.

* riece-server.el (riece-close-server): Skip nil when leaving
channels before closing server.

lisp/ChangeLog
lisp/riece-commands.el
lisp/riece-display.el
lisp/riece-server.el
lisp/riece.el

index ff9f01a..4fa7673 100644 (file)
@@ -1,5 +1,18 @@
 2003-05-30  Daiki Ueno  <ueno@unixuser.org>
 
+       * riece-display.el (riece-configure-windows): Select other window
+       when minibuffer is active.
+
+       * riece-commands.el (riece-command-list): New command.
+       (riece-command-enter-message-as-notice): New command.
+       * riece.el (riece-command-mode-map): Bind
+       riece-command-enter-message-as-notice and riece-command-list.
+
+       * riece-server.el (riece-close-server): Skip nil when leaving
+       channels before closing server.
+
+2003-05-30  Daiki Ueno  <ueno@unixuser.org>
+
        * Riece: Version 0.0.2 released.
        * riece-version.el (riece-version-number): Bump up to 0.0.2.
 
index 74ab97f..a70f4dc 100644 (file)
          (yes-or-no-p "Really want to query WHO without argument? "))
       (riece-send-string (format "WHO %s\r\n" pattern))))
 
+(defun riece-command-list (pattern)
+  (interactive
+   (let ((completion-ignore-case t))
+     (list (read-from-minibuffer
+           "Pattern: "
+           (if (and riece-current-channel
+                    (riece-channel-p riece-current-channel))
+               (cons (riece-identity-prefix riece-current-channel)
+                     0))))))
+  (if (or (not (equal pattern ""))
+         (yes-or-no-p "Really want to query LIST without argument? "))
+      (riece-send-string (format "LIST %s\r\n" pattern))))
+
 (defun riece-command-change-mode (channel change)
   (interactive
    (let* ((completion-ignore-case t)
                   (make-string (length group) ?v)
                   (mapconcat #'identity group " ")))))))
 
-(defun riece-command-send-message (message)
+(defun riece-command-send-message (message notice)
   "Send MESSAGE to the current channel."
   (if (equal message "")
       (error "No text to send"))
   (unless riece-current-channel
     (error (substitute-command-keys
            "Type \\[riece-command-join] to join a channel")))
-  (riece-send-string
-   (format "PRIVMSG %s :%s\r\n"
-          (riece-identity-prefix riece-current-channel)
-          message))
-  (riece-own-channel-message message))
+  (if notice
+      (progn
+       (riece-send-string
+        (format "NOTICE %s :%s\r\n"
+                (riece-identity-prefix riece-current-channel)
+                message))
+       (riece-own-channel-message message riece-current-channel 'notice))
+    (riece-send-string
+     (format "PRIVMSG %s :%s\r\n"
+            (riece-identity-prefix riece-current-channel)
+            message))
+    (riece-own-channel-message message)))
 
 (defun riece-command-enter-message ()
   "Send the current line to the current channel."
   (interactive)
   (riece-command-send-message (buffer-substring
                               (riece-line-beginning-position)
-                              (riece-line-end-position)))
+                              (riece-line-end-position))
+                             nil)
+  (let ((next-line-add-newlines t))
+    (next-line 1)))
+
+(defun riece-command-enter-message-as-notice ()
+  "Send the current line to the current channel as NOTICE."
+  (interactive)
+  (riece-command-send-message (buffer-substring
+                              (riece-line-beginning-position)
+                              (riece-line-end-position))
+                             t)
   (let ((next-line-add-newlines t))
     (next-line 1)))
 
index b99f12b..e5a6584 100644 (file)
@@ -52,6 +52,9 @@
              riece-current-channel
              ;; User list buffer is nuisance for private conversation.
              (riece-channel-p riece-current-channel))))
+    ;; Can't expand minibuffer to full frame.
+    (if (eq (selected-window) (minibuffer-window))
+       (other-window 1))
     (delete-other-windows)
     (if (and riece-current-channel
             (or show-user-list riece-channel-list-buffer-mode))
index 4d5b244..859cf1e 100644 (file)
@@ -196,8 +196,9 @@ If optional argument SERVICE is non-nil, open by the service name."
   (let ((riece-overriding-server-name server-name)
        (channels riece-current-channels))
     (while channels
-      (if (equal (riece-identity-server (car channels))
-                server-name)
+      (if (and (car channels)
+              (equal (riece-identity-server (car channels))
+                     server-name))
          (riece-part-channel (car channels)))
       (setq channels (cdr channels)))
     (riece-redisplay-buffers))
index bfa411f..6af3b33 100644 (file)
@@ -166,9 +166,7 @@ If optional argument SAFE is nil, overwrite previous definitions."
 
   (riece-define-keys riece-command-mode-map
     "\r" riece-command-enter-message
-    [tab] riece-command-complete
-    [(meta control c) >] riece-command-push
-    [(meta control c) <] riece-command-pop)
+    [(control return)] riece-command-enter-message-as-notice)
 
   (riece-define-keys (riece-command-map "\C-c" riece-command-mode-map)
     "\177" riece-command-scroll-down
@@ -185,7 +183,7 @@ If optional argument SAFE is nil, overwrite previous definitions."
     "o" riece-command-set-operators
     "\C-p" riece-command-part
     "r" riece-command-configure-windows
-    "v" riece-command-set-voices)
+    "v" riece-command-set-speakers)
   (set-keymap-parent riece-command-map riece-dialogue-mode-map)
 
   (riece-define-keys riece-user-list-mode-map