I'm looking for a way to programmatically retrieve documentation for mode-line-format %-constructs; this is part of a little project I'm working on to help with mode-line customization. So for example, if the mode line contains "%e", I want something ike:
print error message about full memory.
Right now the only way I can think of is to parse the help string for mode-line-format, but that seems like it would put me in a state of sin. :-) Is there a better way?