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

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

[elpa] externals/ssh-deploy 364a99f 003/133: Added lexical-binding as fi


From: Stefan Monnier
Subject: [elpa] externals/ssh-deploy 364a99f 003/133: Added lexical-binding as file-local variable
Date: Sat, 27 Mar 2021 14:48:32 -0400 (EDT)

branch: externals/ssh-deploy
commit 364a99f0e6b78ff652fbe35f235b0f07102c3106
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>

    Added lexical-binding as file-local variable
---
 ssh-deploy-diff-mode.el |   2 +-
 ssh-deploy.el           | 294 ++++++++++++++++++++++--------------------------
 2 files changed, 137 insertions(+), 159 deletions(-)

diff --git a/ssh-deploy-diff-mode.el b/ssh-deploy-diff-mode.el
index 9331850..e6d3f99 100644
--- a/ssh-deploy-diff-mode.el
+++ b/ssh-deploy-diff-mode.el
@@ -1,4 +1,4 @@
-;;; ssh-deploy-diff-mode.el --- Mode for interactive directory differences
+;;; ssh-deploy-diff-mode.el --- Mode for interactive directory differences -*- 
lexical-binding: t -*-
 
 ;; Author: Christian Johansson <github.com/cjohansson>
 ;; Maintainer: Christian Johansson <github.com/cjohansson>
diff --git a/ssh-deploy.el b/ssh-deploy.el
index b8f1d09..74dc8bd 100644
--- a/ssh-deploy.el
+++ b/ssh-deploy.el
@@ -1,22 +1,20 @@
-;;; ssh-deploy.el --- Deployment via TRAMP, global or per directory.
+;;; ssh-deploy.el --- Deployment via TRAMP, global or per directory. -*- 
lexical-binding: t -*-
 
-;; Author: Christian Johansson <github.com/cjohansson>
-;; Maintainer: Christian Johansson <github.com/cjohansson>
+;; Author: Christian Johansson <christian@cvj.se>
+;; Maintainer: Christian Johansson <christian@cvj.se>
 ;; Created: 5 Jul 2016
-;; Modified: 19 Aug 2018
-;; Version: 2.0
+;; Modified: 24 Oct 2018
+;; Version: 2.01
 ;; Keywords: tools, convenience
 ;; URL: https://github.com/cjohansson/emacs-ssh-deploy
 
 ;; Package-Requires: ((emacs "24"))
 
-;; Copyright (C) 2017 - 2018 Christian Johansson
-
 ;; This file is not part of GNU Emacs.
 
 ;; This program is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or (at
+;; published by the Free Software Foundation; either version 3, or (at
 ;; your option) any later version.
 
 ;; This program is distributed in the hope that it will be useful, but
@@ -26,7 +24,7 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Spathoftware Foundation, Inc., 59 Temple Place - Suite 330,
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
 ;;; Commentary:
@@ -58,22 +56,22 @@
 ;;     (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) ))
