branch: externals/sql-indent
commit 3e213d0aaf5e9a9ed1bfedf404e3a94619b1bcd4
Author: Alex Harsanyi <[email protected]>
Commit: Alex Harsanyi <[email protected]>

    fixup parsing of case clauses
---
 sql-indent.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sql-indent.el b/sql-indent.el
index 0bcd8f2..e43c02a 100644
--- a/sql-indent.el
+++ b/sql-indent.el
@@ -585,11 +585,11 @@ See also `sqlind-beginning-of-block'"
   "Return the syntax inside a CASE expression begining at START."
   (save-excursion
     (goto-char pos)
-    (cond ((looking-at "when\\|end")
+    (cond ((looking-at "when\\|end\\|else")
            ;; A WHEN, or END clause is indented relative to the start of the 
case
            ;; expression
            (cons 'case-clause start))
-          ((looking-at "then\\|else")
+          ((looking-at "then")
            ;; THEN and ELSE clauses are indented relative to the start of the
            ;; when clause, which we must find
            (while (not (and (re-search-backward "\\bwhen\\b")

Reply via email to