]> git.llucax.com Git - software/mutt-debian.git/blobdiff - doc/gen-map-doc
lintian clean, removed the deprecated dh_clean -k
[software/mutt-debian.git] / doc / gen-map-doc
index fcbaeffb0295fc45411742eac91419135e3f0f55..cafc68d10fd76f6e00feefb24ab649daa78b5886 100644 (file)
@@ -23,21 +23,22 @@ while (<STDIN>) {
   }
   if ($map and /{\s*"(.+)"\s*,\s*(\w+)\s*,\s*(?:"([^"]+)"|(\w+))\s*}/) {
     my ($function, $op, $binding) = ($1, $2, $3 || $4);
   }
   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/&/&amp;/;
     $binding =~ s/&/&amp;/;
+    # for <key>, try CamelCasing into <Key>
+    $binding =~ s/<(.)(.+)>/&lt;\U$1\E$2&gt;/;
     $binding =~ s/</&lt;/;
     $binding =~ s/>/&gt;/;
     $binding =~ s/</&lt;/;
     $binding =~ s/>/&gt;/;
-    $binding =~ s/\\t/TAB/;
-    $binding =~ s/M_ENTER_S/RET/;
-    $binding =~ s/NULL/not bound/;
+    $binding =~ s/ /&lt;Space&gt;/;
+    $binding =~ s/^\\033/Esc /;
+    $binding =~ s/^\\010/&lt;Backspace&gt;/;
+    $binding =~ s/^\\(0\d+)$/'^'.chr(64+oct($1))/e;
+    $binding =~ s/^\\(0\d+)(.)/'^'.chr(64+oct($1)) ." $2"/e;
+    $binding =~ s/\\t/&lt;Tab&gt;/;
+    $binding =~ s/M_ENTER_S/&lt;Return&gt;/;
+    $binding =~ s/NULL//;
     die "unknown key $binding" if $binding =~ /\\[^\\]|<|>/;
     die "unknown OP $op" unless $OPS{$op};
     die "unknown key $binding" if $binding =~ /\\[^\\]|<|>/;
     die "unknown OP $op" unless $OPS{$op};
-    $MAP{$map} .= "<row><entry>$function</entry><entry>$binding</entry><entry>$OPS{$op}</entry></row>\n";
+    $MAP{$map} .= "<row><entry><literal>&lt;$function&gt;</literal></entry><entry>$binding</entry><entry>$OPS{$op}</entry></row>\n";
   }
   if ($map and /^}/) {
     undef $map;
   }
   if ($map and /^}/) {
     undef $map;
@@ -54,9 +55,8 @@ while (<XML>) {
     }
     print <<EOT;
 <sect2 id="${map}_map">
     }
     print <<EOT;
 <sect2 id="${map}_map">
-<title>$map</title>
+<title>$map menu</title>
 $DOC{$map}
 $DOC{$map}
-<para>
 
 <table id="${map}_table">
 <title>Default $map function bindings</title>
 
 <table id="${map}_table">
 <title>Default $map function bindings</title>
@@ -70,8 +70,6 @@ $MAP{$map}
 </tgroup>
 </table>
 
 </tgroup>
 </table>
 
-</para>
-
 </sect2>
 
 EOT
 </sect2>
 
 EOT