summaryrefslogtreecommitdiff
path: root/sql-indent.el
diff options
context:
space:
mode:
authorAlex Harsányi <alex-hhh@users.noreply.github.com>2024-11-09 08:22:23 +0800
committerGitHub <noreply@github.com>2024-11-09 08:22:23 +0800
commit2ed4c6a26b8f3d651ac6231eaafb2565d77c918b (patch)
tree36a816fbcbfaca59a4aa5f60e072ddb8960f0428 /sql-indent.el
parentc3dd49ccd1f0655ed1699058c16a777ac1cb1419 (diff)
Consider "column" keyword in "if exists" checks (#109) (#110)externals/sql-indent
... to avoid indenting an "if" block in such cases
Diffstat (limited to 'sql-indent.el')
-rw-r--r--sql-indent.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql-indent.el b/sql-indent.el
index 76d06fb..ae65766 100644
--- a/sql-indent.el
+++ b/sql-indent.el
@@ -1,6 +1,6 @@
;;; sql-indent.el --- Support for indenting code in SQL files. -*- lexical-binding: t -*-
-;; Copyright (C) 2015, 2017-2018 Free Software Foundation, Inc
+;; Copyright (C) 2015, 2017-2018, 2024 Free Software Foundation, Inc
;; Author: Alex Harsanyi <AlexHarsanyi@gmail.com>
;; Created: 27 Sep 2006
@@ -496,7 +496,7 @@ We try to avoid false positives, like \"end if\" or the various
(forward-word -1)
;; we don't want to match an "end if", and things like "drop index if
;; exists..." and "create index if not exist..."
- (not (looking-at "end\\|schema\\|table\\|view\\|index\\|constraint\\|type\\|trigger\\|procedure\\|function\\|routine\\|package\\|body\\|extension")))))
+ (not (looking-at "end\\|schema\\|table\\|column\\|view\\|index\\|constraint\\|type\\|trigger\\|procedure\\|function\\|routine\\|package\\|body\\|extension")))))
(defun sqlind-maybe-if-statement ()
"If (point) is on an IF statement, report its syntax."