jed-users mailing list

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

Re: python-mode and fold-mode


On 12.06.07, Jörg Sommer wrote:
> "G. Milde" <milde@xxxxxxxxxxxxxxxxxxxxx> wrote:
> > On  8.06.07, Jörg Sommer wrote:
> >> "G. Milde" <milde@xxxxxxxxxxxxxxxxxxxxx> wrote:
> >> >
> >> >> It's up to John to make the real decision, but I follow you that
> >> >> _Reserved_Key_Prefix should only be used by major modes.
> >
> >> >> What about implementing a function that makes the decision?
> >> >
> >> >> define minor_mode_key_prefix(mode, keymap)
> >> > ...

> > However, the idea of a special minor_mode_key_prefix() function seems
> > still too complicated for me.

> Do you mean complicated in the sense of difficult to unterstand or in the
> sense of more than is needed aka bloat?

Both. 

Instead of introducing one more method of user-configuration, I
would like to rely on the established methods "custom variables" and
"(mode) hooks".

> > Grepping for "key_reserved" in the standard library, I found 12 major
> > modes that use one of "reserved" keybinding functions
> > but only 2 minor modes that do so,

> What does the svn/cvs mode do?

custom_variable("SVN_set_reserved_keybindings", 0);

(But it is not in the standard library.)

The standard rcs.sl mode suggest some keybindings in the Usage
documentation.

My "ishell.sl" minor mode uses the push_keymap() pop_keymap() pair from
bufutils.sl.

Another option for a minor mode is to rebind() some keys from a known
function to a variant thereof (e.g. done in the grep.sl mode with
grep_replace).

> > I suppose it will be simpler and easier to comprehend for a user if
> > site.sl supplied an auxiliary function for the "fold" bindings like the
> > example below.

> I would like to have a generic way. Maybe we have so few minor modes,
> because it's difficult to integrate them.

> For example, I would like to add some functions from the debian mode for
> mails, but I don't want to go to the global keymap, because those keys
> aren't global, and overwriting the settings of mail doesn't sound good,
> too.

> minor_mode_key_prefix("debian", "mail")

The "normal" way would be to define a mail-mode hook. What is this
function expected to do?

Guenter


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


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