commit 8e2f6aca3aa3da87802a595b4426062fb0451f06
parent 9411a22ca3c7b4aea4a59ac1ed61031a095f208c
Author: ukai <ukai>
Date: Thu, 10 Jan 2002 03:45:13 +0000
[w3m-dev 02810]
From: Yoshinobu Sakane <sakane@d4.bsd.nes.nec.co.jp>
Diffstat:
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,9 @@
+2002-01-10 Yoshinobu Sakane <sakane@d4.bsd.nes.nec.co.jp>
+
+ * [w3m-dev 02810]
+ * scripts/Makefile: read -r
+ * scripts/w3mhelp.cgi.in: fix bugs displaying "C-" only in some case
+
2002-01-08 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 02794]
diff --git a/scripts/Makefile b/scripts/Makefile
@@ -39,7 +39,7 @@ w3mhelp-funcname.pl: w3mhelp-funcname.pl.in ../funcname.tab ../doc/keymap.defaul
@echo ');' >> w3mhelp-funcname.pl
@echo '%keyfunc = (' >> w3mhelp-funcname.pl
@case "$(KEYBIND_SRC)" in *lynx*) keymap=keymap.lynx;; *) keymap=keymap.default;; esac; \
- while read keyword keys func rest; do \
+ while read -r keyword keys func rest; do \
if [ "X$$keyword" = Xkeymap ]; then \
keys=`echo "$$keys" | sed -e 's/\\\\/\\\\&/g'`; \
echo "'$$keys', '$$func',"; \
diff --git a/scripts/w3mhelp.cgi.in b/scripts/w3mhelp.cgi.in
@@ -187,7 +187,8 @@ sub load_keymap {
sub norm_key {
local($_) = @_;
- s/^\^/C-/;
+ s/\\(.)/$1/g;
+ s/^\^(.)/C-$1/;
s/^(C-\[|M-)/ESC-/;
if (/^ESC-\[/) {
/^ESC-\[A$/ && return "UP";
@@ -197,10 +198,9 @@ sub norm_key {
s/^ESC-/\^\[/;
return $_;
}
- s/^(ESC-)\^/ESC-C-/;
+ s/^ESC-\^(.)/ESC-C-$1/;
s/^(ESC-)?C-[iI]/${1}TAB/;
s/^(ESC-)?C-\?/${1}DEL/;
- s/^\\//;
return $_;
}