alex-hhh / emacs-sql-indent

Syntax based indentation for SQL files inside GNU Emacs
GNU General Public License v3.0
121 stars 18 forks source link

Incorrect indentation after "drop function if exists" #80

Closed Stealthmate closed 5 years ago

Stealthmate commented 5 years ago

In the following example:

-- -*- sql-product: postgres; -*-
DROP FUNCTION IF EXISTS test;
       |  -- marker here

the marker gets indented even though it should stay at the beginning of the line. Removing IF EXISTS fixes it.

I tried replacing FUNCTION with each of the keywords in sqlind-good-if-candidate and I noticed the same thing happens with PROCEDURE too, but none of the other ones, so I guess it's conflicting with some code that handles function indentation.

alex-hhh commented 5 years ago

Thanks for reporting this, I pushed fix to the master branch, can you please verify it.

Stealthmate commented 5 years ago

It's indeed fixed! Thank you! :tada: