Dependencies: Make them work reliably even if variables are set too late.

Turns out a number of people set their variables too late so that
activating dependencies does not work correctly.  We now double-check
in the mode hook that everything is in order.....
This commit is contained in:
Carsten Dominik 2009-02-02 13:47:18 +01:00
parent cdc6824199
commit c11a0b2de9
3 changed files with 15 additions and 0 deletions

View File

@ -8174,6 +8174,7 @@ tdepth: @r{The depth of the table of contents. The defaults are taken from}
ftoc: @r{Does the css of the page specify a fixed position for the toc?}
@r{If yes, the toc will never be displayed as a section.}
ltoc: @r{Should there be short contents (children) in each section?}
@r{Make this @code{above} it the section should be above initial text.}
mouse: @r{Headings are highlighted when the mouse is over them. Should be}
@r{@samp{underline} (default) or a background color like @samp{#cccccc}.}
buttons: @r{Should view-toggle buttons be everywhere? When @code{nil} (the}

View File

@ -1,5 +1,7 @@
2009-02-02 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-mode): Make dependence stuff work more reliably.
* org-export-latex.el (org-export-latex-emphasis-alist): Use = and
~ as verbatim delimiters.

View File

@ -3597,6 +3597,18 @@ The following commands are available:
(org-set-autofill-regexps)
(setq indent-line-function 'org-indent-line-function)
(org-update-radio-target-regexp)
;; Make sure dependence stuff works reliably, even for users who set it
;; too late :-(
(if org-enforce-todo-dependencies
(add-hook 'org-blocker-hook
'org-block-todo-from-children-or-siblings)
(remove-hook 'org-blocker-hook
'org-block-todo-from-children-or-siblings))
(if org-enforce-todo-checkbox-dependencies
(add-hook 'org-blocker-hook
'org-block-todo-from-checkboxes)
(remove-hook 'org-blocker-hook
'org-block-todo-from-checkboxes))
;; Comment characters
; (org-set-local 'comment-start "#") ;; FIXME: this breaks wrapping