emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 44b15ee: Restore the window configuration


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 44b15ee: Restore the window configuration
Date: Fri, 05 Feb 2016 06:35:51 +0000

branch: master
commit 44b15ee2e3ad47f97ecdcc68a35ece7943abf289
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Restore the window configuration
    
    * lisp/net/nsm.el (nsm-query-user): Restore the window
    configuration (bug#22532).
---
 lisp/net/nsm.el |   43 ++++++++++++++++++++++---------------------
 1 files changed, 22 insertions(+), 21 deletions(-)

diff --git a/lisp/net/nsm.el b/lisp/net/nsm.el
index b039d11..d93b1bb 100644
--- a/lisp/net/nsm.el
+++ b/lisp/net/nsm.el
@@ -313,27 +313,28 @@ unencrypted."
 
 (defun nsm-query-user (message args cert)
   (let ((buffer (get-buffer-create "*Network Security Manager*")))
-    ;; First format the certificate and warnings.
-    (with-help-window buffer
-      (with-current-buffer buffer
-       (erase-buffer)
-       (when (> (length cert) 0)
-         (insert cert "\n"))
-       (let ((start (point)))
-         (insert (apply #'format-message message args))
-         (goto-char start)
-         ;; Fill the first line of the message, which usually
-         ;; contains lots of explanatory text.
-         (fill-region (point) (line-end-position)))))
-    ;; Then ask the user what to do about it.
-    (unwind-protect
-        (cadr
-         (read-multiple-choice
-          "Continue connecting?"
-          '((?a "always" "Accept this certificate this session and for all 
future sessions.")
-            (?s "session only" "Accept this certificate this session only.")
-            (?n "no" "Refuse to use this certificate, and close the 
connection."))))
-      (kill-buffer buffer))))
+    (save-window-excursion
+      ;; First format the certificate and warnings.
+      (with-help-window buffer
+        (with-current-buffer buffer
+          (erase-buffer)
+          (when (> (length cert) 0)
+            (insert cert "\n"))
+          (let ((start (point)))
+            (insert (apply #'format-message message args))
+            (goto-char start)
+            ;; Fill the first line of the message, which usually
+            ;; contains lots of explanatory text.
+            (fill-region (point) (line-end-position)))))
+      ;; Then ask the user what to do about it.
+      (unwind-protect
+          (cadr
+           (read-multiple-choice
+            "Continue connecting?"
+            '((?a "always" "Accept this certificate this session and for all 
future sessions.")
+              (?s "session only" "Accept this certificate this session only.")
+              (?n "no" "Refuse to use this certificate, and close the 
connection."))))
+        (kill-buffer buffer)))))
 
 (defun nsm-save-host (host port status what permanency)
   (let* ((id (nsm-id host port))



reply via email to

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