Browse Source

Merge branch 'master' of orgmode.org:org-mode

Bastien Guerry 11 years ago
parent
commit
538a087cdd
3 changed files with 9 additions and 3 deletions
  1. 3 2
      lisp/org-element.el
  2. 1 1
      lisp/org.el
  3. 5 0
      testing/lisp/test-org-element.el

+ 3 - 2
lisp/org-element.el

@@ -5218,9 +5218,10 @@ Providing it allows for quicker computation."
 	((let ((post (org-element-property :post-affiliated element)))
 	   (and post (< origin post)))
 	 (beginning-of-line)
-	 (looking-at org-element--affiliated-re)
+	 (let ((case-fold-search t)) (looking-at org-element--affiliated-re))
 	 (cond
-	  ((not (member (upcase (match-string 1)) org-element-parsed-keywords))
+	  ((not (member-ignore-case (match-string 1)
+				    org-element-parsed-keywords))
 	   (throw 'objects-forbidden element))
 	  ((< (match-end 0) origin)
 	   (narrow-to-region (match-end 0) (line-end-position)))

+ 1 - 1
lisp/org.el

@@ -5685,7 +5685,7 @@ The time stamps may be either active or inactive.")
 	    (font-lock-prepend-text-property (match-beginning 2) (match-end 2)
 					     'face
 					     (nth 1 a))
-	    (and (nth 4 a)
+	    (and (nth 2 a)
 		 (org-remove-flyspell-overlays-in
 		  (match-beginning 0) (match-end 0)))
 	    (add-text-properties (match-beginning 2) (match-end 2)

+ 5 - 0
testing/lisp/test-org-element.el

@@ -2859,6 +2859,11 @@ Paragraph \\alpha."
        (org-test-with-temp-text "#+CAPTION: {{{macro}}}\n| a | b |."
 	 (progn (search-forward "{")
 		(org-element-type (org-element-context))))))
+  (should
+   (eq 'bold
+       (org-test-with-temp-text "#+caption: *bold*\nParagraph"
+	 (progn (search-forward "*")
+		(org-element-type (org-element-context))))))
   ;; Correctly set `:parent' property.
   (should
    (eq 'paragraph