- while ($ln <= $i) {
- if ($input[$ln] =~ m!^\s*\#d[0-9]*\#!) {
- xprint(1, "Ending hashed dir handling in line $ln.\n");
- $ln++;
- return;
- }
- if ($input[$ln] =~ m!\s*hash\s+-d\s+([^=]+)=(.*)!) {
- $dir=$1; $value=&escape_string($2);
- push(@{ $data{"hasheddirs-$secmap[$sec]"} }, "\\command\{$dir\}\{$value\}");
- }
- else {
- warn("Broken hashed dir in line $ln. IGNORING.\n");
- }
+ if (!$wfuncref->($sec, $desc)) {
+ warn("Broken $name in line $ln. IGNORING.\n");
+ }
+}
+#}}}
+sub handle_manual { #{{{
+ # this is different than the other handle_*() subs.
+ my ($code, $key, $value) = @_;
+ my ($sec);
+
+ xprint(1, "Handling manual entry (code: $code) in line $ln ($key -> $value)\n");
+
+ $sec = ( (length($code) > 1) ? substr($code, 1) : 0);
+ if (substr($code, 0, 1) eq 'a') {
+ push(@{ $data{"aliases-$secmap[$sec]"} }, "\\command\{$key\}\{$value\}");
+ } elsif (substr($code, 0, 1) eq 'A') {
+ push(@{ $data{"abbrev-$secmap[$sec]"} }, "\\command\{$key\}\{$value\}");
+ } elsif (substr($code, 0, 1) eq 'd') {
+ push(@{ $data{"hasheddirs-$secmap[$sec]"} }, "\\command\{$key\}\{$value\}");
+ } elsif (substr($code, 0, 1) eq 'f') {
+ push(@{ $data{"functions-$secmap[$sec]"} }, "\\command\{$key\}\{$value\}");
+ } elsif (substr($code, 0, 1) eq 'k') {
+ push(@{ $data{"keybindings-$secmap[$sec]"} }, "\\command\{$key\}\{$value\}");
+ } elsif (substr($code, 0, 1) eq 'o') {
+ push(@{ $data{"other-$secmap[$sec]"} }, "\\command\{$key\}\{$value\}");
+ } elsif (substr($code, 0, 1) eq 'v') {
+ push(@{ $data{"variables-$secmap[$sec]"} }, "\\command\{$key\}\{$value\}");
+ } else {
+ warn("Unknown doc-definition character in manual-line $ln ($1). IGNORING.\n");