X-Git-Url: https://git.llucax.com/software/mutt-debian.git/blobdiff_plain/14c29200cb58d3c4a0830265f2433849781858d0..480925ce923dc23cdbf948992c9871627b565bb7:/doc/gen-map-doc?ds=sidebyside diff --git a/doc/gen-map-doc b/doc/gen-map-doc index fcbaeff..1a99cf8 100644 --- a/doc/gen-map-doc +++ b/doc/gen-map-doc @@ -23,21 +23,22 @@ while () { } if ($map and /{\s*"(.+)"\s*,\s*(\w+)\s*,\s*(?:"([^"]+)"|(\w+))\s*}/) { my ($function, $op, $binding) = ($1, $2, $3 || $4); - $binding =~ s/ /Space/; - $binding =~ s/^\\033/ESC /; - $binding =~ s/^\\010/Backspace/; - $binding =~ s/^\\(0\d+)$/'^'.chr(64+oct($1))/e; - $binding =~ s/^\\(0\d+)(.)/'^'.chr(64+oct($1)) ." $2"/e; - $binding =~ s/<(.+)>/$1/; $binding =~ s/&/&/; + # for , try CamelCasing into + $binding =~ s/<(.)(.+)>/<\U$1\E$2>/; $binding =~ s//>/; - $binding =~ s/\\t/TAB/; - $binding =~ s/M_ENTER_S/RET/; - $binding =~ s/NULL/not bound/; + $binding =~ s/ /<Space>/; + $binding =~ s/^\\033/Esc /; + $binding =~ s/^\\010/<Backspace>/; + $binding =~ s/^\\(0\d+)$/'^'.chr(64+oct($1))/e; + $binding =~ s/^\\(0\d+)(.)/'^'.chr(64+oct($1)) ." $2"/e; + $binding =~ s/\\t/<Tab>/; + $binding =~ s/M_ENTER_S/<Return>/; + $binding =~ s/NULL//; die "unknown key $binding" if $binding =~ /\\[^\\]|<|>/; die "unknown OP $op" unless $OPS{$op}; - $MAP{$map} .= "$function$binding$OPS{$op}\n"; + $MAP{$map} .= "<$function>$binding$OPS{$op}\n"; } if ($map and /^}/) { undef $map; @@ -48,18 +49,19 @@ open XML, $xml or die "$xml: $!"; while () { if (/__print_map\((.*)\)/) { my $map = $1; + my $maptitle = $1; + $maptitle =~ s/^(.)/\U$1\E/; unless ($MAP{$map}) { warn "map $map undefined"; next; } print < -$map + +$maptitle Menu $DOC{$map} - - -Default $map function bindings +
+Default $map Function Bindings FunctionDefault keyDescription @@ -70,12 +72,10 @@ $MAP{$map}
-
-
EOT - delete $MAP{$1}; + delete $MAP{$map}; } else { print; }