changeset 37041:f347448dda9e

(bookmark-get-bookmark): Handle case that BOOKMARK is not a string.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 28 Mar 2001 14:51:26 +0000
parents 0c7a504e8522
children a644f4966169
files lisp/bookmark.el
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/bookmark.el	Wed Mar 28 14:32:24 2001 +0000
+++ b/lisp/bookmark.el	Wed Mar 28 14:51:26 2001 +0000
@@ -345,11 +345,13 @@
 
 
 (defun bookmark-get-bookmark (bookmark)
-  "Return the full entry for BOOKMARK in bookmark-alist."
-  (apply (if bookmark-completion-ignore-case
-             #'assoc-ignore-case
-           #'assoc)
-         (list bookmark bookmark-alist)))
+  "Return the full entry for BOOKMARK in bookmark-alist.
+If BOOKMARK is not a string, return nil."
+  (when (stringp bookmark)
+    (apply (if bookmark-completion-ignore-case
+	       #'assoc-ignore-case
+	     #'assoc)
+	   (list bookmark bookmark-alist))))
 
 
 (defun bookmark-get-bookmark-record (bookmark)