Hi all,
as it is now, goatee doesn't search for commands by keystroke gesture in the application frame's command table. This means that any command-invoking keystrokes that are entered when goatee is active will be ignored. This seems to affect all applications that have an interactor pane, like beirc.
So, here's a patch that makes goatee search for & execute the command in the current application frame, if there is one.
I'm not sure if this is the right thing to do, but it allows us to use keystroke accelerators in beirc commands, so I'd like it to go in, after goatee-literate people (hi, tim!) have OKed it.
Here's the patch (sorry for the big hunk; the upper part is what I changed; the lower part is emacs cl-indent playing games):
Cheers,
Today, Andreas Fuchs asf@boinkor.net wrote:
Index: Goatee/editing-stream.lisp
Hrmpf. That patch was missing a vital part; here's the complete, corrected patch (which now redisplays the application-frame's panes like the command loop does):
Index: Goatee/editing-stream.lisp =================================================================== RCS file: /project/mcclim/cvsroot/mcclim/Goatee/editing-stream.lisp,v retrieving revision 1.21 diff -u -r1.21 editing-stream.lisp --- Goatee/editing-stream.lisp 22 Feb 2005 14:00:18 -0000 1.21 +++ Goatee/editing-stream.lisp 26 Feb 2006 15:42:44 -0000 @@ -160,7 +160,20 @@ (return-from stream-process-gesture gesture)) (let ((area (area stream)) (snapshot (snapshot stream))) - (execute-gesture-command gesture area *simple-area-gesture-table*) + (unless (execute-gesture-command gesture area *simple-area-gesture-table*) + (when (and (boundp '*application-frame*) (application-frame-p *application-frame*)) + (handler-case + (prog1 + (execute-frame-command *application-frame* + (lookup-keystroke-command-item + gesture + (frame-command-table *application-frame*))) + (redisplay-frame-panes *application-frame*)) + (command-not-present () + ;; gestures with modifiers will send one or several + ;; (modifier down) events. These will probably not be + ;; found, so ignore them. + nil)))) (make-input-editing-stream-snapshot snapshot area) (let ((first-mismatch (mismatch (stream-input-buffer snapshot) (stream-input-buffer stream)))) Index: Goatee/goatee-command.lisp =================================================================== RCS file: /project/mcclim/cvsroot/mcclim/Goatee/goatee-command.lisp,v retrieving revision 1.20 diff -u -r1.20 goatee-command.lisp --- Goatee/goatee-command.lisp 5 Dec 2005 22:40:01 -0000 1.20 +++ Goatee/goatee-command.lisp 26 Feb 2006 15:42:44 -0000 @@ -94,7 +94,8 @@ (funcall command :input-gesture gesture) (setf *last-command* command) (setf (last-command area) command))) - (redisplay-area area))))) + (redisplay-area area) + t))))
;; Utilities for the word movement commands
Cheers,