[beirc-cvs] CVS update: beirc/application.lisp beirc/message-display.lisp beirc/presentations.lisp

Andreas Fuchs afuchs at common-lisp.net
Wed Sep 28 19:33:29 UTC 2005


Update of /project/beirc/cvsroot/beirc
In directory common-lisp.net:/tmp/cvs-serv711

Modified Files:
	application.lisp message-display.lisp presentations.lisp 
Log Message:
Fix accepting 'mumble when entering /command args; some style issues; fix
accepting 'nickname when in non-channel buffers.

Date: Wed Sep 28 21:33:28 2005
Author: afuchs

Index: beirc/application.lisp
diff -u beirc/application.lisp:1.14 beirc/application.lisp:1.15
--- beirc/application.lisp:1.14	Tue Sep 27 22:53:41 2005
+++ beirc/application.lisp	Wed Sep 28 21:33:28 2005
@@ -547,8 +547,7 @@
         (let ((c (clim:read-gesture :stream stream :peek-p t)))
           (cond ((eql c #\/)
                  (clim:read-gesture :stream stream)
-                 (clim:accept 'clim:command :stream stream
-                              :prompt nil))
+                 (clim:accept 'clim:command :stream stream :prompt nil))
                 (t
                  (list 'com-say (accept 'mumble :prompt nil :stream stream))))))
     (window-clear stream)))


Index: beirc/message-display.lisp
diff -u beirc/message-display.lisp:1.20 beirc/message-display.lisp:1.21
--- beirc/message-display.lisp:1.20	Mon Sep 26 12:52:05 2005
+++ beirc/message-display.lisp	Wed Sep 28 21:33:28 2005
@@ -230,7 +230,7 @@
                       ((format t "   "))
                       ((with-drawing-options (*standard-output* :ink +gray33+ :text-size :small)
                          (present (second (irc:arguments message)) 'nickname)
-                         (format-message* (format nil "is away: ~A" (irc:trailing-argument message))
+                         (format-message* (format nil " is away: ~A" (irc:trailing-argument message))
                                           :start-length (length (second (irc:arguments message))))))))
 
 (defmethod print-message ((message irc:irc-rpl_whoisidentified-message) receiver)


Index: beirc/presentations.lisp
diff -u beirc/presentations.lisp:1.4 beirc/presentations.lisp:1.5
--- beirc/presentations.lisp:1.4	Tue Sep 27 22:58:41 2005
+++ beirc/presentations.lisp	Wed Sep 28 21:33:28 2005
@@ -33,19 +33,20 @@
                    (concatenate 'string prefix word " "))))
       (multiple-value-bind (string success object nmatches possibilities)
           (complete-from-possibilities word
-                                       (if (not (null (current-channel)))
-                                           (hash-alist
-                                            (irc:users
-                                             (irc:find-channel
-                                              (current-connection *application-frame*)
-                                              (current-channel))))
-                                           nil)
+                                       (let ((channel (and
+                                                       (current-channel)
+                                                       (irc:find-channel
+                                                        (current-connection *application-frame*)
+                                                        (current-channel)))))
+                                        (if (not (null channel))
+                                            (hash-alist (irc:users channel))
+                                            nil))
                                        '()
                                        :action mode
                                        :value-key #'cdr)
-        (values (if (null object)
-                    (prefixify string)
-                    (prefixify (irc:nickname object)))
+        (values (prefixify (if (null object)
+                               string
+                               (irc:nickname object)))
                 success object nmatches (mapcar (lambda (possibility)
                                                   (cons (prefixify (car possibility))
                                                         (cdr possibility)))
@@ -59,18 +60,22 @@
   (present (irc:nickname object) 'nickname :stream stream))
 
 (define-presentation-method accept ((type mumble) *standard-input* (view textual-view) &key)
-  (let ((*completion-gestures* '(#\Tab)))
+  (with-delimiter-gestures (nil :override t)
+    (let ((*completion-gestures* '(#\Tab)))
       (nth-value 2
                  (complete-input *standard-input* 'nickname-completer
                                  #+(or):possibility-printer #+(or) 'nickname-competion-printer
-                                 :allow-any-input t))))
+                                 :allow-any-input t
+                                 :partial-completers '())))))
 
 ;;; nicknames
 
 (define-presentation-method accept ((type nickname) *standard-input* (view textual-view) &key)
   (with-slots (connection nick) *application-frame*
-    (let ((users (unless (null (current-channel))
-                   (mapcar #'car (hash-alist (irc:users (irc:find-channel connection (current-channel))))))))
+    (let ((users (let ((channel (and (not (null (current-channel)))
+                                     (irc:find-channel connection (current-channel)))))
+                   (if (not (null channel))
+                     (mapcar #'car (hash-alist (irc:users (irc:find-channel connection (current-channel)))))))))
       (accept `(or (member , at users) string) :prompt nil))))
 
 (define-presentation-method accept ((type ignored-nickname) *standard-input* (view textual-view) &key)




More information about the Beirc-cvs mailing list