]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve an error message in bookmark.el
authorStefan Kangas <stefankangas@gmail.com>
Sat, 6 Jul 2019 14:35:52 +0000 (16:35 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 6 Jul 2019 14:35:52 +0000 (16:35 +0200)
* lisp/bookmark.el (bookmark-alist-from-buffer): Improve error
message (bug#36391).

lisp/bookmark.el

index 4f908313ccf9fe287e88a71f6027a8fc7d91c908..2640b2157abcdc4106a10fa778ca91595dc9fea9 100644 (file)
@@ -650,7 +650,9 @@ affect point."
             (forward-char -1)
             (read (current-buffer)))
         ;; Else no hope of getting information here.
-        (error "Not bookmark format")))))
+        (if buffer-file-name
+            (error "File not in bookmark format: %s" buffer-file-name)
+          (error "Buffer not in bookmark format: %s" (buffer-name)))))))
 
 
 (defun bookmark-upgrade-version-0-alist (old-list)