jed-users mailing list

[2008 Date Index] [2008 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: Orthogonality beetween keybinding and language modes [was: "RE: Your enhanced Perl mode for JED (fwd)"]


On Thu, 6 Nov 2008, G. Milde wrote:

... another problem: namely, that of orthogonality between main editing
modes (i.e.  keybindings) and language-specific modes. I believe the
[cut]
former ones should provide an "introductory keybinding" upon which the
latter ones could form composed ones. For example, I see ^J is not
taken by the ide mode I use. Then the perl mode may use it abstractly
(i.e. asking it to some function which I don't know) to form ^J-e, ^J-c
and assign them to perl_exec, perl_check and so on.
And similarly other modes.

This is usually done by the _Reserved_Key_Prefix and the functions
definekey_reserved, unsetkey_reserved, local_setkey_reserved,
setkey_reserved, local_unsetkey_reserved, undefinekey_reserved.

The idea is to have a mode-specific keymap under the _Reserved_Key_Prefix
(^D with emacs and ^E with cua emulation).

I notice you don't mention IDE mode, which as I said, has been my choice for some years now. (And *probably* the reason why I "decided" to stick with JED.) Thus...

A modern mode should also define a mode menu that lists the "end-user"
functions. This way it is easy to see the functionality of the mode and
the pre-defined keybindings.

... should I infer that IDE mode is NOT modern by today's "standards?" What do you recommend? Should I switch to CUA instead? Is it reasonably similar?

The perl mode has a rudimentary mode menu missing perl_exec etc.

OTOH, there are a couple of common actions (like "run the buffer" or
"compile") that should be available with configurable "first-class" short
keybindings.

The "buffer-local" hooks from http://jedmodes.sf.net/mode/bufutils/
are a framework for such a setup.
[cut]

Out of curiosity: a language-mode, e.g. the Perl one, which is the one I'm obviously interested in... should then try to use the mode specific keymap through those functions mentioned above, and... what to do upon failure?

Whatever, I feel a somewhat unsatisfactory sensation: just as if there were precious gems in the tool I'm routinely using, but they're hidden enough as not to allow me to use it to the effect of exploiting its full power... :( and all this... "only" because I'm not using emacs emulation.


Michele
--
William Shatner can be neither created nor destroyed.
- Seen in PerlMonks

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2008 date index] [2008 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]