From 14b15ab0618b41223304d97cb01b2b046004d2ce Mon Sep 17 00:00:00 2001 From: Chris Mann Date: Sun, 23 Nov 2008 11:02:42 +1030 Subject: [PATCH] * wesnoth-mode.el (wesnoth-complete-tag): No longer prompt when no tag available for completion. --- wesnoth-mode.el | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/wesnoth-mode.el b/wesnoth-mode.el index ac2c182..f75a59a 100644 --- a/wesnoth-mode.el +++ b/wesnoth-mode.el @@ -562,14 +562,15 @@ If COMPLETEP is non-nil, attempt to complete tag at point." (back-to-indentation) (and (looking-at "\\[/\\(\\(\\w\\|_\\)+\\)") (string= tag (match-string 1)))))) - (when completep - (delete-region (progn (back-to-indentation) (point)) - (progn (end-of-line) (point)))) - (if (and closedp completep) - (progn - (wesnoth-insert-and-indent "[" tag "]") - (end-of-line)) - (wesnoth-insert-tag elements tag)))) + (when tag + (when completep + (delete-region (progn (back-to-indentation) (point)) + (progn (end-of-line) (point)))) + (if (and closedp completep) + (progn + (wesnoth-insert-and-indent "[" tag "]") + (end-of-line)) + (wesnoth-insert-tag elements tag))))) (defun wesnoth-build-completion (position) "Create a new list for tag completion if necessary. -- 2.11.4.GIT