diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2010-07-19 11:33:20 +0200 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2010-09-01 19:05:47 +0200 |
commit | abb490c57208fca1a1f5cda903c61f975df81f7f (patch) | |
tree | f41b2ae5da18c213404a105a1f9fe592d2184544 | |
parent | d830b4b3ee306e6c3c7af2209ccf1c68bf65fe83 (diff) | |
download | org-mode-abb490c57208fca1a1f5cda903c61f975df81f7f.tar.gz |
Internal functions stay with org-list- prefix.
-rw-r--r-- | lisp/org-list.el | 21 | ||||
-rw-r--r-- | lisp/org-timer.el | 4 |
2 files changed, 13 insertions, 12 deletions
diff --git a/lisp/org-list.el b/lisp/org-list.el index d1de4e9..1e8f981 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -265,7 +265,7 @@ the end of the nearest terminator from max." ;; we want to be on the first line of the list ender (match-beginning 0))))) -(defun org-search-unenclosed-internal (search-fun regexp bound noerror count) +(defun org-list-search-unenclosed-generic (search-fun regexp bound noerror count) "Search for REGEXP with SEARCH-FUN but don't stop inside blocks or at protected places." (let ((origin (point))) (cond @@ -278,17 +278,17 @@ the end of the nearest terminator from max." '(concat "^[ \t]*#\\+\\(end\\|END\\)_" (match-string 2)))) (get-text-property (match-beginning 0) 'org-protected)) (goto-char origin) - (org-search-unenclosed-internal search-fun regexp bound noerror (1+ count))) + (org-list-search-unenclosed-generic search-fun regexp bound noerror (1+ count))) ;; else return point. (t (point))))) (defun org-search-backward-unenclosed (regexp &optional bound noerror) "Like `re-search-backward' but don't stop inside blocks or at protected places." - (org-search-unenclosed-internal #'re-search-backward regexp bound noerror 1)) + (org-list-search-unenclosed-generic #'re-search-backward regexp bound noerror 1)) (defun org-search-forward-unenclosed (regexp &optional bound noerror) "Like `re-search-forward' but don't stop inside blocks or at protected places." - (org-search-unenclosed-internal #'re-search-forward regexp bound noerror 1)) + (org-list-search-unenclosed-generic #'re-search-forward regexp bound noerror 1)) (defun org-list-at-regexp-after-bullet-p (regexp) "Is point at a list item with REGEXP after bullet?" @@ -298,7 +298,7 @@ the end of the nearest terminator from max." (skip-chars-forward " \t") (looking-at regexp)))) -(defun org-get-item-same-level-internal (search-fun pos limit pre-move) +(defun org-list-get-item-same-level (search-fun pos limit pre-move) "Return point at the beginning of next item at the same level. Search items using function SEARCH-FUN, from POS to LIMIT. It uses PRE-MOVE before searches. Return nil if no item was found. @@ -322,8 +322,8 @@ Internal use only. Prefer `org-get-next-item' and (= (org-get-indentation) ind)) (point-at-bol))))) -(defun org-insert-item-internal (pos &optional checkbox after-bullet) - "Insert a new item in a list. +(defun org-list-insert-item-generic (pos &optional checkbox after-bullet) + "Insert a new list item at POS. If POS is before first character after bullet of the item, the new item will be created before the current one. @@ -563,7 +563,7 @@ Point returned is at eol." "Get the point of the next item at the same level as POS. Stop searching at LIMIT. Return nil if no item is found. This function does not move point." - (org-get-item-same-level-internal + (org-list-get-item-same-level #'org-search-forward-unenclosed pos limit @@ -573,7 +573,7 @@ Point returned is at eol." "Get the point of the previous item at the same level as POS. Stop searching at LIMIT. Return nil if no item is found. This function does not move point." - (org-get-item-same-level-internal + (org-list-get-item-same-level #'org-search-backward-unenclosed pos limit @@ -714,7 +714,8 @@ invisible." (and (org-beginning-of-item) (org-at-description-p))) (concat (read-string "Term: ") " :: ")))) - (org-insert-item-internal (point) (and checkbox (not desc-text)) desc-text))))) + (org-list-insert-item-generic + (point) (and checkbox (not desc-text)) desc-text))))) ;;; Indentation diff --git a/lisp/org-timer.el b/lisp/org-timer.el index 6b519ba..33c4c0b 100644 --- a/lisp/org-timer.el +++ b/lisp/org-timer.el @@ -201,10 +201,10 @@ it in the buffer." "Insert a description-type item with the current timer value." (interactive "P") (cond - ;; In a timer list, insert with `org-insert-item-internal'. + ;; In a timer list, insert with `org-list-insert-item-generic'. ((and (org-in-item-p) (save-excursion (org-beginning-of-item) (org-at-item-timer-p))) - (org-insert-item-internal + (org-list-insert-item-generic (point) nil (concat (org-timer (when arg '(4)) t) ":: "))) ;; In a list of another type, don't break anything: throw an error. ((org-in-item-p) |