Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: python-mode and fold-mode: msg#00021

editors.jed.user

Subject: Re: python-mode and fold-mode

Hello G.,

"G. Milde" <milde@xxxxxxxxxxxxxxxxxxxxx> wrote:
> On 25.05.07, Jörg Sommer wrote:
>> "G. Milde" <milde@xxxxxxxxxxxxxxxxxxxxx> wrote:
>> > On 24.05.07, John E. Davis wrote:
>> >
>> >> Also this is consistent with the view that folding mode is a "minor"
>> >> mode, and minor modes make use of the _Reserved_Key_Prefix.
>
> However,
>
>> > * Looking at the source of many JED modes, I see definekey_reserved()
>> > widely used by "major" modes (language modes).
> ...
>
> I'd like to see Johns decision on whether the _Reserved_Key_Prefix is
> reserved for "major" or "minor" modes.

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.

>> This sounds good, but how do these other bindings conflict with your CUA
>> mode? Do we need another mechanism to select a key for these minor modes?
>
> IMO, keybindings for "minor" modes in the Jed standard library should be
> set in the emulation mode and not use the _Reserved_Key_Prefix.

What about implementing a function that makes the decision?

define minor_mode_key_prefix(mode, keymap)
{
% Give the user the chance to make its own decisions
if exists(local_minor_mode_key_prefix)
answ = local_minor_mode_key_prefix(mode, keymap);
if answ != ""
% the user made a decision
return answ;

if keymap != "Global"
% refuse the request, e.g. the mode should not use keybindings
return NULL;

switch (mode)
{ case "xyz": return "^A"; }
{ case … }

% if we don't know the mode, we don't give him access
return NULL;
}

This way, every emulation (EDT, emacs, IDE, vi) can implement it's own
version of minor_mode_key_prefix() and the user can change settings.

Bye, Jörg.
--
Angenehme Worte sind nie wahr,
wahre Worte sind nie angenehm.



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    gcc.libstdc++.c...    solaris.opensol...    information-ret...    misc.misterhous...    web.catalyst.ge...    apache.webservi...    redhat.release....    hardware.lirc/2...    kernel.autofs/2...    technology.sust...    linux.vdr/2003-...    editors.lyx.gen...    org.user-groups...    netbsd.devel.pk...    xdg.devel/2004-...    version-control...    jakarta.slide.d...    debian.packages...    creativecommons...    ports.ppc.embed...    bug-tracking.bu...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe