改善方針の改定版です。お試しパッチは巻末にあります。
こんな方針で変更するのではいかがでしょうか?
1. 新しい変数 `w3m-safe-url-regexp-to-use' を導入。mime-w3m など
が html 記事の表示に使う `w3m-region' はそれをバッファローカ
ル変数にして、`w3m-safe-url-regexp' のそのとき束縛されている
値をそれに記憶させ、以後の url が安全かどうかの判定にはその値
を使う。
`w3m-safe-url-regexp-to-use' が mime-w3m などによって設定され
ない場合 (つまり通常の web ブラウズなどの場合) のために
`w3m-safe-url-regexp-to-use' のデフォルト値を特別な値 t にし
て、url が安全かどうかの判定には `w3m-safe-url-regexp' の値を
使うことを意味させる。
つまり url が安全かどうかを判定するための正規表現は、次の式で
求める:
(if (eq w3m-safe-url-regexp-to-use t)
w3m-safe-url-regexp
(or w3m-safe-url-regexp-to-use w3m-safe-url-regexp))
2. `w3m-safe-toggle-inline-image' と `w3m-safe-toggle-inline-images'
を廃止。それらにバインドされているキーのコマンドを
`w3m-toggle-inline-image' と `w3m-toggle-inline-images' に戻す。
3. `w3m-toggle-inline-image' は url を `w3m-safe-url-regexp' と
照合し、安全でない場合は表示しない。対話的に呼ばれた場合は
This image is considered to be unsafe; use the prefix arg to force display
と言わせる。さらに接頭引数付きで対話的に呼ばれた場合でも
Are you sure you really want to show this image (maybe insecure)?
で確認を求める。
4. `w3m-toggle-inline-images' は `w3m-safe-url-regexp' とそれぞ
れの画像 url を照合し、安全でないものは表示しない。対話的に呼
ばれた場合は
There are some images considered unsafe; use the prefix arg to force display
と言わせる。接頭引数付きで対話的に呼ばれた場合は、全画像 url
を走査して、`w3m-safe-url-regexp' に合致しない画像がある場合
には
Are you sure you really want to show all images (maybe insecure)?
で確認を求める。Attachment:
PATCH.gz
Description: GNU Zip compressed data