sql: move function to funcs.el
This commit is contained in:
parent
04910be2e2
commit
93913ebce1
18
layers/+lang/sql/funcs.el
Normal file
18
layers/+lang/sql/funcs.el
Normal file
|
@ -0,0 +1,18 @@
|
|||
;;; funcs.el --- SQL Layer functions File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; 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)))
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue