Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use an option to control input uppercase candidates or not #60

Closed
stardiviner opened this issue Nov 11, 2018 · 1 comment
Closed

use an option to control input uppercase candidates or not #60

stardiviner opened this issue Nov 11, 2018 · 1 comment

Comments

@stardiviner
Copy link
Contributor

Here is the implementation, if you want, I can send PR:

(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)

(defun ejc-get-ansi-sql-words ()
  (if (not (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)))
    nil))
@kostafey
Copy link
Owner

kostafey commented Nov 11, 2018

It's ok, please make a Pull request for it.

Furthermore, you can write

(unless (or (ejc-return-point) (ejc-get-prefix-word))
  ...)

instead of

(if (not (or (ejc-return-point) (ejc-get-prefix-word)))
    (progn
      ...
      )
  nil)

that's my outdated code... :)

kostafey added a commit that referenced this issue Nov 11, 2018
Fix #60 add an option for uppercase/downcase ANSI SQL candidates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants