summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Maus <dmaus@ictsoc.de>2010-05-22 19:29:19 +0000
committerJohn Wiegley <johnw@newartisans.com>2010-05-26 22:53:36 -0600
commita3e5a2f7e47e447a38781a82c14d61aaf8f3233e (patch)
tree318ac9cd5fa4dd02b29ffc3ed09798068e34d6cf
parentaf080027fc2b0bb7eefba9110c7ef4b9cfd35624 (diff)
downloadorg-mode-a3e5a2f7e47e447a38781a82c14d61aaf8f3233e.tar.gz
org-w3m.el: Get text property directly, not using macro `w3m-anchor'.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/org-w3m.el9
2 files changed, 10 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 41d18f0..e960246 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -3,6 +3,12 @@
* org-timer.el (org-timer-set-timer): Fix bug about cancelling
timers.
+2010-05-22 David Maus <dmaus@ictsoc.de>
+
+ * org-w3m.el (org-w3m-copy-for-org-mode)
+ (org-w3m-get-next-link-start, org-w3m-get-prev-link-start):
+ Get text property directly, not using macro `w3m-anchor'.
+
2010-05-21 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-emph-re): Document the match groups.
diff --git a/lisp/org-w3m.el b/lisp/org-w3m.el
index 7108794..3f403c9 100644
--- a/lisp/org-w3m.el
+++ b/lisp/org-w3m.el
@@ -41,7 +41,6 @@
;;
(require 'org)
-(declare-function w3m-anchor "ext:w3m-util" (position))
(defun org-w3m-copy-for-org-mode ()
"Copy current buffer content or active region with `org-mode' style links.
@@ -68,7 +67,7 @@ so that it can be yanked into an Org-mode buffer with links working correctly."
;; store current point before jump next anchor
(setq temp-position (point))
;; move to next anchor when current point is not at anchor
- (or (w3m-anchor (point)) (org-w3m-get-next-link-start))
+ (or (get-text-property (point) 'w3m-href-anchor) (org-w3m-get-next-link-start))
(if (<= (point) transform-end) ; if point is inside transform bound
(progn
;; get content between two links.
@@ -77,7 +76,7 @@ so that it can be yanked into an Org-mode buffer with links working correctly."
(buffer-substring
temp-position (point)))))
;; get link location at current point.
- (setq link-location (w3m-anchor (point)))
+ (setq link-location (get-text-property (point) 'w3m-href-anchor))
;; get link title at current point.
(setq link-title (buffer-substring (point)
(org-w3m-get-anchor-end)))
@@ -115,7 +114,7 @@ so that it can be yanked into an Org-mode buffer with links working correctly."
(while (next-single-property-change (point) 'w3m-anchor-sequence)
;; jump to next anchor
(goto-char (next-single-property-change (point) 'w3m-anchor-sequence))
- (when (w3m-anchor (point))
+ (when (get-text-property (point) 'w3m-href-anchor)
;; return point when current is valid link
(throw 'reach nil))))
(point))
@@ -126,7 +125,7 @@ so that it can be yanked into an Org-mode buffer with links working correctly."
(while (previous-single-property-change (point) 'w3m-anchor-sequence)
;; jump to previous anchor
(goto-char (previous-single-property-change (point) 'w3m-anchor-sequence))
- (when (w3m-anchor (point))
+ (when (get-text-property (point) 'w3m-href-anchor)
;; return point when current is valid link
(throw 'reach nil))))
(point))