Subject: bug#20212: 24.4: bookmark.el: function hangs on EOF (FIX INCLUDED) (bookmark-bmenu-goto-bookmark)

From: Boruch Baum <[email-masked]>
Date: Fri, 27 Mar 2015 05:42:52 -0400

While looking to address Stefan Monnier's comments to bug #20150, I
encountered this bug in function bookmark-bmenu-goto-bookmark. If the
function does not find the requested bookmark before EOF, it continues
endlessly.

patch attached.

-- 
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0

--- bookmark.el	2015-03-23 04:52:30.503739608 -0400
+++ bookmark-new.el	2015-03-27 05:32:00.390173984 -0400
@@ -2064,7 +2064,8 @@
 (defun bookmark-bmenu-goto-bookmark (name)
   "Move point to bookmark with name NAME."
   (goto-char (point-min))
-  (while (not (equal name (bookmark-bmenu-bookmark)))
+  (while (and (not (equal name (bookmark-bmenu-bookmark)))
+              (not (equal (point) (point-max))))
     (forward-line 1))
   (forward-line 0))