summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cpp.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/cpp.el')
-rw-r--r--lisp/progmodes/cpp.el3
1 files changed, 1 insertions, 2 deletions
diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el
index beb7b8cc066..2990cc34038 100644
--- a/lisp/progmodes/cpp.el
+++ b/lisp/progmodes/cpp.el
@@ -575,8 +575,7 @@ You can also use the keyboard accelerators indicated like this: [K]ey."
"Save the current cpp configuration in a file."
(interactive)
(require 'pp)
- (save-excursion
- (set-buffer cpp-edit-buffer)
+ (with-current-buffer cpp-edit-buffer
(let ((buffer (find-file-noselect cpp-config-file)))
(set-buffer buffer)
(erase-buffer)