emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/osm ff8ff68b4d 65/77: Check if bookmarks are present


From: ELPA Syncer
Subject: [elpa] externals/osm ff8ff68b4d 65/77: Check if bookmarks are present
Date: Mon, 7 Mar 2022 08:58:08 -0500 (EST)

branch: externals/osm
commit ff8ff68b4dc395ea7545e9b669cefc94ee44c249
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Check if bookmarks are present
---
 osm.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/osm.el b/osm.el
index a03b75719a..d522bc7d81 100644
--- a/osm.el
+++ b/osm.el
@@ -777,17 +777,19 @@ xmlns='http://www.w3.org/2000/svg' 
xmlns:xlink='http://www.w3.org/1999/xlink'>
   (or (assoc
        (completing-read
         "Bookmark: "
-        (cl-loop for bm in bookmark-alist
-                 if (eq (bookmark-prop-get bm 'handler) #'osm-bookmark-jump)
-                 collect (car bm))
+        (or (cl-loop for bm in bookmark-alist
+                     if (eq (bookmark-prop-get bm 'handler) 
#'osm-bookmark-jump)
+                     collect (car bm))
+            (error "No bookmarks found"))
         nil t nil 'bookmark-history)
        bookmark-alist)
       (error "No bookmark selected")))
 
-;;;###autoload
 (defun osm-bookmark-set ()
   "Create osm bookmark."
   (interactive)
+  (unless (eq major-mode #'osm-mode)
+    (error "Not an osm-mode buffer"))
   (let* ((def (osm--bookmark-name (osm--location-name "Bookmark")))
          (name (read-from-minibuffer "Bookmark name: " def nil nil nil def)))
     (bookmark-set name)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]