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

    Fix bug with wrong regexp and throw clause
    
    a wrong "end" keyword regexp would match non-keywords that ended with the
    string "end", causing problems
    
    also fixes a misspelling for a throw clause
---
 sql-indent.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sql-indent.el b/sql-indent.el
index afc4247..5cddb8d 100644
--- a/sql-indent.el
+++ b/sql-indent.el
@@ -337,7 +337,7 @@ But don't go before LIMIT."
 ;;;;; Find the syntax and beginning of the current block
 
 (defconst sqlind-end-statement-regexp
-  "end\\_>\\(?:[ \n\r\t]*\\)\\(if\\_>\\|loop\\_>\\|case\\_>\\)?\\(?:[ 
\n\r\f]*\\)\\([a-z0-9_]+\\)?"
+  "\\_<end_\\>\\(?:[ \n\r\t]*\\)\\(if\\_>\\|loop\\_>\\|case\\_>\\)?\\(?:[ 
\n\r\f]*\\)\\([a-z0-9_]+\\)?"
   "Match an end of statement.
 Matches a string like \"end if|loop|case MAYBE-LABEL\".")
 
@@ -621,7 +621,7 @@ See also `sqlind-beginning-of-block'"
            ;; we are creating a non-code block thing: table, view,
            ;; index, etc.  These things only exist at toplevel.
            (unless (null sqlind-end-stmt-stack)
-             (throw 'finised
+             (throw 'finished
                (list 'syntax-error "nested create statement" (point) (point))))
            (throw 'finished (list 'create-statement what name))))))))
 

Reply via email to