emacs-diffs
[Top][All Lists]
Advanced

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

feature/rcirc-update b81c977 2/3: Query encryption using yes-or-no-p


From: Philip Kaludercic
Subject: feature/rcirc-update b81c977 2/3: Query encryption using yes-or-no-p
Date: Thu, 24 Jun 2021 17:27:40 -0400 (EDT)

branch: feature/rcirc-update
commit b81c97779909275b8b9d36c00d789dceba6f28e5
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Query encryption using yes-or-no-p
    
    * rcirc.el (rcirc-prompt-for-encryption): Replace completing-read
      prompt with yes-or-no-p
---
 lisp/net/rcirc.el | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 9e14d1b..6c27acf 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -691,12 +691,9 @@ that are joined after authentication."
 (defun rcirc-prompt-for-encryption (server-plist)
   "Prompt the user for the encryption method to use.
 SERVER-PLIST is the property list for the server."
-  (let ((choices '("plain" "tls"))
-        (default (or (plist-get server-plist :encryption)
-                     "plain")))
-    (intern
-     (completing-read (format-prompt "Encryption" default)
-                      choices nil t nil nil default))))
+  (if (or (eq (plist-get server-plist :encryption) 'plain)
+          (yes-or-no-p "Encrypt connection?"))
+      'tls 'plain))
 
 (defun rcirc-keepalive ()
   "Send keep alive pings to active rcirc processes.



reply via email to

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