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

From: Kazuhiro Ito <[email-masked]>
Date: Sun, 10 Mar 2013 15:33:24 +0900

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