fix(upload): ssh-deploy-on-explicit-save: incorrect type
According to upstream package emacs-ssh-deploy, the value 0 should disable the auto-save behavior. As the ssh-deploy-on-explicit-save is considered true if its value is 0, it triggers the after-save-hook anyway. This commit fixes the hook so it conforms to upstream definition: ssh-deploy-on-explicit-save Enabled automatic uploads on save (integer) Co-authored-by: visika <visika@users.noreply.github.com> Close: #7513 Fix: #7512
This commit is contained in:
parent
6bea1f6a35
commit
5100ab121d
2 changed files with 3 additions and 2 deletions
|
@ -47,7 +47,7 @@ to establish this mapping. E.g.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
((nil . ((ssh-deploy-root-local . "/local/path/to/project")
|
((nil . ((ssh-deploy-root-local . "/local/path/to/project")
|
||||||
(ssh-deploy-root-remote . "/ssh:user@server:/remote/project/")
|
(ssh-deploy-root-remote . "/ssh:user@server:/remote/project/")
|
||||||
(ssh-deploy-on-explicit-save . t))))
|
(ssh-deploy-on-explicit-save . 1))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_quote
|
#+begin_quote
|
||||||
|
|
|
@ -37,7 +37,8 @@
|
||||||
(add-hook! 'after-save-hook
|
(add-hook! 'after-save-hook
|
||||||
(defun +upload-init-after-save-h ()
|
(defun +upload-init-after-save-h ()
|
||||||
(when (and (bound-and-true-p ssh-deploy-root-remote)
|
(when (and (bound-and-true-p ssh-deploy-root-remote)
|
||||||
ssh-deploy-on-explicit-save)
|
(integerp ssh-deploy-on-explicit-save)
|
||||||
|
(> ssh-deploy-on-explicit-save 0))
|
||||||
(ssh-deploy-upload-handler ssh-deploy-force-on-explicit-save))))
|
(ssh-deploy-upload-handler ssh-deploy-force-on-explicit-save))))
|
||||||
|
|
||||||
;; Enable ssh-deploy if variables are set, and check for changes on open file
|
;; Enable ssh-deploy if variables are set, and check for changes on open file
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue