diff --git a/layers/+lang/sql/funcs.el b/layers/+lang/sql/funcs.el new file mode 100644 index 000000000..838622d81 --- /dev/null +++ b/layers/+lang/sql/funcs.el @@ -0,0 +1,18 @@ +;;; funcs.el --- SQL Layer functions File for Spacemacs +;; +;; Copyright (c) 2012-2018 Sylvain Benner & Contributors +;; +;; Author: Sylvain Benner +;; URL: https://github.com/syl20bnr/spacemacs +;; +;; This file is not part of GNU Emacs. +;; +;;; License: GPLv3 + +(defun spacemacs/sql-populate-products-list (&rest args) + "Update Spacemacs list of sql products" + (setq + spacemacs-sql-highlightable sql-product-alist + spacemacs-sql-startable (remove-if-not + (lambda (product) (sql-get-product-feature (car product) :sqli-program)) + sql-product-alist))) diff --git a/layers/+lang/sql/packages.el b/layers/+lang/sql/packages.el index fe06eebe2..bab4ead05 100644 --- a/layers/+lang/sql/packages.el +++ b/layers/+lang/sql/packages.el @@ -27,13 +27,6 @@ ;; should not set this to anything else than nil ;; the focus of SQLi is handled by spacemacs conventions sql-pop-to-buffer-after-send-region nil) - (defun spacemacs/sql-populate-products-list (&rest args) - "Update Spacemacs list of sql products" - (setq - spacemacs-sql-highlightable sql-product-alist - spacemacs-sql-startable (remove-if-not - (lambda (product) (sql-get-product-feature (car product) :sqli-program)) - sql-product-alist))) (advice-add 'sql-add-product :after #'spacemacs/sql-populate-products-list) (advice-add 'sql-del-product :after #'spacemacs/sql-populate-products-list) (spacemacs/sql-populate-products-list)