Function: org-get-todo-sequence-head

org-get-todo-sequence-head is a byte-compiled function defined in org.el.gz.

Signature

(org-get-todo-sequence-head KWD)

Documentation

Return the head of the TODO sequence to which KWD belongs.

If KWD is not set, check if there is a text property remembering the right sequence.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org.el.gz
(defun org-get-todo-sequence-head (kwd)
  "Return the head of the TODO sequence to which KWD belongs.
If KWD is not set, check if there is a text property remembering the
right sequence."
  (let (p)
    (cond
     ((not kwd)
      (or (get-text-property (line-beginning-position) 'org-todo-head)
	  (progn
            (setq p (next-single-property-change (line-beginning-position)
                                                 'org-todo-head
                                                 nil (line-end-position)))
	    (get-text-property p 'org-todo-head))))
     ((not (member kwd org-todo-keywords-1))
      (car org-todo-keywords-1))
     (t (nth 2 (assoc kwd org-todo-kwd-alist))))))