summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2019-12-10 20:42:23 -0500
committerKyle Meyer <kyle@kyleam.com>2019-12-10 20:42:23 -0500
commite681ad5d4f929cace40a10a482b8daac127e0296 (patch)
tree393c0e9eb808c925f5b1072d274adbe984a071db
parent5b4e45eb27a9e0bd8697ddb49a281f6f9dda2906 (diff)
downloadorg-link-edit-e681ad5d4f929cace40a10a482b8daac127e0296.tar.gz
Replace compatibility kludge with org-element-lineage
Org v9.3 is now the minimum requirement.
-rw-r--r--org-link-edit.el7
1 files changed, 1 insertions, 6 deletions
diff --git a/org-link-edit.el b/org-link-edit.el
index 0c2cc27..e83b12a 100644
--- a/org-link-edit.el
+++ b/org-link-edit.el
@@ -67,12 +67,7 @@
(require 'cl-lib)
(defun org-link-edit--on-link-p (&optional element)
- (let ((el (or element (org-element-context))))
- ;; Don't use `org-element-lineage' because it isn't available
- ;; until Org version 8.3.
- (while (and el (not (memq (car el) '(link))))
- (setq el (org-element-property :parent el)))
- (eq (car el) 'link)))
+ (org-element-lineage (or element (org-element-context)) '(link) t))
(defun org-link-edit--link-data ()
"Return list with information about the link at point.