]> git.eshelyaron.com Git - emacs.git/commitdiff
(bookmark-get-bookmark): Handle case that
authorGerd Moellmann <gerd@gnu.org>
Wed, 28 Mar 2001 14:51:26 +0000 (14:51 +0000)
committerGerd Moellmann <gerd@gnu.org>
Wed, 28 Mar 2001 14:51:26 +0000 (14:51 +0000)
BOOKMARK is not a string.

lisp/bookmark.el

index ad43d0feae90e357470879a8b40cd391fa0a9ab6..8ad4842e28d020ff48fa6bd49dcdd2e8d138be09 100644 (file)
@@ -345,11 +345,13 @@ through a file easier.")
 
 
 (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)