Преглед изворни кода

Updated CONTRIB/lisp/org-bookmark.el.

Bastien Guerry пре 17 година
родитељ
комит
f2e90899f1
2 измењених фајлова са 12 додато и 7 уклоњено
  1. 5 0
      CONTRIB/ChangeLog
  2. 7 7
      CONTRIB/lisp/org-bookmark.el

+ 5 - 0
CONTRIB/ChangeLog

@@ -1,3 +1,8 @@
+2008-02-29  Tokuya Kameshima <kames@fa2.so-net.ne.jp>
+
+	* lisp/org-bookmark.el (org-bookmark-store-link): Use
+	`bookmark-all-names' instead of `bookmark-alist'.
+
 2008-02-29  Bastien Guerry  <bzg@altern.org>
 
 	* lisp/org-bookmark.el (org-bookmark-in-dired)

+ 7 - 7
CONTRIB/lisp/org-bookmark.el

@@ -56,7 +56,7 @@ Otherwise prompt the user for the right bookmark to use."
 
 (defun org-bookmark-store-link ()
   "Store a link to the current line's bookmark in bookmark list."
-  (let (file bookmark)
+  (let (file bookmark bmks)
     (cond ((and org-bookmark-in-dired
 		(eq major-mode 'dired-mode))
 	   (setq file (abbreviate-file-name (dired-get-filename))))
@@ -68,12 +68,12 @@ Otherwise prompt the user for the right bookmark to use."
 	(when (eq major-mode 'bookmark-bmenu-mode)
 	  (setq bookmark (bookmark-bmenu-bookmark)))
       (when (and (setq bmks 
-		       (mapcar (lambda(bmk)
-				 (if (equal file 
-					    (abbreviate-file-name 
-					     (cdr (assoc 'filename (cadr bmk)))))
-				     (car bmk)))
-			       bookmark-alist))
+		       (mapcar (lambda (name)
+				 (if (equal file
+					    (abbreviate-file-name
+					     (bookmark-location name)))
+				     name))
+			       (bookmark-all-names)))
 		 (setq bmks (delete nil bmks)))
 	(setq bookmark 
 	      (if (or (eq 1 (length bmks)) org-bookmark-use-first-bookmark)