branch: externals/sql-indent
commit b1b6e2a9a7e3c91095db7d849837826512e847ac
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

    * sql-indent.el: Don't require cc-defs.
    
    (sqlind-indent-comment-start): Use line-end-position.
    (sqlind-indent-select-column, sqlind-indent-select-table)
    (sqlind-lineup-to-clause-end): Use eolp.
---
 sql-indent.el | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/sql-indent.el b/sql-indent.el
index 39c32a7..e4c383c 100644
--- a/sql-indent.el
+++ b/sql-indent.el
@@ -37,7 +37,6 @@
 
 (require 'sql)
 (require 'cl-lib)
-(eval-when-compile (require 'cc-defs))  ; for c-point
 
 ;;;; General setup
 
@@ -1890,7 +1889,7 @@ BASE-INDENTATION."
     (if (and (looking-at "\\s *--")
             (progn
               (forward-line -1)
-              (re-search-forward "--" (c-point 'eol) t)))
+              (re-search-forward "--" (line-end-position) t)))
        (progn
          (goto-char (match-beginning 0))
          (current-column))
@@ -1912,7 +1911,7 @@ first column after the SELECT clause we simply add
       (goto-char (match-end 0)))
     (skip-syntax-forward " ")
     (if (or (looking-at sqlind-comment-start-skip)
-            (looking-at "$"))
+            (eolp))
         (+ base-indentation sqlind-basic-offset)
       (current-column))))
 
@@ -1930,7 +1929,7 @@ table, we simply add `sqlind-basic-offset'."
       (goto-char (match-end 0)))
     (skip-syntax-forward " ")
     (if (or (looking-at sqlind-comment-start-skip)
-            (looking-at "$"))
+            (eolp))
         (+ base-indentation sqlind-basic-offset)
       (current-column))))
 
@@ -1952,7 +1951,7 @@ Argument BASE-INDENTATION is updated."
       (forward-char (1+ (length clause)))
       (skip-syntax-forward " ")
       (if (or (looking-at sqlind-comment-start-skip)
-              (looking-at "$"))
+              (eolp))
           ;; if the clause is on a line by itself, indent this line with a
           ;; sqlind-basic-offset
           (+ base-indentation sqlind-basic-offset)

Reply via email to