فهرست منبع

org-element: Small optimization

* lisp/org-element.el (org-element-at-point): Do not call
  `outline-next-heading' when an element at top level contains point.
  This is particularly important when the current section ends way
  after the point.
Nicolas Goaziou 11 سال پیش
والد
کامیت
fd877a7380
1فایلهای تغییر یافته به همراه1 افزوده شده و 2 حذف شده
  1. 1 2
      lisp/org-element.el

+ 1 - 2
lisp/org-element.el

@@ -4800,8 +4800,7 @@ element ending there."
 		   ((eobp) (setq element up))
 		   (t (setq element up next (point))))))))
        ;; Parse successively each element until we reach ORIGIN.
-       (let ((end (or (org-element-property
-                       :contents-end (org-element-property :parent element))
+       (let ((end (or (org-element-property :end element)
                       (save-excursion
                         (org-with-limited-levels (outline-next-heading))
                         (point))))