* wesnoth-mode.el (wesnoth-parent-tag): Fixed a bug where incorrectly
authorChris Mann <chpln@internode.on.net>
Sun, 1 Mar 2009 22:28:31 +0000 (2 08:58 +1030)
committerChris Mann <chpln@internode.on.net>
Sun, 1 Mar 2009 22:28:31 +0000 (2 08:58 +1030)
  formatted parent reference would be returned in some circumstances.

wesnoth-mode.el

index d987eda..e39c3bc 100644 (file)
@@ -536,7 +536,10 @@ Otherwise, return a string containing the name of the parent tag."
                                                            t)
                                   (string= (match-string 0) "{")))))
                (cons t position)
-             (cons (substring parent 1 (1- (length parent))) position))))))))
+             (cons (substring parent (if (string-match "[\\+.+]" parent)
+                                          2
+                                        1)
+                               (1- (length parent))) position))))))))
 
 (defun wesnoth-partial-macro-p ()
   "Return non-nil if point is in a partial macro."