tabbing fixed, menus changed, error reporting improved

original commit: fa36af09b9caab060cd9e8db0592b0218997933e
This commit is contained in:
Mike MacHenry 2003-12-18 22:22:26 +00:00
parent eb40e63cd1
commit 98be3ce323

View File

@ -19,24 +19,22 @@
(mixin (editor:keymap<%>) (tabbable-text<%>) (mixin (editor:keymap<%>) (tabbable-text<%>)
(init-field (init-field
[ahead #f] [ahead void]
[back #f]) [back void])
;; get-keymaps (-> (listof keymap%)) ;; get-keymaps (-> (listof keymap%))
;; the list of keymaps associated with this text ;; the list of keymaps associated with this text
(rename [super-get-keymaps get-keymaps]) (rename [super-get-keymaps get-keymaps])
(define/override (get-keymaps) (define/override (get-keymaps)
(let ([keymap (make-object keymap%)]) (let ([keymap (make-object keymap%)])
(when ahead (send keymap add-function "tab-ahead"
(send keymap add-function "tab-ahead" (lambda (ignored event)
(lambda (ignored event) (ahead)))
(ahead))) (send keymap map-function ":tab" "tab-ahead")
(send keymap map-function ":tab" "tab-ahead")) (send keymap add-function "tab-back"
(when back
(send keymap add-function "tab-back"
(lambda (ignored event) (lambda (ignored event)
(back))) (back)))
(send keymap map-function "s:tab" "tab-back")) (send keymap map-function "s:tab" "tab-back")
(cons keymap (super-get-keymaps)))) (cons keymap (super-get-keymaps))))
(define/public (set-ahead t) (set! ahead t)) (define/public (set-ahead t) (set! ahead t))