-;;     (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 h") (lambda() 
(interactive)(ssh-deploy-remote-terminal-shell-base-handler) ))
-;;     (global-set-key (kbd "C-c C-z H") (lambda() 
(interactive)(ssh-deploy-remote-terminal-shell-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) ))
-;;     (global-set-key (kbd "C-c C-z B") (lambda() 
(interactive)(ssh-deploy-browse-remote-handler) ))
-;;     (global-set-key (kbd "C-c C-z o") (lambda() 
(interactive)(ssh-deploy-open-remote-file-handler) ))
-;;     (global-set-key (kbd "C-c C-z m") (lambda() 
(interactive)(ssh-deploy-remote-sql-mysql-handler) ))
-;;     (global-set-key (kbd "C-c C-z s") (lambda() 
(interactive)(ssh-deploy-run-deploy-script-handler) ))
+;;     (global-set-key (kbd "C-c C-z f") 'ssh-deploy-upload-handler-forced)
+;;     (global-set-key (kbd "C-c C-z u") 'ssh-deploy-upload-handler)
+;;     (global-set-key (kbd "C-c C-z D") 'ssh-deploy-delete-handler)
+;;     (global-set-key (kbd "C-c C-z d") 'ssh-deploy-download-handler)
+;;     (global-set-key (kbd "C-c C-z x") 'ssh-deploy-diff-handler)
+;;     (global-set-key (kbd "C-c C-z t") 
'ssh-deploy-remote-terminal-eshell-base-handler)
+;;     (global-set-key (kbd "C-c C-z T") 
'ssh-deploy-remote-terminal-eshell-handler)
+;;     (global-set-key (kbd "C-c C-z h") 
'ssh-deploy-remote-terminal-shell-base-handler)
+;;     (global-set-key (kbd "C-c C-z H") 
'ssh-deploy-remote-terminal-shell-handler)
+;;     (global-set-key (kbd "C-c C-z R") 'ssh-deploy-rename-handler)
+;;     (global-set-key (kbd "C-c C-z e") 'ssh-deploy-remote-changes-handler)
+;;     (global-set-key (kbd "C-c C-z b") 
'ssh-deploy-browse-remote-base-handler)
+;;     (global-set-key (kbd "C-c C-z B") 'ssh-deploy-browse-remote-handler)
+;;     (global-set-key (kbd "C-c C-z o") 'ssh-deploy-open-remote-file-handler)
+;;     (global-set-key (kbd "C-c C-z m") 'ssh-deploy-remote-sql-mysql-handler)
+;;     (global-set-key (kbd "C-c C-z s") 'ssh-deploy-run-deploy-script-handler)
 ;;
 ;; - To install and set-up using use-package and hydra do this:
 ;;   (use-package ssh-deploy
@@ -149,7 +147,7 @@
 ;; * `ssh-deploy-revision-folder' - The folder used for storing local 
revisions *(string)*
 ;; * `ssh-deploy-automatically-detect-remote-changes' - Enables automatic 
detection of remote changes *(boolean)*
 ;; * `ssh-deploy-on-explicit-save' - Enabled automatic uploads on save 
*(boolean)*
-;; * `ssh-deploy-exclude-list' - A list defining what paths to exclude from 
deployment *(list)*
+;; * `ssh-deploy-exclude-list' - A list defining what file names to exclude 
from deployment *(list)*
 ;; * `ssh-deploy-async' - Enables asynchronous transfers (you need to have 
`(make-thread)` or `async.el` available as well) *(boolean)*
 ;; * `ssh-deploy-remote-sql-database' - Default database when connecting to 
remote SQL database *(string)*
 ;; * `ssh-deploy-remote-sql-password' - Default password when connecting to 
remote SQL database *(string)*
@@ -165,7 +163,7 @@
 ;;; Code:
 
 
-(require 'ssh-deploy-diff-mode) ;; FIXME flycheck complains.. but why?
+(autoload 'ssh-deploy-diff-mode "ssh-deploy-diff-mode")
 
 (defgroup ssh-deploy nil
   "Upload, download, difference, browse and terminal handler for files and 
directories on remote hosts via TRAMP."
@@ -174,86 +172,74 @@
 
 (defcustom ssh-deploy-root-local nil
   "String variable of local root, nil by default."
-  :type 'string
-  :group 'ssh-deploy)
+  :type 'string)
 (put 'ssh-deploy-root-local 'permanent-local t)
 (put 'ssh-deploy-root-local 'safe-local-variable 'stringp)
 
 (defcustom ssh-deploy-root-remote nil
   "String variable of remote root, nil by default."
-  :type 'string
-  :group 'ssh-deploy)
+  :type 'string)
 (put 'ssh-deploy-root-remote 'permanent-local t)
 (put 'ssh-deploy-root-remote 'safe-local-variable 'stringp)
 
 (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)
+  :type 'boolean)
 (put 'ssh-deploy-on-explicit-save 'permanent-local t)
 (put 'ssh-deploy-on-explicit-save 'safe-local-variable 'booleanp)
 
 (defcustom ssh-deploy-debug nil
   "Boolean variable if debug messages should be shown, nil by default."
-  :type 'boolean
-  :group 'ssh-deploy)
+  :type 'boolean)
 (put 'ssh-deploy-debug 'permanent-local t)
 (put 'ssh-deploy-debug 'safe-local-variable 'booleanp)
 
 ;; TODO This flag needs to work better, you should not miss any useful 
notifications when this is on
 (defcustom ssh-deploy-verbose t
   "Boolean variable if debug messages should be shown, t by default."
-  :type 'boolean
-  :group 'ssh-deploy)
+  :type 'boolean)
 (put 'ssh-deploy-verbose 'permanent-local t)
 (put 'ssh-deploy-verbose 'safe-local-variable 'booleanp)
 
 (defcustom ssh-deploy-async t
   "Boolean variable if asynchronous method for transfers should be used, t by 
default."
-  :type 'boolean
-  :group 'ssh-deploy)
+  :type 'boolean)
 (put 'ssh-deploy-async 'permanent-local t)
 (put 'ssh-deploy-async 'safe-local-variable 'booleanp)
 
 (defcustom ssh-deploy-revision-folder "~/.ssh-deploy-revisions/"
-  "String variable with path to revisions with trailing slash."
-  :type 'string
-  :group 'ssh-deploy)
+  "String variable with file name to revisions with trailing slash."
+  :type 'string)
 (put 'ssh-deploy-revision-folder 'permanent-local t)
 (put 'ssh-deploy-revision-folder 'safe-local-variable 'stringp)
 
 (defcustom ssh-deploy-automatically-detect-remote-changes t
   "Detect remote changes and store base revisions automatically, t by default."
-  :type 'boolean
-  :group 'ssh-deploy)
+  :type 'boolean)
 (put 'ssh-deploy-automatically-detect-remote-changes 'permanent-local t)
 (put 'ssh-deploy-automatically-detect-remote-changes 'safe-local-variable 
'booleanp)
 
 (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)
+  "List of strings that if found in file name will exclude it from sync, 
'(\"/.git\"/' \".dir-locals.el\") by default."
+  :type 'list)
 (put 'ssh-deploy-exclude-list 'permanent-local t)
 (put 'ssh-deploy-exclude-list 'safe-local-variable 'listp)
 
 (defcustom ssh-deploy-remote-sql-database nil
   "String variable of remote sql database, nil by default."
-  :type 'string
-  :group 'ssh-deploy)
+  :type 'string)
 (put 'ssh-deploy-remote-sql-database 'permanent-local t)
 (put 'ssh-deploy-remote-sql-database 'safe-local-variable 'stringp)
 
 (defcustom ssh-deploy-remote-sql-password nil
   "String variable of remote sql password, nil by default."
-  :type 'string
-  :group 'ssh-deploy)
+  :type 'string)
 (put 'ssh-deploy-remote-sql-password 'permanent-local t)
 (put 'ssh-deploy-remote-sql-password 'safe-local-variable 'stringp)
 
 (defcustom ssh-deploy-remote-sql-port nil
   "Integer variable of remote sql port, nil by default."
-  :type 'number
-  :group 'ssh-deploy)
+  :type 'number)
 (put 'ssh-deploy-remote-sql-port 'permanent-local t)
 (put 'ssh-deploy-remote-sql-port 'safe-local-variable 'integerp)
 
@@ -266,22 +252,19 @@
 
 (defcustom ssh-deploy-remote-sql-user nil
   "String variable of remote sql user, nil by default."
-  :type 'string
-  :group 'ssh-deploy)
+  :type 'string)
 (put 'ssh-deploy-remote-sql-user 'permanent-local t)
 (put 'ssh-deploy-remote-sql-user 'safe-local-variable 'stringp)
 
 (defcustom ssh-deploy-remote-shell-executable nil
   "String variable of remote shell executable server, nil by default."
-  :type 'string
-  :group 'ssh-deploy)
+  :type 'string)
 (put 'ssh-deploy-remote-shell-executable 'permanent-local t)
 (put 'ssh-deploy-remote-shell-executable 'safe-local-variable 'stringp)
 
 (defcustom ssh-deploy-script nil
   "Lambda function to run with `funcall' when 
`ssh-deploy-run-deploy-script-handler' is executed."
-  :type 'lambda
-  :group 'ssh-deploy)
+  :type 'lambda)
 (put 'ssh-deploy-script 'permanent-local t)
 (put 'ssh-deploy-script 'safe-local-variable 'functionp)
 
@@ -322,20 +305,14 @@
 (defun ssh-deploy--async-process (start &optional finish)
   "Asynchronously do START and then optionally do FINISH."
   (if (fboundp 'make-thread)
-      (make-thread `(lambda()
-                      (let ((start ,start)
-                            (finish ,finish))
-                        (if (boundp 'start)
-                            (progn
-                              (let ((result (funcall start)))
-                                (if (boundp 'finish)
-                                    (progn
-                                      (funcall finish result)))))))))
+      (make-thread (lambda()
+                     (if start
+                         (let ((result (funcall start)))
+                           (if finish
+                               (funcall finish result))))))
     (if (fboundp 'async-start)
-        (if (boundp 'start)
-            (if (boundp 'finish)
-                (async-start start finish)
-              (async-start start)))
+        (if start
+            (async-start start finish))
       (display-warning 'ssh-deploy "Neither make-thread nor async-start 
functions are available!"))))
 
 (defun ssh-deploy--mode-line-set-status-and-update (status &optional filename)
@@ -446,18 +423,18 @@
         (let ((revision-path (ssh-deploy--get-revision-path path-local 
revision-folder)))
           (when ssh-deploy-verbose (message "Uploading file '%s' to '%s'.. 
(asynchronously)" path-local path-remote))
           (ssh-deploy--async-process
-           `(lambda()
+           (lambda()
               (require 'ediff-util)
               (if (fboundp 'ediff-same-file-contents)
-                  (if (or (eq t ,force) (not (file-exists-p ,path-remote)) 
(and (file-exists-p ,revision-path) (ediff-same-file-contents ,revision-path 
,path-remote)))
+                  (if (or (eq t force) (not (file-exists-p path-remote)) (and 
(file-exists-p revision-path) (ediff-same-file-contents revision-path 
path-remote)))
                       (progn
-                        (if (not (file-directory-p (file-name-directory 
,path-remote)))
-                            (make-directory (file-name-directory ,path-remote) 
t))
-                        (copy-file ,path-local ,path-remote t t t t)
-                        (copy-file ,path-local ,revision-path t t t t)
-                        (list 0 (format "Completed upload of file '%s'. 
(asynchronously)" ,path-remote) ,path-local))
-                    (list 1 (format "Remote file '%s' has changed, please 
download or diff. (asynchronously)" ,path-remote) ,path-local))
-                (list 1 "Function 'ediff-same-file-contents' is missing. 
(asynchronously)" ,path-local)))
+                        (if (not (file-directory-p (file-name-directory 
path-remote)))
+                            (make-directory (file-name-directory path-remote) 
t))
+                        (copy-file path-local path-remote t t t t)
+                        (copy-file path-local revision-path t t t t)
+                        (list 0 (format "Completed upload of file '%s'. 
(asynchronously)" path-remote) path-local))
+                    (list 1 (format "Remote file '%s' has changed please 
download or diff. (asynchronously)" path-remote) path-local))
+                (list 1 "Function 'ediff-same-file-contents' is missing. 
(asynchronously)" path-local)))
            (lambda(return)
              (ssh-deploy--mode-line-set-status-and-update 
ssh-deploy--status-idle (nth 2 return))
              (if (= (nth 0 return) 0)
@@ -466,9 +443,9 @@
       (progn
         (when ssh-deploy-verbose (message "Uploading directory '%s' to '%s'.. 
(asynchronously)" path-local path-remote))
         (ssh-deploy--async-process
-         `(lambda()
-            (copy-directory ,path-local ,path-remote t t t)
-            ,path-local)
+         (lambda()
+            (copy-directory path-local path-remote t t t)
+            path-local)
          (lambda(return-path)
            (ssh-deploy--mode-line-set-status-and-update 
ssh-deploy--status-idle return-path)
            (when ssh-deploy-verbose (message "Completed upload of directory 
'%s'. (asynchronously)" return-path))))))))
@@ -507,16 +484,16 @@
     (ssh-deploy--mode-line-set-status-and-update 
ssh-deploy--status-downloading path-local)
     (when ssh-deploy-verbose (message "Downloading '%s' to '%s'.. 
(asynchronously)" path-remote path-local))
     (ssh-deploy--async-process
-     `(lambda()
-        (let ((file-or-directory (not (file-directory-p ,path-remote))))
+     (lambda()
+        (let ((file-or-directory (not (file-directory-p path-remote))))
           (if file-or-directory
               (progn
-                (if (not (file-directory-p (file-name-directory ,path-local)))
-                    (make-directory (file-name-directory ,path-local) t))
-                (copy-file ,path-remote ,path-local t t t t)
-                (copy-file ,path-local ,revision-path t t t t))
-            (copy-directory ,path-remote ,path-local t t t))
-          ,path-local))
+                (if (not (file-directory-p (file-name-directory path-local)))
+                    (make-directory (file-name-directory path-local) t))
+                (copy-file path-remote path-local t t t t)
+                (copy-file path-local revision-path t t t t))
+            (copy-directory path-remote path-local t t t))
+          path-local))
      (lambda(return-path)
        (ssh-deploy--mode-line-set-status-and-update ssh-deploy--status-idle 
return-path)
        (when ssh-deploy-verbose (message "Completed download of '%s'. 
(asynchronously)" return-path))
@@ -722,7 +699,7 @@
 ;; these functions MUST only use module variables as fall-backs for missing 
arguments.
 
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-diff-files (file-a file-b)
   "Find difference between FILE-A and FILE-B."
   (require 'ediff-util)
@@ -734,7 +711,7 @@
           (ediff file-a file-b)))
     (display-warning 'ssh-deploy "Function 'ediff-same-file-contents' is 
missing." :warning)))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-diff-directories (directory-a directory-b &optional 
exclude-list async)
   "Find difference between DIRECTORY-A and DIRECTORY-B but exclude paths 
matching EXCLUDE-LIST, do it asynchronously is ASYNC is true."
   (if (not (boundp 'async))
@@ -745,12 +722,12 @@
       (let ((script-filename (file-name-directory (symbol-file 
'ssh-deploy-diff-directories))))
         (message "Calculating differences between directory '%s' and '%s'.. 
(asynchronously)" directory-a directory-b)
         (ssh-deploy--async-process
-         `(lambda()
-            (add-to-list 'load-path ,script-filename)
+         (lambda()
+            (add-to-list 'load-path script-filename)
             (require 'ssh-deploy)
-            (ssh-deploy--diff-directories-data ,directory-a ,directory-b (list 
,@exclude-list)))
+            (ssh-deploy--diff-directories-data directory-a directory-b (list 
@exclude-list)))
          (lambda(diff)
-           (message "Completed calculation of differences between directory 
'%s' and '%s'. Result: %s only in A, %s only in B, %s differs. 
(asynchronously)" (nth 0 diff) (nth 1 diff) (length (nth 4 diff)) (length (nth 
5 diff)) (length (nth 7 diff)))
+           (message "Completed calculation of differences between directory 
'%s' and '%s'. Result: %s only in A %s only in B %s differs. (asynchronously)" 
(nth 0 diff) (nth 1 diff) (length (nth 4 diff)) (length (nth 5 diff)) (length 
(nth 7 diff)))
            (if (or (> (length (nth 4 diff)) 0) (> (length (nth 5 diff)) 0) (> 
(length (nth 7 diff)) 0))
                (ssh-deploy--diff-directories-present diff)))))
     (progn
@@ -760,7 +737,7 @@
         (if (or (> (length (nth 4 diff)) 0) (> (length (nth 5 diff)) 0) (> 
(length (nth 7 diff)) 0))
             (ssh-deploy--diff-directories-present diff))))))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-remote-changes (path-local &optional root-local root-remote 
async revision-folder exclude-list)
   "Check if a local revision for PATH-LOCAL on ROOT-LOCAL and if remote file 
has changed on ROOT-REMOTE, do it optionally asynchronously if ASYNC is true, 
check for copies in REVISION-FOLDER and skip if path is in EXCLUDE-LIST."
   (let ((root-local (or root-local ssh-deploy-root-local))
@@ -790,20 +767,20 @@
 
                           ;; Asynchronous logic here
                           (ssh-deploy--async-process
-                           `(lambda()
-                              (if (file-exists-p ,path-remote)
+                           (lambda()
+                              (if (file-exists-p path-remote)
                                   (progn
                                     (require 'ediff-util)
                                     (if (fboundp 'ediff-same-file-contents)
-                                        (if (ediff-same-file-contents 
,revision-path ,path-remote)
-                                            (list 0 (format "Remote file '%s' 
has not changed. (asynchronously)" ,path-remote) ,path-local)
-                                          (if (ediff-same-file-contents 
,path-local ,path-remote)
+                                        (if (ediff-same-file-contents 
revision-path path-remote)
+                                            (list 0 (format "Remote file '%s' 
has not changed. (asynchronously)" path-remote) path-local)
+                                          (if (ediff-same-file-contents 
path-local path-remote)
                                               (progn
-                                                (copy-file ,path-local 
,revision-path t t t t)
-                                                (list 0 (format "Remote file 
'%s' is identical to local file '%s' but different to local revision. Updated 
local revision. (asynchronously)" ,path-remote ,path-local) ,path-local))
-                                            (list 1 (format "Remote file '%s' 
has changed, please download or diff. (asynchronously)" ,path-remote) 
,path-local)))
-                                      (list 1 "Function 
'ediff-same-file-contents' is missing. (asynchronously)" ,path-local)))
-                                (list 0 (format "Remote file '%s' doesn't 
exist. (asynchronously)" ,path-remote) ,path-local)))
+                                                (copy-file path-local 
revision-path t t t t)
+                                                (list 0 (format "Remote file 
'%s' is identical to local file '%s' but different to local revision. Updated 
local revision. (asynchronously)" path-remote path-local) path-local))
+                                            (list 1 (format "Remote file '%s' 
has changed please download or diff. (asynchronously)" path-remote) 
path-local)))
+                                      (list 1 "Function 
'ediff-same-file-contents' is missing. (asynchronously)" path-local)))
+                                (list 0 (format "Remote file '%s' doesn't 
exist. (asynchronously)" path-remote) path-local)))
                            (lambda(return)
 
                              ;; Update buffer status to idle
@@ -842,20 +819,20 @@
 
                         ;; Asynchronous logic here
                         (ssh-deploy--async-process
-                         `(lambda()
+                         (lambda()
 
                             ;; Does remote file exist?
-                            (if (file-exists-p ,path-remote)
+                            (if (file-exists-p path-remote)
                                 (progn
                                   (require 'ediff-util)
                                   (if (fboundp 'ediff-same-file-contents)
-                                      (if (ediff-same-file-contents 
,path-local ,path-remote)
+                                      (if (ediff-same-file-contents path-local 
path-remote)
                                           (progn
-                                            (copy-file ,path-local 
,revision-path t t t t)
-                                            (list 0 (format "Remote file '%s' 
has not changed, created base revision. (asynchronously)" ,path-remote) 
,path-local))
-                                        (list 1 (format "Remote file '%s' has 
changed, please download or diff. (asynchronously)" ,path-remote) ,path-local))
-                                    (list 1 "Function ediff-file-same-contents 
is missing. (asynchronously)" ,path-local)))
-                              (list 0 (format "Remote file '%s' doesn't exist. 
(asynchronously)" ,path-remote) ,path-local)))
+                                            (copy-file path-local 
revision-path t t t t)
+                                            (list 0 (format "Remote file '%s' 
has not changed created base revision. (asynchronously)" path-remote) 
path-local))
+                                        (list 1 (format "Remote file '%s' has 
changed please download or diff. (asynchronously)" path-remote) path-local))
+                                    (list 1 "Function ediff-file-same-contents 
is missing. (asynchronously)" path-local)))
+                              (list 0 (format "Remote file '%s' doesn't exist. 
(asynchronously)" path-remote) path-local)))
                          (lambda(return)
 
                            ;; Update buffer status to idle
@@ -901,15 +878,15 @@
                    buffer)
           (ssh-deploy--mode-line-set-status-and-update 
ssh-deploy--status-deleting buffer))
         (ssh-deploy--async-process
-         `(lambda()
-            (if (file-exists-p ,path)
-                (let ((file-or-directory (not (file-directory-p ,path))))
+         (lambda()
+            (if (file-exists-p path)
+                (let ((file-or-directory (not (file-directory-p path))))
                   (progn
                     (if file-or-directory
-                        (delete-file ,path t)
-                      (delete-directory ,path t t))
-                    (list ,path 0 ,buffer)))
-              (list ,path 1 ,buffer)))
+                        (delete-file path t)
+                      (delete-directory path t t))
+                    (list path 0 buffer)))
+              (list path 1 buffer)))
          (lambda(response)
            (when (nth 2 response)
              (ssh-deploy--mode-line-set-status-and-update 
ssh-deploy--status-idle (nth 2 response))
@@ -937,7 +914,7 @@
           (message "Completed deletion of '%s'. (synchronously)" path)))
       (display-warning 'ssh-deploy (format "Did not find '%s' for deletion. 
(synchronously)" path) :warning))))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-delete-both (path-local &optional root-local root-remote 
async debug exclude-list)
   "Delete PATH-LOCAL relative to ROOT-LOCAL as well as on ROOT-REMOTE, do it 
asynchronously if ASYNC is non-nil, debug if DEBUG is non-nil, check if path is 
excluded in EXCLUDE-LIST."
   (let ((root-local (or root-local ssh-deploy-root-local))
@@ -951,7 +928,7 @@
           (ssh-deploy-delete path-remote async debug path-local))
       (when debug (message "Path '%s' is not in the root '%s' or is excluded 
from it." path-local root-local)))))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-rename (old-path-local new-path-local &optional root-local 
root-remote async debug exclude-list)
   "Rename OLD-PATH-LOCAL to NEW-PATH-LOCAL under ROOT-LOCAL as well as on 
ROOT-REMOTE, do it asynchronously if ASYNC is non-nil, debug if DEBUG is 
non-nil but check if path is excluded in EXCLUDE-LIST first."
   (if (not (boundp 'debug))
@@ -979,9 +956,9 @@
           (message "Renamed '%s' to '%s'." old-path-local new-path-local)
           (if async
               (ssh-deploy--async-process
-               `(lambda()
-                  (rename-file ,old-path-remote ,new-path-remote t)
-                  (list ,old-path-remote ,new-path-remote ,new-path-local))
+               (lambda()
+                  (rename-file old-path-remote new-path-remote t)
+                  (list old-path-remote new-path-remote new-path-local))
                (lambda(files)
                  (ssh-deploy--mode-line-set-status-and-update 
ssh-deploy--status-idle (nth 2 files))
                  (message "Renamed '%s' to '%s'. (asynchronously)" (nth 0 
files) (nth 1 files))))
@@ -992,7 +969,7 @@
       (if debug
           (message "Path '%s' or '%s' is not in the root '%s' or is excluded 
from it." old-path-local new-path-local root-local)))))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-remote-sql (remote-path &optional type)
   "Open remote sql on REMOTE-PATH, TYPE determines type and defaults to mysql."
   (let ((sql-type (or type "mysql"))
@@ -1016,7 +993,7 @@
           ((string= sql-type "postgres") (sql-postgres remote-path))
           (t (display-warning 'ssh-deploy (format "SQL type %s not supported" 
type) :warning)))))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-browse-remote (path-local &optional root-local root-remote 
exclude-list)
   "Browse PATH-LOCAL in `dired-mode' on remote where it is inside ROOT-LOCAL 
and mirrored on ROOT-REMOTE and not in EXCLUDE-LIST."
   (let ((exclude-list (or exclude-list ssh-deploy-exclude-list))
@@ -1028,7 +1005,7 @@
           (message "Opening '%s' for browsing on remote host.." path-remote)
           (dired path-remote)))))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-remote-terminal-eshell (path-local &optional root-local 
root-remote exclude-list)
   "Browse PATH-LOCAL inside ROOT-LOCAL on ROOT-REMOTE in `eshell-mode' if not 
in EXCLUDE-LIST."
   (let ((exclude-list (or exclude-list ssh-deploy-exclude-list))
@@ -1045,7 +1022,7 @@
             (setq eshell-buffer-name path-remote)
             (eshell)))))))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-remote-terminal-shell (path-local &optional root-local 
root-remote exclude-list)
   "Browse PATH-LOCAL inside ROOT-LOCAL on ROOT-REMOTE in `eshell-mode' if not 
in EXCLUDE-LIST."
   (let ((exclude-list (or exclude-list ssh-deploy-exclude-list))
@@ -1061,7 +1038,7 @@
                 (explicit-shell-file-name ssh-deploy-remote-shell-executable))
             (shell path-remote)))))))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-store-revision (path &optional root)
   "Store PATH in revision-folder ROOT."
   (if (not (file-directory-p path))
@@ -1070,7 +1047,7 @@
         (when ssh-deploy-verbose (message "Storing revision of '%s' at '%s'.." 
path revision-path))
         (copy-file path revision-path t t t t))))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-diff (path-local path-remote &optional root-local debug 
exclude-list async)
   "Find differences between PATH-LOCAL and PATH-REMOTE, where PATH-LOCAL is 
inside ROOT-LOCAL.  DEBUG enables feedback message, check if PATH-LOCAL is not 
in EXCLUDE-LIST.   ASYNC make the process work asynchronously."
   (let ((file-or-directory (not (file-directory-p path-local)))
@@ -1088,7 +1065,7 @@
           (ssh-deploy-diff-directories path-local path-remote exclude-list 
async))
       (when debug (message "Path '%s' is not in the root '%s' or is excluded 
from it." path-local root-local)))))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-upload (path-local path-remote &optional force async 
revision-folder)
   "Upload PATH-LOCAL to PATH-REMOTE and ROOT-LOCAL via TRAMP, FORCE uploads 
despite remote change, ASYNC determines if transfer should be asynchronously, 
check version in REVISION-FOLDER."
   (if (not (boundp 'async))
@@ -1100,7 +1077,7 @@
         (ssh-deploy--upload-via-tramp-async path-local path-remote force 
revision-folder)
       (ssh-deploy--upload-via-tramp path-local path-remote force 
revision-folder))))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-download (path-remote path-local &optional async 
revision-folder)
   "Download PATH-REMOTE to PATH-LOCAL via TRAMP, ASYNC determines if transfer 
should be asynchrous or not, check for revisions in REVISION-FOLDER."
   (if (not (boundp 'async))
@@ -1117,7 +1094,7 @@
 ;; these functions MUST depend on module variables.
 
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-upload-handler (&optional force)
   "Upload current path to remote if it is configured for deployment and if 
remote version hasn't changed or FORCE is specified."
   (interactive)
@@ -1140,13 +1117,13 @@
               (ssh-deploy-upload path-local path-remote force ssh-deploy-async 
ssh-deploy-revision-folder))
           (when ssh-deploy-debug (message "Ignoring upload, path '%s' is 
empty, not in the root '%s' or is excluded from it." path-local root-local))))))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-upload-handler-forced ()
   "Upload current path to remote host if it is configured for deployment."
   (interactive)
   (ssh-deploy-upload-handler t))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-remote-changes-handler()
   "Check if local revision exists or remote file has changed if path is 
configured for deployment."
   (interactive)
@@ -1158,20 +1135,21 @@
         (ssh-deploy-remote-changes (file-truename buffer-file-name) 
(file-truename ssh-deploy-root-local) ssh-deploy-root-remote ssh-deploy-async 
ssh-deploy-revision-folder ssh-deploy-exclude-list))
     (when ssh-deploy-debug (message "Ignoring remote-changes check since a 
root is empty or the current buffer lacks a file-name."))))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-remote-sql-mysql-handler()
   "Open `sql-mysql' on remote path if path is configured for deployment."
   (interactive)
   (when (ssh-deploy--is-not-empty-string ssh-deploy-root-remote)
     (ssh-deploy-remote-sql ssh-deploy-root-remote "mysql")))
 
+;;;###autoload
 (defun ssh-deploy-remote-sql-postgres-handler()
   "Open `sql-postgres' on remote path if path is configured for deployment."
   (interactive)
   (when (ssh-deploy--is-not-empty-string ssh-deploy-root-remote)
     (ssh-deploy-remote-sql ssh-deploy-root-remote "postgres")))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-open-remote-file-handler()
   "Check if local revision exists or remote file has changed if path is 
configured for deployment."
   (interactive)
@@ -1184,7 +1162,7 @@
         (when ssh-deploy-verbose (message "Opening file on remote '%s'" 
path-remote))
         (find-file path-remote))))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-download-handler ()
   "Download current path from remote if it is configured for deployment."
   (interactive)
@@ -1205,7 +1183,7 @@
               (ssh-deploy-download path-remote path-local ssh-deploy-async 
ssh-deploy-revision-folder))
           (when ssh-deploy-debug (message "Ignoring upload, path '%s' is 
empty, not in the root '%s' or is excluded from it." path-local root-local))))))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-diff-handler ()
   "Compare current path with remote host if it is configured for deployment."
   (interactive)
@@ -1224,7 +1202,7 @@
                    (path-remote (concat ssh-deploy-root-remote 
(ssh-deploy--get-relative-path root-local path-local))))
               (ssh-deploy-diff path-local path-remote root-local 
ssh-deploy-debug ssh-deploy-exclude-list ssh-deploy-async))))))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-delete-handler ()
   "Delete current file or directory."
   (interactive)
@@ -1245,7 +1223,7 @@
               (if (string= yes-no-prompt "yes")
                   (ssh-deploy-delete-both path-local root-local 
ssh-deploy-root-remote ssh-deploy-async ssh-deploy-debug 
ssh-deploy-exclude-list)))))))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-rename-handler ()
   "Rename current file or directory."
   (interactive)
@@ -1270,7 +1248,7 @@
               (if (not (string= old-path-local new-path-local))
                   (ssh-deploy-rename old-path-local new-path-local root-local 
ssh-deploy-root-remote ssh-deploy-async ssh-deploy-debug 
ssh-deploy-exclude-list)))))))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-remote-terminal-eshell-handler ()
   "Open current relative path on remote host in `eshell' but only if it's 
configured for deployment."
   (interactive)
@@ -1281,7 +1259,7 @@
             (root-local (file-truename ssh-deploy-root-local)))
         (ssh-deploy-remote-terminal-eshell path-local root-local 
ssh-deploy-root-remote ssh-deploy-exclude-list))))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-remote-terminal-eshell-base-handler ()
   "Open base path on remote host in `eshell' but only if it's configured for 
deployment."
   (interactive)
@@ -1290,7 +1268,7 @@
       (let ((root-local (file-truename ssh-deploy-root-local)))
         (ssh-deploy-remote-terminal-eshell root-local root-local 
ssh-deploy-root-remote ssh-deploy-exclude-list))))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-remote-terminal-shell-handler ()
   "Open current relative path on remote host in `eshell' but only if it's 
configured for deployment."
   (interactive)
@@ -1301,7 +1279,7 @@
             (root-local (file-truename ssh-deploy-root-local)))
         (ssh-deploy-remote-terminal-shell path-local root-local 
ssh-deploy-root-remote ssh-deploy-exclude-list))))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-remote-terminal-shell-base-handler ()
   "Open base path on remote host in `eshell' but only if it's configured for 
deployment."
   (interactive)
@@ -1310,7 +1288,7 @@
       (let ((root-local (file-truename ssh-deploy-root-local)))
         (ssh-deploy-remote-terminal-shell root-local root-local 
ssh-deploy-root-remote ssh-deploy-exclude-list))))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-browse-remote-handler ()
   "Open current relative path on remote host in `dired-mode' if it is 
configured for deployment."
   (interactive)
@@ -1321,7 +1299,7 @@
             (root-local (file-truename ssh-deploy-root-local)))
         (ssh-deploy-browse-remote path-local root-local ssh-deploy-root-remote 
ssh-deploy-exclude-list))))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-browse-remote-base-handler ()
   "Open base path on remote host in `dired-mode' if it is configured for 
deployment."
   (interactive)
@@ -1330,7 +1308,7 @@
       (let ((root-local (file-truename ssh-deploy-root-local)))
         (ssh-deploy-browse-remote root-local root-local ssh-deploy-root-remote 
ssh-deploy-exclude-list))))
 
-;;;### autoload
+;;;###autoload
 (defun ssh-deploy-run-deploy-script-handler ()
   "Run `ssh-deploy-script' with `funcall'."
   (interactive)
@@ -1340,16 +1318,16 @@
           (progn
             (message "Executing of deployment-script starting... 
(asynchronously)")
             (ssh-deploy--async-process
-             `(lambda()
-                (let ((ssh-deploy-root-local ,ssh-deploy-root-local)
-                      (ssh-deploy-root-remote ,ssh-deploy-root-remote))
-                  (funcall ,ssh-deploy-script)))
+             (lambda()
+               (let ((ssh-deploy-root-local ssh-deploy-root-local)
+                     (ssh-deploy-root-remote ssh-deploy-root-remote))
+                 (funcall ssh-deploy-script)))
              (lambda(result) (message "Completed execution of 
deployment-script. '%s'(asynchronously)" result))))
         (progn
           (message "Executing of deployment-script starting... 
(synchronously)")
           (funcall ssh-deploy-script)
           (message "Completed execution of deployment-script. 
(synchronously)")))
-    (display-warning 'ssh-deploy (format "ssh-deploy-script lacks definition!" 
type) :warning)))
+    (display-warning 'ssh-deploy "ssh-deploy-script lacks definition!" 
:warning)))
 
 
 ;;; Menu-bar



reply via email to

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