emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ssh-deploy c64013a 099/173: Made directory variables pe


From: Stefan Monnier
Subject: [elpa] externals/ssh-deploy c64013a 099/173: Made directory variables permanent
Date: Sat, 20 Oct 2018 10:36:38 -0400 (EDT)

branch: externals/ssh-deploy
commit c64013a6c4241e8930025825a912941c6393fece
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>

    Made directory variables permanent
---
 README.md     | 32 +++++++++++++++-----------------
 ssh-deploy.el | 16 ++++++++++++----
 2 files changed, 27 insertions(+), 21 deletions(-)

diff --git a/README.md b/README.md
index fa3225a..4f9b84c 100644
--- a/README.md
+++ b/README.md
@@ -113,30 +113,28 @@ Set your user and group as owner and file permissions to 
`600`. Emacs should now
 ``` elisp
 ;; ssh-deploy - prefix = C-c C-z, f = forced upload, u = upload, d = download, 
x = diff, t = terminal, b = browse
 (add-to-list 'load-path "~/.emacs.d/ssh-deploy/")
-(use-package ssh-deploy
-    :config
-    (add-hook 'after-save-hook (lambda() (if ssh-deploy-on-explicit-save 
(ssh-deploy-upload-handler)) ))
-    (add-hook 'find-file-hook (lambda() (if 
ssh-deploy-automatically-detect-remote-changes 
(ssh-deploy-remote-changes-handler)) ))
-    (global-set-key (kbd "C-c C-z f") (lambda() 
(interactive)(ssh-deploy-upload-handler-forced) ))
-    (global-set-key (kbd "C-c C-z u") (lambda() 
(interactive)(ssh-deploy-upload-handler) ))
-    (global-set-key (kbd "C-c C-z D") (lambda() 
(interactive)(ssh-deploy-delete-handler) ))
-    (global-set-key (kbd "C-c C-z d") (lambda() 
(interactive)(ssh-deploy-download-handler) ))
-    (global-set-key (kbd "C-c C-z x") (lambda() 
(interactive)(ssh-deploy-diff-handler) ))
-    (global-set-key (kbd "C-c C-z t") (lambda() 
(interactive)(ssh-deploy-remote-terminal-eshell-base-handler) ))
-    (global-set-key (kbd "C-c C-z T") (lambda() 
(interactive)(ssh-deploy-remote-terminal-eshell-handler) ))
-    (global-set-key (kbd "C-c C-z R") (lambda() 
(interactive)(ssh-deploy-rename-handler) ))
-    (global-set-key (kbd "C-c C-z e") (lambda() 
(interactive)(ssh-deploy-remote-changes-handler) ))
-    (global-set-key (kbd "C-c C-z b") (lambda() 
(interactive)(ssh-deploy-browse-remote-base-handler) )))
+(add-hook 'after-save-hook (lambda() (if (and (boundp 
'ssh-deploy-on-explicit-save) ssh-deploy-on-explicit-save) 
(ssh-deploy-upload-handler)) ))
+(add-hook 'find-file-hook (lambda() (if (and (boundp 
'ssh-deploy-automatically-detect-remote-changes) 
ssh-deploy-automatically-detect-remote-changes) 
(ssh-deploy-remote-changes-handler)) ))
+(global-set-key (kbd "C-c C-z f") (lambda() 
(interactive)(ssh-deploy-upload-handler-forced) ))
+(global-set-key (kbd "C-c C-z u") (lambda() 
(interactive)(ssh-deploy-upload-handler) ))
+(global-set-key (kbd "C-c C-z D") (lambda() 
(interactive)(ssh-deploy-delete-handler) ))
+(global-set-key (kbd "C-c C-z d") (lambda() 
(interactive)(ssh-deploy-download-handler) ))
+(global-set-key (kbd "C-c C-z x") (lambda() 
(interactive)(ssh-deploy-diff-handler) ))
+(global-set-key (kbd "C-c C-z t") (lambda() 
(interactive)(ssh-deploy-remote-terminal-eshell-base-handler) ))
+(global-set-key (kbd "C-c C-z T") (lambda() 
(interactive)(ssh-deploy-remote-terminal-eshell-handler) ))
+(global-set-key (kbd "C-c C-z R") (lambda() 
(interactive)(ssh-deploy-rename-handler) ))
+(global-set-key (kbd "C-c C-z e") (lambda() 
(interactive)(ssh-deploy-remote-changes-handler) ))
+(global-set-key (kbd "C-c C-z b") (lambda() 
(interactive)(ssh-deploy-browse-remote-base-handler) ))
 ```
 
