* bookmark.el (bookmark-insert-location): Handle a nil filename.
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 12 Apr 2010 19:12:36 +0000 (15:12 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 12 Apr 2010 19:12:36 +0000 (15:12 -0400)
lisp/ChangeLog
lisp/bookmark.el

index c2464bf..3ce0bb9 100644 (file)
@@ -1,5 +1,7 @@
 2010-04-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * bookmark.el (bookmark-insert-location): Handle a nil filename.
+
        * woman.el: Add bookmark declarations to silence the compiler.
        (bookmark-prop-get): Use `man-args' rather than `filename' as a first
        step to compatibility between man and woman bookmarks.
index 3d3d411..12ac760 100644 (file)
@@ -1176,7 +1176,9 @@ minibuffer history list `bookmark-history'."
   (or no-history (bookmark-maybe-historicize-string bookmark))
   (let ((start (point)))
     (prog1
-       (insert (bookmark-location bookmark)) ; *Return this line*
+        ;; FIXME: Each bookmark should come with a `location' method
+        ;; rather than just say "-- no file --".
+       (insert (or (bookmark-location bookmark) "   -- no file --"))
       (if (display-mouse-p)
          (add-text-properties
           start