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.
This commit is contained in:
Bastien Guerry 2013-03-14 12:19:41 +01:00
parent d3361ce350
commit a5a676e609
1 changed files with 2 additions and 1 deletions

View File

@ -4751,7 +4751,8 @@ Providing it allows for quicker computation."
:contents-begin element)) :contents-begin element))
(cend (org-element-property (cend (org-element-property
:contents-end element))) :contents-end element)))
(and (>= origin cbeg) (and cbeg cend ; cbeg is nil for table rules
(>= origin cbeg)
(<= origin cend) (<= origin cend)
(progn (goto-char cbeg) (setq end cend))))) (progn (goto-char cbeg) (setq end cend)))))
(and (eq type 'keyword) (and (eq type 'keyword)