1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Restore the window configuration

* lisp/net/nsm.el (nsm-query-user): Restore the window
configuration (bug#22532).
This commit is contained in:
Lars Ingebrigtsen 2016-02-05 17:34:44 +11:00
parent ebc6985b83
commit 44b15ee2e3

View file

@ -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))