12 Dec 2005 11:03
Re: python-mode and folding
Romano Giannetti <romanol <at> upco.es>
2005-12-12 10:03:24 GMT
2005-12-12 10:03:24 GMT
On Thu, Dec 08, 2005 at 09:00:56AM -0500, John E. Davis wrote:
> Joachim Schmitz <js <at> aixtraware.de> wrote:
> define fold_mode_hook ()
> {
> if (get_mode_name() == "python")
> {
> local_setkey ("py_shift_region_left", "^C<");
> local_setkey ("py_shift_region_right", "^C>");
> }
> }
>
Hi,
I have another trick to accomplish this in a general way, but I would
like to know if there is a more "elegant" way to do it...
In modes where I like to use folding, for example say in latex mode, I
add
_Reserved_Key_Prefix = "\006"; % ^F
folding_mode();
_Reserved_Key_Prefix = "\003";
to latex_mode_hook(). I really never use ctrl-f as "forward" (the arrow
key works anywhere today...) and that way I have folding function as
ctrl-f something.
It is possible to make something like this in a more elegant way ---
without using internal variables?
Thanks,
Romano
--
--
Romano Giannetti - Univ. Pontificia Comillas (Madrid, Spain)
Electronic Engineer - phone +34 915 422 800 ext 2416 fax +34 915 596 569
RSS Feed