|
|
Choosing A Webhost: |
Re: python-mode and fold-mode: msg#00021editors.jed.user
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> |
|---|---|---|
| Previous by Date: | Re: python-mode and fold-mode, G. Milde |
|---|---|
| Next by Date: | Re: python-mode and fold-mode, G. Milde |
| Previous by Thread: | Re: python-mode and fold-mode, G. Milde |
| Next by Thread: | Re: python-mode and fold-mode, G. Milde |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive 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 |