From: Chris Mann Date: Sun, 1 Mar 2009 22:28:31 +0000 (+1030) Subject: * wesnoth-mode.el (wesnoth-parent-tag): Fixed a bug where incorrectly X-Git-Url: https://repo.or.cz/w/wesnoth-mode.git/commitdiff_plain/e935650a253ef2655748488a09e5691f8c7e67db * wesnoth-mode.el (wesnoth-parent-tag): Fixed a bug where incorrectly formatted parent reference would be returned in some circumstances. --- diff --git a/wesnoth-mode.el b/wesnoth-mode.el index d987eda..e39c3bc 100644 --- a/wesnoth-mode.el +++ b/wesnoth-mode.el @@ -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."