Re: [PATCH] prompt_yn() accepts only keys from prompt_keys
Urs Janßen <[email protected]>
| Newsgroups | gmane.network.tin.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Mar 09, 2005 at 12:33:34AM +0100, Michael Bienia wrote: > > keymap.c still looks for some obsolete keynames, e.g.: > > ConfigSelect2, Down2, GroupReadBasenote2, PageDown2, PageNextThd2, PageUp2 > > PageUp3, Postponed2, PostPost2, PostPost3, PostSend2 > > SelectEnterNextUnreadGrp2, SelectMarkGrpUnread2, SelectReadGrp2 > > ThreadReadArt2, Up2 > > > > IMHO we should remove them from the normal code, but handle them in > > the RC_UPGRADE case (like it's done for the tinrc in > > config.c:read_config_file() via rc_update()). on exit we should > > 'overwrite' the old keymapfile with the updated new one. > > Updating the keymap-file from within tin is tricky. The hard part is to > write out the keymap file. For some keys it is hard to tell the keynames > they come from. For example the key to jump to the first page in the > info pager: once it can be set through the global "FirstPage" and a > second time through "HelpFirstPage2" but in both cases the key gets > associated with GLOBAL_FIRST_PAGE. > If tin has to write a keymap file it has to decide if a key for > GLOBAL_FIRST_PAGE came from "FirstPage" or "HelpFirstPage2". what about updating it in the startup phase (line wiese while reading it in), that's where we have the information (the line with the (probabely obsolete) kename and binding). > IMHO a solution to upgrade the keymap file though a perl script is much > easier and less error prone. I'm not really a fan of external update scripts - they tend to get never used (like w2r.pl, never got any feedback about it). urs -- "Only whimps use tape backup: _real_ men just upload their important stuff on ftp, and let the rest of the world mirror it ;)" - Linus