[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

Re: Forward: Bug#447728: Annoying "leaving secure page" yornp



>>>>>> In [emacs-w3m : No.09770] 土屋さん wrote:

>>   ・前のページに戻る(と言うか,履歴を辿る場合は確認なしで良い?)
>>   ・明示的に URI を入力

>> の2ケースに限って,y-or-n-p を skip するようにした方が良いかなあと思って.

y-or-n-p を skip する条件として

・w3m-confirm-leaving-secure-page が nil
・対話的に使われたコマンドが以下のどれか
  w3m w3m-bookmark-view w3m-dtree w3m-goto-url w3m-history
  w3m-redisplay-this-page w3m-reload-this-page w3m-submit-form
  w3m-view-next-page w3m-view-previous-page w3m-view-header
  w3m-view-source
・url が "\\`\\(?:about\\|https\\|ftps\\)://" にマッチ

にしようと思ったんですが、いかがでしょう?

--- w3m.el~	2007-11-26 04:43:22 +0000
+++ w3m.el	2007-11-27 00:39:05 +0000
@@ -5469,10 +5469,19 @@
 called with t as an argument.  Otherwise, it will be called with nil."
   (unless (and w3m-current-ssl
 	       w3m-confirm-leaving-secure-page
-	       (not (string-match "\\`\\(?:ht\\|f\\)tps://" url))
-	       (not (prog1
+	       (not
+		(or (memq this-command
+			  '(w3m
+			    w3m-bookmark-view w3m-dtree w3m-goto-url
+			    w3m-history w3m-redisplay-this-page
+			    w3m-reload-this-page w3m-submit-form
+			    w3m-view-next-page w3m-view-previous-page
+			    w3m-view-header w3m-view-source))
+		    (string-match "\\`\\(?:about\\|https\\|ftps\\)://"
+				  url)
+		    (prog1
 			(y-or-n-p "You are leaving secure page.  Continue? ")
-		      (message nil))))
+		      (message nil)))))
     (lexical-let ((url (w3m-url-strip-fragment url))
 		  (charset charset)
 		  (page-buffer (current-buffer))
-- 
山岡