branch: externals/sql-indent
commit 102d31f59bc1f36e1cbd301bbbc3e112a6425bae
Author: Alex Harsanyi <[email protected]>
Commit: Alex Harsanyi <[email protected]>
fixup sqlind-lineup-joins-to-anchor
---
sql-indent.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/sql-indent.el b/sql-indent.el
index e0ef9d3..5b91e59 100644
--- a/sql-indent.el
+++ b/sql-indent.el
@@ -1709,9 +1709,11 @@ BASE-INDENTATION.
If this rule is added to `select-table-continuation' indentation,
it will indent lines starting with JOIN keywords to line up with
the FROM keyword."
- (if (looking-at "\\b\\(\\(inner\\|outer\\|cross\\)\\s-+\\)?join\\b")
- (sqlind-lineup-to-anchor syntax base-indentation)
- base-indentation))
+ (save-excursion
+ (back-to-indentation)
+ (if (looking-at "\\b\\(\\(inner\\|outer\\|cross\\)\\s-+\\)?join\\b")
+ (sqlind-lineup-to-anchor syntax base-indentation)
+ base-indentation)))
(defun sqlind-lineup-open-paren-to-anchor (syntax base-indentation)
"Align an open paranthesis with the anchor point of SYNTAX.