changeset 99228:b0198599138f

(bookmark-get-bookmark-record): Signal error for invalid bookmark.
author Chong Yidong <cyd@stupidchicken.com>
date Wed, 29 Oct 2008 18:22:12 +0000
parents d0781e01ee9c
children 5b9d32d91171
files lisp/bookmark.el
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/bookmark.el	Wed Oct 29 18:21:50 2008 +0000
+++ b/lisp/bookmark.el	Wed Oct 29 18:22:12 2008 +0000
@@ -330,7 +330,8 @@
 (defun bookmark-get-bookmark-record (bookmark)
   "Return the guts of the entry for BOOKMARK in `bookmark-alist'.
 That is, all information but the name."
-  (let ((alist (cdr (bookmark-get-bookmark bookmark))))
+  (let ((alist (cdr (or (bookmark-get-bookmark bookmark)
+			(error "Invalid bookmark %s" bookmark)))))
     ;; The bookmark objects can either look like (NAME ALIST) or
     ;; (NAME . ALIST), so we have to distinguish the two here.
     (if (and (null (cdr alist)) (consp (caar alist)))