jed-users mailing list

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

Re: [Jed-users-l] reserved key


Henry Harpending <harpend@xxxxxxxxx> wrote:
> Does it matter which way the key assignment is made?  And where on earth in
> the library is ^C defined to be a reserved prefix key?  I can't find the
> assignment anywhere.

There is no function call that sets it.  Rather it is set by a
variable call _Reserved_Key_Prefix.  The best description of this is
in the changes.txt file, where you will find:

 b) All keybindings prefixed with ^C were removed from lib/*.sl and
    replaced by calls to functions such as definekey_reserved.  The
    idea is that each emulation (emacs, ide, etc), is to reserve
    prefix key that may be used by various modes for binding.  As an
    example, folding.sl used to contain lines such as:

       local_setkey ("fold_whole_buffer", "^C^W");

    This made this mode and others fundamentally at odds with
    emulations that use ^C for something else, e.g. the ide emulation.
    Now, lines such as the above have been changed to:

       local_setkey_reserved ("fold_whole_buffer", "^W");

    Of course the emacs emulation preserves the ^C key for extension
    in this way, which means that the two lines are equivalent.  

    The interface to this ``reserved'' key prefix includes the
    following functions:

       setkey_reserved
       unsetkey_reserved
       local_setkey_reserved
       local_unsetkey_reserved
       definekey_reserved
       undefinekey_reserved

     and have the same calling syntax as similar functions without the
     reserved suffix.  The variable specifying the reserved key prefix
     is called _Reserved_Key_Prefix, whose value will depend upon the
     emulation:

         emacs: ^C
	 ide:  ^Z

I hope this helps explain the rationale for this.
Thanks,
--John
_______________________________________________
Jed-users-l mailing list
Jed-users-l@xxxxxxxx
http://mailman.jtan.com/mailman/listinfo/jed-users-l


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