Function: org-indent-initialize-buffer

org-indent-initialize-buffer is a byte-compiled function defined in org-indent.el.gz.

Signature

(org-indent-initialize-buffer BUFFER DELAY)

Documentation

Set virtual indentation for the buffer BUFFER, asynchronously.

Give hand to other idle processes if it takes longer than DELAY, a time value.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-indent.el.gz
(defun org-indent-initialize-buffer (buffer delay)
  "Set virtual indentation for the buffer BUFFER, asynchronously.
Give hand to other idle processes if it takes longer than DELAY,
a time value."
  (with-current-buffer buffer
    (when org-indent-mode
      (org-with-wide-buffer
       (let ((interruptp
	      ;; Always nil unless interrupted.
	      (catch 'interrupt
		(and org-indent--initial-marker
		     (marker-position org-indent--initial-marker)
		     (equal (marker-buffer org-indent--initial-marker)
			    buffer)
		     (org-indent-add-properties org-indent--initial-marker
						(point-max)
						delay)
		     nil))))
	 (move-marker org-indent--initial-marker interruptp)
	 ;; Job is complete: un-agentize buffer.
	 (unless interruptp
	   (setq org-indent-agentized-buffers
		 (delq buffer org-indent-agentized-buffers))))))))