* wesnoth-mode.el (wesnoth-estimate-element-type, wesnoth-guess-element-type):
New functions.
(wesnoth-element-at-point): Removed function.
(wesnoth-partial-macro-p): Removed unused variable.
(wesnoth-indent-or-complete): Removed `looking-back' usage. Use
`wesnoth-guess-element-type'. Improved behaviour when inserting closing.
(wesnoth-complete-preprocessor): No longer require character after `#' to
perform completion.
(wesnoth-complete-macro): Delete only current partial element. Save
excursion when determining completion.
(wesnoth-complete-attribute): Delete only the partial element. Replaced
`looking-back' usage.
(wesnoth-complete-tag): Replaced `looking-back' usage. Save-excursion when
determining completion. Delete only the partial element.
(wesnoth-insert-tag): Quote wesnoth-history-list to fix a bug. Delete
unused variable.
(wesnoth-insert-missing-closing): Tidied code for Emacsen missing
functionality. Return non-nil on success, nil otherwise.
(wesnoth-nth-pair-position): Removed unused variable.
(wesnoth-check-wml): Tided code for Emacsen missing functionality. Fixed a
bug where the last element would be reported for every missing element at
EOF.
(wesnoth-forward-warning, wesnoth-backward-warning, wesnoth-place-overlay,
wesnoth-check-structure): Tidied code for Emacsen missing functionality.