diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3db6d7c0e..28ee1a8fd 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2009-10-13 Carsten Dominik + + * org.el (org-outline-level): Add doc string. + 2009-10-12 Carsten Dominik * org-inlinetask.el (org-inlinetask-export): Re-introduce diff --git a/lisp/org.el b/lisp/org.el index a03dc0823..d3d886ff0 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -4659,6 +4659,13 @@ between words." t))) (defun org-outline-level () + "Compute the outline level of the heading at point. +This function assumes that the cursor is at the beginning of a line matched +by outline-regexp. Otherwise it returns garbage. +If this is called at a normal headline, the level is the number of stars. +Use `org-reduced-level' to remove the effect of `org-odd-levels'. +For plain list items, if they are matched by `outline-regexp', this returns +1000 plus the line indentation." (save-excursion (looking-at outline-regexp) (if (match-beginning 1)