Browse Source

org-footnote: Fix void `org-element-cache-reset' symbol error

* lisp/org-footnote.el (org-footnote-section): Fix void
  `org-element-cache-reset' symbol error.
Nicolas Goaziou 11 years ago
parent
commit
4223af978a
1 changed files with 4 additions and 1 deletions
  1. 4 1
      lisp/org-footnote.el

+ 4 - 1
lisp/org-footnote.el

@@ -114,7 +114,10 @@ you will need to run the following command after the change:
   \\[universal-argument] \\[org-element-cache-reset]"
   :group 'org-footnote
   :initialize 'custom-initialize-set
-  :set (lambda (var val) (set var val) (org-element-cache-reset 'all))
+  :set (lambda (var val)
+	 (set var val)
+	 (when (fboundp 'org-element-cache-reset)
+	   (org-element-cache-reset 'all)))
   :type '(choice
 	  (string :tag "Collect footnotes under heading")
 	  (const :tag "Define footnotes locally" nil)))