summaryrefslogtreecommitdiff
path: root/lisp/epg.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/epg.el')
-rw-r--r--lisp/epg.el6
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/epg.el b/lisp/epg.el
index b8eb2b48ea7..929f0637480 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -1143,8 +1143,7 @@ This function is for internal use only."
(goto-char (point-max))
(insert input)))
(if (buffer-live-p (process-buffer process))
- (save-excursion
- (set-buffer (process-buffer process))
+ (with-current-buffer (process-buffer process)
(goto-char (point-max))
(insert input)
(unless epg-process-filter-running
@@ -1927,8 +1926,7 @@ You can then use `write-region' to write new data into the file."
(defun epg-cancel (context)
(if (buffer-live-p (process-buffer (epg-context-process context)))
- (save-excursion
- (set-buffer (process-buffer (epg-context-process context)))
+ (with-current-buffer (process-buffer (epg-context-process context))
(epg-context-set-result-for
epg-context 'error
(cons '(quit)