Explorar o código

Document the function `org-outline-level'

Carsten Dominik %!s(int64=15) %!d(string=hai) anos
pai
achega
680e17848e
Modificáronse 2 ficheiros con 11 adicións e 0 borrados
  1. 4 0
      lisp/ChangeLog
  2. 7 0
      lisp/org.el

+ 4 - 0
lisp/ChangeLog

@@ -1,3 +1,7 @@
+2009-10-13  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org.el (org-outline-level): Add doc string.
+
 2009-10-12  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-inlinetask.el (org-inlinetask-export): Re-introduce

+ 7 - 0
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)