~ubuntu-dev/ubuntu/lucid/mutt/lucid-201002110857

« back to all changes in this revision

Viewing changes to doc/gen-map-doc

  • Committer: Bazaar Package Importer
  • Author(s): Bhavani Shankar
  • Date: 2009-06-07 17:30:03 UTC
  • mto: (16.2.1 experimental) (2.3.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: james.westby@ubuntu.com-20090607173003-rg37ui3h2bbv7wl0
Tags: upstream-1.5.19
ImportĀ upstreamĀ versionĀ 1.5.19

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
  }
24
24
  if ($map and /{\s*"(.+)"\s*,\s*(\w+)\s*,\s*(?:"([^"]+)"|(\w+))\s*}/) {
25
25
    my ($function, $op, $binding) = ($1, $2, $3 || $4);
26
 
    $binding =~ s/ /Space/;
27
 
    $binding =~ s/^\\033/ESC /;
28
 
    $binding =~ s/^\\010/Backspace/;
29
 
    $binding =~ s/^\\(0\d+)$/'^'.chr(64+oct($1))/e;
30
 
    $binding =~ s/^\\(0\d+)(.)/'^'.chr(64+oct($1)) ." $2"/e;
31
 
    $binding =~ s/<(.+)>/$1/;
32
26
    $binding =~ s/&/&amp;/;
 
27
    # for <key>, try CamelCasing into <Key>
 
28
    $binding =~ s/<(.)(.+)>/&lt;\U$1\E$2&gt;/;
33
29
    $binding =~ s/</&lt;/;
34
30
    $binding =~ s/>/&gt;/;
35
 
    $binding =~ s/\\t/TAB/;
36
 
    $binding =~ s/M_ENTER_S/RET/;
37
 
    $binding =~ s/NULL/not bound/;
 
31
    $binding =~ s/ /&lt;Space&gt;/;
 
32
    $binding =~ s/^\\033/Esc /;
 
33
    $binding =~ s/^\\010/&lt;Backspace&gt;/;
 
34
    $binding =~ s/^\\(0\d+)$/'^'.chr(64+oct($1))/e;
 
35
    $binding =~ s/^\\(0\d+)(.)/'^'.chr(64+oct($1)) ." $2"/e;
 
36
    $binding =~ s/\\t/&lt;Tab&gt;/;
 
37
    $binding =~ s/M_ENTER_S/&lt;Return&gt;/;
 
38
    $binding =~ s/NULL//;
38
39
    die "unknown key $binding" if $binding =~ /\\[^\\]|<|>/;
39
40
    die "unknown OP $op" unless $OPS{$op};
40
 
    $MAP{$map} .= "<row><entry>$function</entry><entry>$binding</entry><entry>$OPS{$op}</entry></row>\n";
 
41
    $MAP{$map} .= "<row><entry><literal>&lt;$function&gt;</literal></entry><entry>$binding</entry><entry>$OPS{$op}</entry></row>\n";
41
42
  }
42
43
  if ($map and /^}/) {
43
44
    undef $map;
54
55
    }
55
56
    print <<EOT;
56
57
<sect2 id="${map}_map">
57
 
<title>$map</title>
 
58
<title>$map menu</title>
58
59
$DOC{$map}
59
 
<para>
60
60
 
61
61
<table id="${map}_table">
62
62
<title>Default $map function bindings</title>
70
70
</tgroup>
71
71
</table>
72
72
 
73
 
</para>
74
 
 
75
73
</sect2>
76
74
 
77
75
EOT