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

Re: Bug#728501: w3m-el: mew-w3m-region & multiple blockquote



On December 2, 2013 at 10:08AM +0900, yamaoka (at jpl.org) wrote:
>> 	* mew-w3m.el (mew-w3m-region): Set point to minimum for
>> 	`mew-w3m-cite-blockquote' to work.
> 
> Thanks for verifying and fixing it.  I've installed the version.

One more patch to prevent infloop.

Thanks,
-- 
Tatsuya Kinoshita
2013-12-03  Tatsuya Kinoshita  <tats@xxxxxxxxxxxxxx>

	* mew-w3m.el (mew-w3m-region): Set point to the end of <div> tag to
	prevent infinite loop.

--- a/mew-w3m.el
+++ b/mew-w3m.el
@@ -195,9 +195,9 @@ The variable `mew-w3m-region-cite-mark' specifies the citation mark."
 	(while (and (re-search-forward
 		     "[\t\n ]*<div\\(?:[\t\n ]*>\\|[\t\n ]+[^>]+>\\)" nil t)
 		    (w3m-end-of-tag "div"))
-	  (goto-char (match-end 0))
-	  (insert "\n")
 	  (goto-char (match-beginning 0))
+	  (insert "\n")
+	  (goto-char (1+ (match-end 0)))
 	  (insert "\n"))
 	(goto-char (point-min))
 	(while (re-search-forward "^[\t <>]+$" nil t)