-* Or use the hydra-script I'm using:
+* Or use the `use-package` and `hydra-script` I'm using:
 
 ``` elisp
       (use-package ssh-deploy
         :demand
         :bind (("C-c C-z" . hydra-ssh-deploy/body))
-        :hook ((after-save . (lambda() (if ssh-deploy-on-explicit-save 
(ssh-deploy-upload-handler)) ))
-               (find-file . (lambda() (if 
ssh-deploy-automatically-detect-remote-changes 
(ssh-deploy-remote-changes-handler)) )))
+        :hook ((after-save . (lambda() (if (and (boundp 
'ssh-deploy-on-explicit-save) ssh-deploy-on-explicit-save) 
(ssh-deploy-upload-handler)) ))
+               (find-file . (lambda() (if (and (boundp 
'ssh-deploy-automatically-detect-remote-changes) 
ssh-deploy-automatically-detect-remote-changes) 
(ssh-deploy-remote-changes-handler)) )))
         :config
         (defhydra hydra-ssh-deploy (:color red :hint nil)
           "
diff --git a/ssh-deploy.el b/ssh-deploy.el
index ca2012f..319a479 100644
--- a/ssh-deploy.el
+++ b/ssh-deploy.el
@@ -3,8 +3,8 @@
 ;; Author: Christian Johansson <github.com/cjohansson>
 ;; Maintainer: Christian Johansson <github.com/cjohansson>
 ;; Created: 5 Jul 2016
-;; Modified: 11 Dec 2017
-;; Version: 1.72
+;; Modified: 26 Jan 2018
+;; Version: 1.73
 ;; Keywords: tools, convenience
 ;; URL: https://github.com/cjohansson/emacs-ssh-deploy
 
@@ -46,10 +46,10 @@
 ;; Set permissions to this file to 700 with you as the owner.
 ;;
 ;; - To setup a upload hook on save do this:
-;;     (add-hook 'after-save-hook (lambda() (if ssh-deploy-on-explicit-save 
(ssh-deploy-upload-handler)) ))
+;;     (add-hook 'after-save-hook (lambda() (if (and (boundp 
'ssh-deploy-on-explicit-save) ssh-deploy-on-explicit-save) 
(ssh-deploy-upload-handler)) ))
 ;;
 ;; - To setup automatic storing of base revisions and detection of remote 
changes do this:
-;;     (add-hook 'find-file-hook (lambda() (if 
ssh-deploy-automatically-detect-remote-changes 
(ssh-deploy-remote-changes-handler)) ))
+;;     (add-hook 'find-file-hook (lambda() (if (and (boundp 
'ssh-deploy-automatically-detect-remote-changes) 
ssh-deploy-automatically-detect-remote-changes) 
(ssh-deploy-remote-changes-handler)) ))
 ;;
 ;; - To set key-bindings do something like this:
 ;;     (global-set-key (kbd "C-c C-z f") (lambda() 
(interactive)(ssh-deploy-upload-handler-forced) ))
@@ -104,41 +104,49 @@
   "String variable of local root, nil by default."
   :type 'string
   :group 'ssh-deploy)
+(put 'ssh-deploy-root-local 'permanent-local t)
 
 (defcustom ssh-deploy-root-remote nil
   "String variable of remote root, nil by default."
   :type 'string
   :group 'ssh-deploy)
+(put 'ssh-deploy-root-remote 'permanent-local t)
 
 (defcustom ssh-deploy-on-explicit-save t
   "Boolean variable if deploy should be made on explicit save, t by default."
   :type 'boolean
   :group 'ssh-deploy)
+(put 'ssh-deploy-on-explicit-save 'permanent-local t)
 
 (defcustom ssh-deploy-debug nil
   "Boolean variable if debug messages should be shown, nil by default."
   :type 'boolean
   :group 'ssh-deploy)
+(put 'ssh-deploy-debug 'permanent-local t)
 
 (defcustom ssh-deploy-async t
   "Boolean variable if asynchrous method for transfers should be used, t by 
default."
   :type 'boolean
   :group 'ssh-deploy)
+(put 'ssh-deploy-async 'permanent-local t)
 
 (defcustom ssh-deploy-revision-folder "~/.ssh-deploy-revisions/"
   "String variable with path to revisions with trailing slash."
   :type 'string
   :group 'ssh-deploy)
+(put 'ssh-deploy-revision-folder 'permanent-local t)
 
 (defcustom ssh-deploy-automatically-detect-remote-changes t
   "Detect remote changes and store base revisions automatically, t by default."
   :type 'boolean
   :group 'ssh-deploy)
+(put 'ssh-deploy-automatically-detect-remote-changes 'permanent-local t)
 
 (defcustom ssh-deploy-exclude-list '(".git/" ".dir-locals.el")
   "List of strings that if found in paths will exclude paths from sync, 
'(\"/.git\"/' \".dir-locals.el\") by default."
   :type 'list
   :group 'ssh-deploy)
+(put 'ssh-deploy-exclude-list 'permanent-local t)
 
 
 ;; PRIVATE FUNCTIONS



reply via email to

[Prev in Thread] Current Thread [Next in Thread]