;; Computing a list structure can be a costly operation on huge lists
;; (a few thousand lines long). Thus, code should follow the rule :
-;; "collect once, use many". As a corollary, it is usally a bad idea
+;; "collect once, use many". As a corollary, it is usually a bad idea
;; to use directly an interactive function inside the code, as those,
-;; being independant entities, read the whole list structure another
+;; being independent entities, read the whole list structure another
;; time.
;;; Code:
-(eval-when-compile
+(eval-when-compile
(require 'cl))
(require 'org-macs)
(require 'org-compat)
(cond
((<= (point) lim-up)
;; At upward limit: if we ended at an item, store it,
- ;; else dimiss useless data recorded above BEG-CELL.
+ ;; else dismiss useless data recorded above BEG-CELL.
;; Jump to part 2.
(throw 'exit
(setq itm-lst
;; When `org-blank-before-new-entry' says so, it is 1.
((eq insert-blank-p t) 1)
;; `plain-list-item' is 'auto. Count blank lines separating
- ;; neighbours items in list.
+ ;; neighboring items in list.
(t (let ((next-p (org-list-get-next-item item struct prevs)))
(cond
;; Is there a next item?
If POS is before first character after bullet of the item, the
new item will be created before the current one.
-STRUCT is the list structure. PREVS is the the alist of previous
+STRUCT is the list structure. PREVS is the alist of previous
items, as returned by `org-list-prevs-alist'.
Insert a checkbox if CHECKBOX is non-nil, and string AFTER-BULLET
;; 1.1. Remove the item just created in structure.
(setq struct (delete (assq new-item struct) struct))
;; 1.2. Copy ITEM and any of its sub-items at NEW-ITEM.
- (setq struct (sort*
+ (setq struct (sort
(append
struct
(mapcar (lambda (e)
(defvar org-tab-ind-state)
(defun org-cycle-item-indentation ()
"Cycle levels of indentation of an empty item.
-The first run indents the item, if applicable. Subsequents runs
+The first run indents the item, if applicable. Subsequent runs
outdent it at meaningful levels in the list. When done, item is
put back at its original position with its original bullet.
Alternatively, each parameter can also be a form returning
a string. These sexp can use keywords `counter' and `depth',
-reprensenting respectively counter associated to the current
+representing respectively counter associated to the current
item, and depth of the current sub-list, starting at 0.
Obviously, `counter' is only available for parameters applying to
items."