Hi Joe, > Are the "arrow keys" usable on the phone? Both the vi- and the > ... > Yes, they work great. One less keypress. Great!
Great! So they are indeed portable. I was worried especially about system independence, because I had to hard-code the arrow key code escape sequences. > Would it be possible to add hooks to the emacs line editor? I came up with I should mention that there is already a hook, though undocumented. It is called 'fkey', and is used, for example, in "rcsim/main.l" to control the airplane. It exists also in the emacs-style line editor, but seems currently not enabled. Also, 'fkey' is not intended for extensions of the line editor itself, but for the application level (like the above flight simulator). Nevertheless it is used in the vi-style line editor to implement the arrow keys. > a rough patch to demonstrate what I mean. I wanted to minimize the number > of changes to eled but had some problems due to needing to reference the > transient symbols. Also, I'm still pretty basic when it comes to my Yes, this is because the line editor is thought as a system tool, not accessible to the application level. You could easily change transient globals like "Line", "LPos" etc. to internal symbols *LedLine and *LedLPos, and take functions like 'chgLine' out of the (mapc zap ...) call at the end to make it accessible. An even better way would be to use a separate namespace with 'symbols' for the line editor. > (de closeParens (Line) > ... > (setq *EmacsKeyHook ... > ... > : '(a (b (c <Ctrl-Y> > > and have it automatically close my open parens This is valid. But I should mention here (as some readers might not be aware of it) that an analog mechanism is also available in the PicoLisp syntax itself, by using the super-parentheses '[' and ']'. I usually don't use super-parentheses in source files, but they are quite handy in the REPL. For your example above you could type : '(a (b (c] and you can also use it for sub-lists : '(a (b [c (d (e] f] etc. They work also without a line editor (e.g. in mini or ErsatzLisp). ♪♫ Alex -- UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe
