On Fri, 25 May 2012 05:06:51 -0500 "Edward K. Ream" <[email protected]> wrote:
> >> As or rev 5348, patterns of the form !<command-name>! get translated > >> to the key binding for command-name, or the string <Alt-x>command- > >> name<Return> if there is no key binding. > > > > That's neat. You could go with an rst role, :cmd:`isearch-forward`, > > where cmd is a custom role. Not exactly sure what that achieves, > > although it seems to be what rst intends. > > How would :cmd:`isearch-forward` get translated to the string "Alt-S" ? The same way !<command-name>! does, you'd just search for :cmd:`command-name` instead of !<command-name>!. > > you're pre-processing it before the rst processing > > Correct. I see no particular reason to involve rST in the "macro > conversion" process. The advantage I see is what happens when the conversion isn't happening, when you're reading the source directly, or otherwise processing the docstrings (extracting plugin docs. for example). Then you have something which is valid rst, can be processed by rst (for example tweaking the display of command names), and has an obvious meaning to anyone familiar with rst. The !<>! notation only has meaning in the viewrendered context, and might be jarring outside of it. The rst role approach is a more general solution, although the actual replacement with the key binding would be done exactly the same way, with a different search target. Cheers -Terry -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
