From 4a6d259df886b657dd15e0062f969f051583d5c3 Mon Sep 17 00:00:00 2001 From: Chris Mann Date: Sun, 12 Oct 2008 20:51:50 +1030 Subject: [PATCH] * wesnoth-mode.el (wesnoth-menu): Changed order slightly. (wesnoth-insert-missing-closing): Trivial code formatting change. (wesnoth-check-element-type): Removed trailing whitespace. (wesnoth-check-wml): Fixed a bug where #ifdef was never closed. --- wesnoth-mode.el | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/wesnoth-mode.el b/wesnoth-mode.el index 19d2d8f..df8355e 100644 --- a/wesnoth-mode.el +++ b/wesnoth-mode.el @@ -22,7 +22,7 @@ ;; wesnoth-mode is a major mode for Emacs which assists in the editing ;; of Wesnoth Markup Language (WML) files. Currently, this major-mode ;; features syntax highlighting support, automatic indentation, -;; context-sensitive completion and support for WML checking. +;; context-sensitive completion and WML checking. ;;; Commentary: ;; Add the following to your .emacs: @@ -205,8 +205,8 @@ level as their parent.") ["Insert Tag" wesnoth-complete-tag t] ["Insert Attribute" wesnoth-complete-attribute t] ["Insert Macro" wesnoth-complete-macro t] - ["Jump to Matching" wesnoth-jump-to-matching t] - ["Insert Missing Tag" wesnoth-insert-missing-closing t])) + ["Insert Missing Tag" wesnoth-insert-missing-closing t] + ["Jump to Matching" wesnoth-jump-to-matching t])) (defvar wesnoth-syntax-table (let ((wesnoth-syntax-table (make-syntax-table))) @@ -515,8 +515,7 @@ END will be the minimum and current positions of the buffer, respectively." (interactive) (if (and (boundp 'transient-mark-mode) - transient-mark-mode - mark-active) + transient-mark-mode mark-active) (setq start (region-beginning) end (copy-marker (region-end))) (setq start (point-min) @@ -743,7 +742,7 @@ be performed." (defun wesnoth-check-element-type (position last-tag) "Determine the context of the element. POSITION is the position of the element in the list. -LAST-TAG is the parent element." +LAST-TAG is the parent element." (let ((inhibit-changing-match-data t)) (if (or (not last-tag) (string-match "#\\(?:define\\|ifn?def\\)" last-tag)) (member (match-string-no-properties 1) @@ -815,8 +814,8 @@ ARGS is any additional data required by `format' to handle FORMAT-STRING." (unless (string= (car unmatched-tag-list) (second (assoc (match-string-no-properties 1) '(("enddef" "#define") - ("ifdef" "#endif") - ("ifndef" "#endif"))))) + ("endif" "#ifdef") + ("endif" "#ifndef"))))) (wesnoth-check-output outbuf "Preprocessor statement does not nest correctly")) -- 2.11.4.GIT