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

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

[elpa] externals/ssh-deploy 8dadac5 032/133: Made menu-bar feature optio


From: Stefan Monnier
Subject: [elpa] externals/ssh-deploy 8dadac5 032/133: Made menu-bar feature optional
Date: Sat, 27 Mar 2021 14:48:38 -0400 (EDT)

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

    Made menu-bar feature optional
---
 README.md     |  2 ++
 ssh-deploy.el | 12 +++++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 8cf9d88..44efd34 100644
--- a/README.md
+++ b/README.md
@@ -154,6 +154,7 @@ By combining a `~/.authinfo.gpg` setup and a `public-key` 
setup you should be ab
 (add-to-list 'load-path "~/.emacs.d/ssh-deploy/")
 (require 'ssh-deploy)
 (ssh-deploy-line-mode) ;; If you want mode-line feature
+(ssh-deploy-add-menu) ;; If you want menu-bar feature
 (ssh-deploy-add-after-save-hook) ;; If you want automatic upload support
 (ssh-deploy-add-find-file-hook) ;; If you want detecting remote changes support
 (global-set-key (kbd "C-c C-z") 'ssh-deploy-prefix-map)
@@ -175,6 +176,7 @@ If you want to use the pre-defined hydra you can use this 
key-binding instead:
                (find-file . ssh-deploy-find-file))
         :config
         (ssh-deploy-line-mode) ;; If you want mode-line feature
+        (ssh-deploy-add-menu) ;; If you want menu-bar feature
       )
 ```
 
diff --git a/ssh-deploy.el b/ssh-deploy.el
index 1cfc997..844cd95 100644
--- a/ssh-deploy.el
+++ b/ssh-deploy.el
@@ -58,8 +58,11 @@
 ;; - To setup automatic storing of base revisions and detection of remote 
changes do this:
 ;; Add to init-script: (ssh-deploy-add-find-file-hook)
 ;;
-;; - To enable mode line to this:
-;;    (ssh-deploy-line-mode)
+;; - To enable mode-line feature do this:
+;; (ssh-deploy-line-mode)
+;;
+;; - To enable menu-bar feature do this:
+;; (ssh-deploy-add-menu)
 ;;
 ;; - To set global key-bindings do something like this:
 ;;     (global-set-key (kbd "C-c C-z") 'ssh-deploy-prefix-map)
@@ -76,6 +79,7 @@
 ;;            (find-file . ssh-deploy-find-file))
 ;;     :config
 ;;     (ssh-deploy-line-mode) ;; If you want mode-line feature
+;;     (ssh-deploy-add-menu) ;; If you want menu-bar feature
 ;;    )
 ;;
 ;;
@@ -1350,7 +1354,9 @@
       (define-key-after global-map [menu-bar sshdeploy] (cons "Deployment" 
ssh-deploy-menu-map) 'tools)
     (define-key-after global-map [menu-bar sshdeploy] 'undefined 'tools)))
 
-(add-hook 'menu-bar-update-hook 'ssh-deploy-menu-map-update)
+(defun ssh-deploy-add-menu ()
+  "Add menu-bar support."
+  (add-hook 'menu-bar-update-hook 'ssh-deploy-menu-map-update))
 
 
 ;;; Mode Line



reply via email to

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