Fix ansible layer for upstream changes in ansible minor mode

Ansible minor mode was recently updated to follow emacs-lisp style naming
convention. This commit makes corresponding function name changes in spacemacs
to fix ansible layer.

Reference:
* https://github.com/k1LoW/emacs-ansible/issues/28
* https://github.com/k1LoW/emacs-ansible/pull/31
This commit is contained in:
Ayush Goyal 2019-07-09 01:04:34 +05:30 committed by duianto
parent 6c12121cec
commit 5df46b200e
4 changed files with 8 additions and 7 deletions

View file

@ -1045,6 +1045,7 @@ Other:
(thanks to Codruț Constantin Gușoi) (thanks to Codruț Constantin Gușoi)
- Fixed =error void function ansible: auto-decrypt-encrypt= - Fixed =error void function ansible: auto-decrypt-encrypt=
(thanks to Sylvain Benner) (thanks to Sylvain Benner)
- Matched upstream Emacs coding convention names (thanks to Ayush Goyal)
**** Asm **** Asm
- Improvements: - Improvements:
- Added support for =company= package declaration (thanks to Kalle Lindqvist) - Added support for =company= package declaration (thanks to Kalle Lindqvist)

View file

@ -35,7 +35,7 @@ password to use somewhere in your =dotspacemacs/user-config= function.
For instance: For instance:
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq ansible::vault-password-file "path/to/pwd/file") (setq ansible-vault-password-file "path/to/pwd/file")
#+END_SRC #+END_SRC
The default value is the ansible-vault default value: =~/.vault_pass.txt=. The default value is the ansible-vault default value: =~/.vault_pass.txt=.
@ -49,7 +49,7 @@ password file for a given environment. Example:
;;; Directory Local Variables ;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables") ;;; For more information see (info "(emacs) Directory Variables")
((yaml-mode . ((ansible::vault-password-file . "path/to/vault_file")))) ((yaml-mode . ((ansible-vault-password-file . "path/to/vault_file"))))
#+END_SRC #+END_SRC
*** Automatic encryption and decryption *** Automatic encryption and decryption

View file

@ -22,7 +22,7 @@
(defun spacemacs/ansible-auto-decrypt-encrypt-vault () (defun spacemacs/ansible-auto-decrypt-encrypt-vault ()
"Auto decrypt/encrypt Vault files." "Auto decrypt/encrypt Vault files."
(when (spacemacs//ansible-should-enable?) (when (spacemacs//ansible-should-enable?)
(ansible::auto-decrypt-encrypt))) (ansible-auto-decrypt-encrypt)))
(defun spacemacs/ansible-company-maybe-enable () (defun spacemacs/ansible-company-maybe-enable ()
"Add the ansible company backend only for when ansible mode is active." "Add the ansible company backend only for when ansible mode is active."

View file

@ -19,11 +19,11 @@
(defun ansible/init-ansible () (defun ansible/init-ansible ()
(use-package ansible (use-package ansible
:defer t :defer t
:commands ansible::auto-decrypt-encrypt :commands ansible-auto-decrypt-encrypt
:init :init
(progn (progn
(add-hook 'yaml-mode-hook 'spacemacs/ansible-maybe-enable) (add-hook 'yaml-mode-hook 'spacemacs/ansible-maybe-enable)
(put 'ansible::vault-password-file 'safe-local-variable #'stringp) (put 'ansible-vault-password-file 'safe-local-variable #'stringp)
(if ansible-auto-encrypt-decrypt (if ansible-auto-encrypt-decrypt
;; add this hook to local-vars-hook to allow users to specify ;; add this hook to local-vars-hook to allow users to specify
;; a password file in directory local variables ;; a password file in directory local variables
@ -35,8 +35,8 @@
:config :config
(progn (progn
(spacemacs/set-leader-keys-for-minor-mode 'ansible (spacemacs/set-leader-keys-for-minor-mode 'ansible
"bd" 'ansible::decrypt-buffer "bd" 'ansible-decrypt-buffer
"be" 'ansible::encrypt-buffer)))) "be" 'ansible-encrypt-buffer))))
(defun ansible/init-ansible-doc () (defun ansible/init-ansible-doc ()
(use-package ansible-doc (use-package ansible-doc