-"The text editing commands are standard; see " { $link "gadgets-editors-commands" } "."
-$nl
-"If you want to add support for Emacs-style text entry, specifically the following:"
-$nl
-{ $table
- { "Ctrl-b" "Move cursor to previous character" }
- { "Ctrl-f" "Move cursor to next character" }
- { "Ctrl-a" "Move cursor to start of line" }
- { "Ctrl-e" "Move cursor to end of line" }
- { "Ctrl-u" "Delete to start of line" }
- { "Ctrl-k" "Delete to end of line" }
- { "Ctrl-p" "Move cursor to previous line" }
- { "Ctrl-n" "Move cursor to next line" }
-}
-$nl
-"Then you can run the following code, or add it to your " { $link ".factor-rc" } "."
-$nl
-{ $code
- "USING: accessors assocs kernel sequences sets ui.commands
-ui.gadgets.editors ui.gestures ui.tools.listener ;
-
-editor \"emacs\" f {
- { T{ key-down f { C+ } \"b\" } previous-character }
- { T{ key-down f { C+ } \"f\" } next-character }
- { T{ key-down f { C+ } \"a\" } start-of-line }
- { T{ key-down f { C+ } \"e\" } end-of-line }
- { T{ key-down f { C+ } \"u\" } delete-to-start-of-line }
- { T{ key-down f { C+ } \"k\" } delete-to-end-of-line }
-} define-command-map
-
-multiline-editor \"emacs\" f {
- { T{ key-down f { C+ } \"p\" } previous-line }
- { T{ key-down f { C+ } \"n\" } next-line }
-} define-command-map
-
-\"interactor\" interactor get-command-at [
- [ drop T{ key-down f { C+ } \"k\" } = ] assoc-reject
-] change-commands drop interactor update-gestures"
-}