Subject: bug#13914: closed (Re: bug#13914: 24.3.50; fill-paragraph in makefile-automake-mode could make infinite loop.)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 18 Dec 2013 05:02:03 +0000

Your bug report

#13914: 24.3.50; fill-paragraph in makefile-automake-mode could make infinite loop.

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
13914: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13914
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#13914: 24.3.50; fill-paragraph in makefile-automake-mode could make infinite loop.
From: Chong Yidong <[email-masked]>
To: Kazuhiro Ito <[email-masked]>
Cc: [email-masked]
Date: Wed, 18 Dec 2013 13:01:40 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Kazuhiro Ito <[email-masked]> writes:

> The below code makes emacs go into infinite loop.
>
> (with-temp-buffer
>   (makefile-automake-mode)
>   (insert "a \\")
>   (fill-paragraph))
>
>
> Please see the below patch.

Thanks, committed to trunk.

Subject: 24.3.50; fill-paragraph in makefile-automake-mode could make infinite loop.
From: Kazuhiro Ito <[email-masked]>
To: [email-masked]
Date: Sun, 10 Mar 2013 15:33:24 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

The below code makes emacs go into infinite loop.

(with-temp-buffer
  (makefile-automake-mode)
  (insert "a \\")
  (fill-paragraph))

Please see the below patch.

=== modified file 'lisp/progmodes/make-mode.el'
--- lisp/progmodes/make-mode.el	2013-02-02 06:04:06 +0000
+++ lisp/progmodes/make-mode.el	2013-03-10 05:46:08 +0000
@@ -1298,7 +1298,7 @@
                  (point))))
 	    (end
 	     (save-excursion
-	       (while (= (preceding-char) ?\\)
+	       (while (and (= (preceding-char) ?\\) (null (eobp)))
 		 (end-of-line 2))
 	       (point))))
 	(save-restriction

-- 
Kazuhiro Ito