Explorar o código

Merge branch 'maint'

Kyle Meyer %!s(int64=9) %!d(string=hai) anos
pai
achega
5bfdfc5df7
Modificáronse 1 ficheiros con 6 adicións e 5 borrados
  1. 6 5
      lisp/org-footnote.el

+ 6 - 5
lisp/org-footnote.el

@@ -662,11 +662,12 @@ offer additional commands in a menu."
 	 (type (org-element-type context)))
     (cond
      ;; On white space after element, insert a new footnote.
-     ((> (point)
-	 (save-excursion
-	   (goto-char (org-element-property :end context))
-	   (skip-chars-backward " \t")
-	   (point)))
+     ((and context
+	   (> (point)
+	      (save-excursion
+		(goto-char (org-element-property :end context))
+		(skip-chars-backward " \t")
+		(point))))
       (org-footnote-new))
      ((eq type 'footnote-reference)
       (let ((label (org-element-property :label context)))