w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

commit b65fff28e784ae331e3b5fb8a4c4a85bd5c9b311
parent 88759f07b140df32a366e2d6ec9a2d3e46fdf03b
Author: ukai <ukai>
Date:   Tue, 25 Dec 2001 17:29:31 +0000

[w3m-dev 02729]
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>

Diffstat:
MChangeLog | 15+++++++++++++++
Mdoc-jp/README.func | 8++++----
Mdoc/README.func | 6+++---
Mscripts/w3mhelp.cgi.in | 62+++++++++++++++++++++++++++++++++++++++++++++-----------------
4 files changed, 67 insertions(+), 24 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,18 @@ +2001-12-26 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp> + + * [w3m-dev 02729] + * doc-jp/README.func (DOWNLOAD): update + * doc-jp/README.func (EDIT): ditto + * doc-jp/README.func (EDIT_SCREEN): ditto + * doc-jp/README.func (SAVE): ditto + * doc/README.func (DOWNLOAD): ditto + * doc/README.func (SAVE): ditto + * doc/README.func (SUBMIT): ditto + * scripts/w3mhelp.cgi.in: $key is normalized by &norm_key + * scripts/w3mhelp.cgi.in: keyfunc update + * scripts/w3mhelp.cgi.in (load_keymap): check data, &norm_key + * scripts/w3mhelp.cgi.in (norm_key): added + 2001-12-26 Fumitoshi UKAI <ukai@debian.or.jp> * [#496613] LASTLINE in terms.c diff --git a/doc-jp/README.func b/doc-jp/README.func @@ -11,9 +11,9 @@ DELETE_PREVBUF 前 DICT_WORD 入力した単語を辞書コマンドで調べます DICT_WORD_AT カーソル位置の単語を辞書コマンドで調べます DOWN 画面を1行下にスクロールします -DOWNLOAD HTMLのソースをファイルに保存します -EDIT エディタで編集します -EDIT_SCREEN 現在表示されているバッファをエディタで編集します +DOWNLOAD 文書のソースをファイルに保存します +EDIT ソースファイルをエディタで編集します +EDIT_SCREEN バッファの表示内容をエディタで編集します END 文書のいちばん下の行に移動します EXEC_SHELL シェルコマンドを実行します EXIT 確認せずにw3mを終了します @@ -81,7 +81,7 @@ REDRAW REG_MARK 正規表現で指定された文字列を全てマークします RELOAD バッファを再度読み込みます RIGHT 画面全体を1文字右にずらします -SAVE HTMLのソースをファイルに保存します +SAVE 文書のソースをファイルに保存します SAVE_IMAGE リンクが指す画像をファイルに保存します SAVE_LINK リンクが指す先の文書をファイルに保存します SAVE_SCREEN バッファの表示内容をファイルに保存します diff --git a/doc/README.func b/doc/README.func @@ -11,7 +11,7 @@ DELETE_PREVBUF Delete previous buffer (mainly for local-CGI) DICT_WORD Execute dictionary command (see README.dict) DICT_WORD_AT Execute dictionary command for word at cursor DOWN Scroll down one line -DOWNLOAD Save HTML source +DOWNLOAD Save document source to file EDIT Edit current document EDIT_SCREEN Edit currently rendered document END Go to the last line @@ -81,7 +81,7 @@ REDRAW Redraw screen REG_MARK Set mark using regexp RELOAD Reload buffer RIGHT Shift screen one column right -SAVE Save HTML source to file +SAVE Save document source to file SAVE_IMAGE Save image to file SAVE_LINK Save link to file SAVE_SCREEN Save rendered document to file @@ -98,7 +98,7 @@ SHELL Execute shell command SHIFT_LEFT Shift screen left SHIFT_RIGHT Shift screen right SOURCE View HTML source -SUBMIT submit +SUBMIT Submit form SUSPEND Stop loading document UP Scroll up one line VERSION Display version of w3m diff --git a/scripts/w3mhelp.cgi.in b/scripts/w3mhelp.cgi.in @@ -51,6 +51,13 @@ if (defined($ENV{'QUERY_STRING'})) { } } +%f = %keyfunc; +%keyfunc = (); +while (($key, $fname) = each %f) { + $key = &norm_key($key); + $keyfunc{$key} = $fname; +} + if (-f $keymap) { open(KEYMAP, "< $keymap") || die "cannot open keymap: $keymap, $!"; &load_keymap(*KEYMAP, $func); @@ -109,42 +116,42 @@ for $otherlang (@docdirs) { } &show_keymap("Page/Cursor motion", - split(" ", "pgFore pgBack movR movL movD movU lup1 ldown1 - goLineF goLineL movRW movLW shiftl shiftr - col1R col1L goLine ctrCsrH ctrCsrV + split(" ", "pgFore pgBack movR movL movD movU ldown1 lup1 + shiftl shiftr col1L col1R linbeg linend ctrCsrH ctrCsrV + goLine goLineF goLineL movRW movLW topA lastA nextA prevA - nextL nextLU nextR nextRD nextD nextU")); + nextR nextRD nextL nextRD nextLU nextD nextU")); &show_keymap("Hyperlink operation", - split(" ", "followA svA peekURL peekIMG followI svI - chkURL chkNMID curURL pginfo curlno ldHist + split(" ", "followA svA followI svI submitForm + curURL peekURL peekIMG pginfo curlno chkURL chkNMID rFrame extbrz linkbrz")); &show_keymap("File/Stream operation", split(" ", "goURL ldfile readsh pipesh")); &show_keymap("Buffer operation", - split(" ", "backBf vwSrc selMn editBf rdrwSc reload - svBuf svSrc editScr")); - -&show_keymap("Buffer selection mode", - split(" ", "buffer_prev buffer_next buffer_delete buffer_go")); + split(" ", "backBf selMn selBuf vwSrc svSrc svBuf + editBf editScr reload rdrwSc")); &show_keymap("Bookmark operation", split(" ", "ldBmark adBmark")); &show_keymap("Search", - split(" ", "srchfor srchbak srchnxt srchprv")); + split(" ", "srchfor srchbak srchnxt srchprv isrchfor isrchbak")); &show_keymap("Dictionary look-up", split(" ", "dictword dictwordat")); &show_keymap("Mark operation", - split(" ", "_mark prevMk nextMk reMark")); + split(" ", "_mark nextMk prevMk reMark")); &show_keymap("Miscellany", - split(" ", - "setAlarm execsh ldhelp ldOpt cooLst susp qquitfm quitfm")); + split(" ", "mainMn ldhelp ldOpt cooLst ldHist msgs msToggle + wrapToggle setAlarm setOpt setEnv execsh susp qquitfm quitfm")); + +&show_keymap("Buffer selection mode", + split(" ", "buffer_next buffer_prev buffer_delete buffer_go")); &show_keymap("Line-edit mode", split(" ", "lineedit_forward lineedit_back lineedit_backspace @@ -167,15 +174,36 @@ sub load_keymap { while (<FH>) { next if /^#/; next if /^\s*$/; - ($keymap, $key, $fname) = split; + ($keymap, $key, $fname, $data) = split; + next if $data; next unless $keymap =~ /keymap/; $fname =~ tr/a-z/A-Z/; next unless (defined($funcdesc{$fname})); - $key =~ s/^\\//; + $key = &norm_key($key); $keyfunc{$key} = $fname; } } +sub norm_key { + local($_) = @_; + + s/^\^/C-/; + s/^(C-\[|M-)/ESC-/; + if (/^ESC-\[/) { + /^ESC-\[A$/ && return "UP"; + /^ESC-\[B$/ && return "DOWN"; + /^ESC-\[C$/ && return "RIGHT"; + /^ESC-\[D$/ && return "LEFT"; + s/^ESC-/\^\[/; + return $_; + } + s/^(ESC-)\^/ESC-C-/; + s/^(ESC-)?C-[iI]/${1}TAB/; + s/^(ESC-)?C-\?/${1}DEL/; + s/^\\//; + return $_; +} + sub show_keymap { local($head, @list) = @_; local($fid);