0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-25 03:32:51 +00:00

Added some documentation to code.

This commit is contained in:
Nicolas Goaziou 2010-08-20 01:58:46 +02:00
parent b5eb7047f3
commit 347f39445a

View file

@ -173,8 +173,10 @@ that point is in a list."
(defcustom org-empty-line-terminates-plain-lists nil
"Non-nil means an empty line ends all plain list levels.
This variable only makes sense if `org-list-ending-method' is set
to 'regexp or 'both."
to 'regexp or 'both. This is then equivalent to set
`org-list-end-regexp' to \"^[ \\t]*$\"."
:group 'org-plain-lists
:type 'boolean)
@ -336,9 +338,12 @@ It looks for the boundary of the block in SEARCH direction."
(catch 'exit
(let ((origin (point)))
(while t
;; 1. No match: return to origin or bound, depending on NOERR.
(unless (funcall search re bound noerr)
(throw 'exit (and (goto-char (if (booleanp noerr) origin bound))
nil)))
;; 2. Match not in block or protected: return point. Else
;; skip the block and carry on.
(unless (or (get-text-property (match-beginning 0) 'org-protected)
(org-list-maybe-skip-block search bound))
(throw 'exit (point)))))))
@ -374,9 +379,12 @@ Return the position of the previous item, if applicable."
(while t
(cond
((or (bobp) (< (point) limit)) (throw 'exit nil))
;; skip blank lines..
((and (not (looking-at "[ \t]*$"))
;; blocks...
(not (org-list-maybe-skip-block
#'re-search-backward limit))
;; and items more indented.
(< (org-get-indentation) ind))
(throw 'exit (and (org-at-item-p) (point-at-bol))))
(t (beginning-of-line 0)))))))))
@ -958,8 +966,8 @@ change is an outdent."
(>= (org-get-indentation) ind-min))
(setq post-list (cons (org-list-struct-assoc-at-point)
post-list)))
;; we need to check if list is malformed and some
;; items are less indented that top-item
;; Is list is malformed? If some items are less
;; indented that top-item, add them anyhow.
(when (and (= (caar pre-list) 0) (org-at-item-p))
(setq post-list (cons (org-list-struct-assoc-at-point)
post-list))