emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] nsm 01/02: Allow callers to specify to NSM that we're in a


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] nsm 01/02: Allow callers to specify to NSM that we're in a non-interactive context
Date: Wed, 19 Nov 2014 15:25:56 +0000

branch: nsm
commit 8485d8d9f3d087c85acd4c640148b885d0b7d155
Author: Lars Magne Ingebrigtsen <address@hidden>
Date:   Wed Nov 19 16:21:30 2014 +0100

    Allow callers to specify to NSM that we're in a non-interactive context
    
    (nsm-noninteractive): New variable to enable callers to say that
    we're running in a non-interactive context.
---
 lisp/ChangeLog  |    2 ++
 lisp/net/nsm.el |    7 ++++++-
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a82976e..efec523 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -5,6 +5,8 @@
        instead of the certificate fingerprint.
        (nsm-fingerprint-ok-p): If the fingerprint changed, then remove
        previously accepted warnings.
+       (nsm-noninteractive): New variable to enable callers to say that
+       we're running in a non-interactive context.
 
 2014-11-18  Lars Magne Ingebrigtsen  <address@hidden>
 
diff --git a/lisp/net/nsm.el b/lisp/net/nsm.el
index f20fa00..2ef3a6e 100644
--- a/lisp/net/nsm.el
+++ b/lisp/net/nsm.el
@@ -58,6 +58,10 @@ stored in plain text."
   :group 'nsm
   :type 'boolean)
 
+(defvar nsm-noninteractive nil
+  "If non-nil, the connection is opened in a non-interactive context.
+This means that no queries should be performed.")
+
 (defun nsm-verify-connection (process host port &optional
                                      save-fingerprint warn-unencrypted)
   "Verify the security status of PROCESS that's connected to HOST:PORT.
@@ -207,7 +211,8 @@ unencrypted."
 
 (defun nsm-query (host port status what message &rest args)
   ;; If there is no user to answer queries, then say `no' to everything.
-  (if noninteractive
+  (if (or noninteractive
+         nsm-noninteractive)
       nil
     (let ((response
           (condition-case nil



reply via email to

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