From 01aac6c1fcf8cf8d3f2463e8182f986abf768e29 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 6 Jul 2019 16:35:52 +0200 Subject: [PATCH] Improve an error message in bookmark.el * lisp/bookmark.el (bookmark-alist-from-buffer): Improve error message (bug#36391). --- lisp/bookmark.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 4f908313ccf..2640b2157ab 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -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) -- 2.39.2