Browse Source

org: Fix declaration of variable `org-state'

* lisp/org.el: The declaration of `org-state' fixes function `org-todo'.

Without the declaration the progressing of todo-states fails in some
cases with "Debugger entered--Lisp error: (void-variable org-state)".

Cf. thread http://permalink.gmane.org/gmane.emacs.orgmode/104179.
Marco Wahl 3 years ago
parent
commit
164555b46e
1 changed files with 1 additions and 0 deletions
  1. 1 0
      lisp/org.el

+ 1 - 0
lisp/org.el

@@ -12386,6 +12386,7 @@ nil or a string to be used for the todo mark." )
 				     bound1 t))
 	(replace-match "0" t nil nil 1)))))
 
+(defvar org-state) ;; dynamically scoped into this function
 (defun org-todo (&optional arg)
   "Change the TODO state of an item.
 The state of an item is given by a keyword at the start of the heading,