Update of /project/beirc/cvsroot/beirc In directory clnet:/tmp/cvs-serv21100
Modified Files: presentations.lisp application.lisp Log Message: Make com-close accept a list of receivers; default to the current one.
Also, add an explanatory comment about multiple RET hitting to completion.
--- /project/beirc/cvsroot/beirc/presentations.lisp 2006/03/16 20:44:56 1.11 +++ /project/beirc/cvsroot/beirc/presentations.lisp 2006/03/21 22:45:03 1.12 @@ -63,14 +63,18 @@ (declare (ignore string)) (present (irc:nickname object) 'nickname :stream stream))
+ +;; FIXME: complete-input here and (accept 'command) in +;; read-frame-command means that every command that takes a 'mumble +;; argument must be terminated by hitting RET twice. ugh. (define-presentation-method accept ((type mumble) *standard-input* (view textual-view) &key) (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 - :partial-completers '()))))) + . (let ((*completion-gestures* '(#\Tab))) + (nth-value 2 + (complete-input *standard-input* 'nickname-completer + #+(or):possibility-printer #+(or) 'nickname-competion-printer + :allow-any-input t + :partial-completers '())))))
;;; nicknames
--- /project/beirc/cvsroot/beirc/application.lisp 2006/03/21 15:23:35 1.66 +++ /project/beirc/cvsroot/beirc/application.lisp 2006/03/21 22:45:03 1.67 @@ -411,17 +411,18 @@ (define-window-switcher com-window-next (:next :control) 1 (constantly t)) (define-window-switcher com-window-previous (:prior :control) -1 (constantly t))))
-(define-beirc-command (com-close :name t) ((receiver 'receiver :prompt "tab")) - (let* ((connection (connection receiver)) - (channel (irc:find-channel connection (title receiver)))) - (cond - ((member receiver (server-receivers *application-frame*) :key #'cdr) - (disconnect connection *application-frame* "Client Quit") - (setf (slot-value *application-frame* 'server-receivers) - (delete receiver (server-receivers *application-frame*) :key #'cdr))) - (channel - (irc:part connection channel)))) - (remove-receiver receiver *application-frame*)) +(define-beirc-command (com-close :name t) ((receivers '(sequence receiver) :prompt "tab" :default (list (current-receiver *application-frame*)))) + (dolist (receiver receivers) + (let* ((connection (connection receiver)) + (channel (irc:find-channel connection (title receiver)))) + (cond + ((member receiver (server-receivers *application-frame*) :key #'cdr) + (disconnect connection *application-frame* "Client Quit") + (setf (slot-value *application-frame* 'server-receivers) + (delete receiver (server-receivers *application-frame*) :key #'cdr))) + (channel + (irc:part connection channel)))) + (remove-receiver receiver *application-frame*)))
(macrolet ((define-scroller-command ((com-name keystroke) (top-var bot-var) next-pos-form &optional fallback-position) `(define-beirc-command (,com-name :name t :keystroke ,keystroke) ()