]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix up previous window excursion patch in epa--select-keys
authorLars Ingebrigtsen <larsi@gnus.org>
Wed, 30 Sep 2020 23:44:05 +0000 (01:44 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 30 Sep 2020 23:44:05 +0000 (01:44 +0200)
* lisp/epa.el (epa--select-keys): Use save-window-excursion
instead of open-coding the macro.

lisp/epa.el

index a2fb7f2bd1d1c784ff6916092cfc78337439dcf7..25e055c201f361213200147c1ef2c42cfbc78cb9 100644 (file)
@@ -435,7 +435,7 @@ q  trust status questionable.  -  trust status unspecified.
   (unless (and epa-keys-buffer
                (buffer-live-p epa-keys-buffer))
     (setq epa-keys-buffer (generate-new-buffer "*Keys*")))
-  (let ((conf (current-window-configuration)))
+  (save-window-excursion
     (with-current-buffer epa-keys-buffer
       (epa-key-list-mode)
       ;; C-c C-c is the usual way to finish the selection (bug#11159).
@@ -462,8 +462,7 @@ q  trust status questionable.  -  trust status unspecified.
          (progn
            (recursive-edit)
            (epa--marked-keys))
-        (kill-buffer epa-keys-buffer)
-        (set-window-configuration conf)))))
+        (kill-buffer epa-keys-buffer)))))
 
 ;;;###autoload
 (defun epa-select-keys (context prompt &optional names secret)