summaryrefslogtreecommitdiff
path: root/lisp/shadowfile.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/shadowfile.el')
-rw-r--r--lisp/shadowfile.el3
1 files changed, 1 insertions, 2 deletions
diff --git a/lisp/shadowfile.el b/lisp/shadowfile.el
index 7cd0e325da0..d2cf09b475b 100644
--- a/lisp/shadowfile.el
+++ b/lisp/shadowfile.el
@@ -707,8 +707,7 @@ With non-nil argument also saves the buffer."
(defun shadow-save-todo-file ()
(if (and shadow-todo-buffer (buffer-modified-p shadow-todo-buffer))
- (save-excursion
- (set-buffer shadow-todo-buffer)
+ (with-current-buffer shadow-todo-buffer
(condition-case nil ; have to continue even in case of
(basic-save-buffer) ; error, otherwise kill-emacs might
(error ; not work!