Skip to content

Commit

Permalink
Merge pull request #62 from stardiviner/option-for-uppercase
Browse files Browse the repository at this point in the history
Fix #60 add an option for uppercase/downcase ANSI SQL candidates
  • Loading branch information
kostafey committed Nov 11, 2018
2 parents 46cc1fa + b247a3d commit 2d16f9c
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions ejc-autocomplete.el
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@
(require 'ejc-doc)
(require 'ejc-format)

(defcustom ejc-candidates-uppercase t
"Use uppercase candidates or downcase.
Uppercase by default, set to nil to use downcase candidates."
:type 'boolean
:safe #'booleanp
:group 'ejc-sql)

(defcustom ejc-use-flx nil
"Non-nil enables `flx' fuzzy matching engine autocompletion."
:group 'ejc-sql
Expand Down Expand Up @@ -110,12 +117,13 @@
nil)))

(defun ejc-get-ansi-sql-words ()
(if (not (or (ejc-return-point) (ejc-get-prefix-word)))
(progn
(unless (or (ejc-return-point) (ejc-get-prefix-word))
(progn
(if ejc-candidates-uppercase
(append (mapcar 'upcase ejc-ansi-sql-words)
(mapcar 'upcase ejc-auxulary-sql-words))
(append ejc-ansi-sql-words
ejc-auxulary-sql-words
(mapcar 'upcase ejc-ansi-sql-words)
(mapcar 'upcase ejc-auxulary-sql-words)))
ejc-auxulary-sql-words)))
nil))

(defun ac-ejc-documentation (symbol-name)
Expand Down

0 comments on commit 2d16f9c

Please sign in to comment.