aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2016-02-05 17:34:44 +1100
committerLars Ingebrigtsen2016-02-05 17:34:44 +1100
commit44b15ee2e3ad47f97ecdcc68a35ece7943abf289 (patch)
tree385a9a2efda7a12e70414b420d648b467de32ecb
parentebc6985b83ce2b1aefd761072d40ec3037bdd996 (diff)
downloademacs-44b15ee2e3ad47f97ecdcc68a35ece7943abf289.tar.gz
emacs-44b15ee2e3ad47f97ecdcc68a35ece7943abf289.zip
Restore the window configuration
* lisp/net/nsm.el (nsm-query-user): Restore the window configuration (bug#22532).
-rw-r--r--lisp/net/nsm.el43
1 files changed, 22 insertions, 21 deletions
diff --git a/lisp/net/nsm.el b/lisp/net/nsm.el
index b039d115946..d93b1bb14db 100644
--- a/lisp/net/nsm.el
+++ b/lisp/net/nsm.el
@@ -313,27 +313,28 @@ unencrypted."
313 313
314(defun nsm-query-user (message args cert) 314(defun nsm-query-user (message args cert)
315 (let ((buffer (get-buffer-create "*Network Security Manager*"))) 315 (let ((buffer (get-buffer-create "*Network Security Manager*")))
316 ;; First format the certificate and warnings. 316 (save-window-excursion
317 (with-help-window buffer 317 ;; First format the certificate and warnings.
318 (with-current-buffer buffer 318 (with-help-window buffer
319 (erase-buffer) 319 (with-current-buffer buffer
320 (when (> (length cert) 0) 320 (erase-buffer)
321 (insert cert "\n")) 321 (when (> (length cert) 0)
322 (let ((start (point))) 322 (insert cert "\n"))
323 (insert (apply #'format-message message args)) 323 (let ((start (point)))
324 (goto-char start) 324 (insert (apply #'format-message message args))
325 ;; Fill the first line of the message, which usually 325 (goto-char start)
326 ;; contains lots of explanatory text. 326 ;; Fill the first line of the message, which usually
327 (fill-region (point) (line-end-position))))) 327 ;; contains lots of explanatory text.
328 ;; Then ask the user what to do about it. 328 (fill-region (point) (line-end-position)))))
329 (unwind-protect 329 ;; Then ask the user what to do about it.
330 (cadr 330 (unwind-protect
331 (read-multiple-choice 331 (cadr
332 "Continue connecting?" 332 (read-multiple-choice
333 '((?a "always" "Accept this certificate this session and for all future sessions.") 333 "Continue connecting?"
334 (?s "session only" "Accept this certificate this session only.") 334 '((?a "always" "Accept this certificate this session and for all future sessions.")
335 (?n "no" "Refuse to use this certificate, and close the connection.")))) 335 (?s "session only" "Accept this certificate this session only.")
336 (kill-buffer buffer)))) 336 (?n "no" "Refuse to use this certificate, and close the connection."))))
337 (kill-buffer buffer)))))
337 338
338(defun nsm-save-host (host port status what permanency) 339(defun nsm-save-host (host port status what permanency)
339 (let* ((id (nsm-id host port)) 340 (let* ((id (nsm-id host port))