From 2d94deee9875710adc4bbcb35253918ca4bc6b1c Mon Sep 17 00:00:00 2001 From: immerrr Date: Wed, 20 Mar 2013 01:04:33 +0400 Subject: [PATCH] Don't unindent comment close-bracket if it doesn't match open-bracket --- lua-mode.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua-mode.el b/lua-mode.el index d7a6332..e8a0f22 100644 --- a/lua-mode.el +++ b/lua-mode.el @@ -858,7 +858,9 @@ Return the amount the indentation changed by." (save-excursion (goto-char (lua-comment-or-string-start-pos)) (+ (current-indentation) - (if left-shifter-p + (if (and left-shifter-p + (looking-at (format "--\\[%s\\[" + (match-string-no-properties 1)))) 0 lua-indent-level))))))