tools/upload: refactor safe-local-variable setters

This commit is contained in:
Henrik Lissner 2018-09-19 23:58:01 -04:00
parent e0e63850d4
commit 25d19514de
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -20,14 +20,13 @@
ssh-deploy-remote-changes-handler) ssh-deploy-remote-changes-handler)
:init :init
;; Make these safe as file-local variables ;; Make these safe as file-local variables
(dolist (sym '(ssh-deploy-root-local (dolist (sym '((ssh-deploy-root-local . stringp)
ssh-deploy-root-remote (ssh-deploy-root-remote . stringp)
ssh-deploy-async (ssh-deploy-script . functionp)
ssh-deploy-script)) (ssh-deploy-on-explicitly-save . booleanp)
(put sym 'safe-local-variable #'stringp)) (ssh-deploy-async . booleanp)
(put 'ssh-deploy-on-explicitly-save 'safe-local-variable #'booleanp) (ssh-deploy-exclude-list . listp)))
(put 'ssh-deploy-async 'safe-local-variable #'booleanp) (put (car sym) 'safe-local-variable (cdr sym)))
(put 'ssh-deploy-exclude-list 'safe-local-variable #'listp)
;; Maybe auto-upload on save ;; Maybe auto-upload on save
(defun +upload|init-after-save () (defun +upload|init-after-save ()