summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2011-07-24 15:33:48 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2011-08-18 15:45:02 +0200
commit4d780baa11c8ae2f7748f52e52bf0e50b66ac1bf (patch)
treed8ea259a0e3a60af47d77954648c37bb2ea0534b
parentff5a081002c7241f996429b9200dedcf23ee0db3 (diff)
downloadorg-mode-4d780baa11c8ae2f7748f52e52bf0e50b66ac1bf.tar.gz
org-indent: corrections to comments and doc-strings
-rw-r--r--lisp/org-indent.el24
1 files changed, 17 insertions, 7 deletions
diff --git a/lisp/org-indent.el b/lisp/org-indent.el
index 8fec496..a5754c3 100644
--- a/lisp/org-indent.el
+++ b/lisp/org-indent.el
@@ -27,7 +27,13 @@
;; This is an implementation of dynamic virtual indentation. It works
;; by adding text properties to a buffer to make sure lines are
;; indented according to outline structure.
-
+;;
+;; The process is synchronous, toggled at every buffer modification.
+;; Though, the initialization (indentation of text already in the
+;; buffer), which can take a few seconds in large buffers, happens on
+;; idle time and only when the buffer being initialized is the active
+;; one.
+;;
;;; Code:
(require 'org-macs)
@@ -127,8 +133,11 @@ turn on `org-hide-leading-stars'."
"When active, indent text according to outline structure.
Internally this works by adding `line-prefix' and `wrap-prefix'
-properties, after each buffer modifiation, on the modified zone."
- nil " Ind" nil
+properties, after each buffer modification, on the modified zone.
+
+The process is synchronous. Though, initial indentation of
+buffer, which can take a few seconds on large buffers, is done
+during idle time." nil " Ind" nil
(cond
((org-bound-and-true-p org-inhibit-startup)
(setq org-indent-mode nil))
@@ -242,7 +251,7 @@ you want to use this feature."
(org-with-wide-buffer
(goto-char beg)
(beginning-of-line)
- ;; 1. Initialize prefix at BEG. This is done by storing two
+ ;; 1. Initialize prefix at BEG. This is done by storing two
;; variables: INLINE-PF and PF, representing respectively
;; length of current `line-prefix' when line is inside an
;; inline task or not.
@@ -305,8 +314,9 @@ you want to use this feature."
((looking-at "\\*+ end[ \t]*$")
(funcall set-prop-and-move line wrap 'inline)
(setq pf-inline nil))
- ;; Start of inline task. Determine if it contains text,
- ;; or is only one line long. Set PF-INLINE accordingly.
+ ;; Start of inline task. Determine if it contains
+ ;; text, or if it is only one line long. Set
+ ;; PF-INLINE accordingly.
(t (funcall set-prop-and-move line wrap 'inline)
(setq pf-inline (and (org-inlinetask-in-task-p) wrap))))))
;; List item: `wrap-prefix' is set where body starts.
@@ -320,7 +330,7 @@ you want to use this feature."
(funcall set-prop-and-move line wrap nil))))))))))
(defun org-indent-notify-modified-headline (beg end)
- "Set `org-indent-modified-headline-flag' depending on the current command.
+ "Set `org-indent-modified-headline-flag' depending on context.
BEG and END are the positions of the beginning and end of the
range of deleted text.