summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-03-14 12:19:41 +0100
committerBastien Guerry <bzg@altern.org>2013-03-14 12:20:33 +0100
commita5a676e6092898895b61c00229e07910507f8f0c (patch)
tree093c473f13590862629ca6224005e61661021874
parentd3361ce3503fd25ea722136ecd14fe0d24c3541b (diff)
downloadorg-mode-a5a676e6092898895b61c00229e07910507f8f0c.tar.gz
org-element.el (org-element-context): Prevent an error when getting the context of a table rule
* org-element.el (org-element-context): Prevent an error when getting the context of a table rule. Thanks to Eric Abrahamsen for reporting this bug.
-rw-r--r--lisp/org-element.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org-element.el b/lisp/org-element.el
index 6810b98..ba2461a 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -4751,7 +4751,8 @@ Providing it allows for quicker computation."
:contents-begin element))
(cend (org-element-property
:contents-end element)))
- (and (>= origin cbeg)
+ (and cbeg cend ; cbeg is nil for table rules
+ (>= origin cbeg)
(<= origin cend)
(progn (goto-char cbeg) (setq end cend)))))
(and (eq type 'keyword)