summaryrefslogtreecommitdiff
path: root/lisp/ledit.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/ledit.el')
-rw-r--r--lisp/ledit.el20
1 files changed, 9 insertions, 11 deletions
diff --git a/lisp/ledit.el b/lisp/ledit.el
index a41f968dc5f..c63992b0a62 100644
--- a/lisp/ledit.el
+++ b/lisp/ledit.el
@@ -94,11 +94,10 @@
(if ledit-save-files
(save-some-buffers))
(if (get-buffer ledit-buffer)
- (save-excursion
- (set-buffer ledit-buffer)
- (goto-char (point-min))
- (write-region (point-min) (point-max) ledit-zap-file)
- (erase-buffer)))
+ (with-current-buffer ledit-buffer
+ (goto-char (point-min))
+ (write-region (point-min) (point-max) ledit-zap-file)
+ (erase-buffer)))
(suspend-emacs ledit-go-to-lisp-string)
(load ledit-read-file t t))
@@ -108,12 +107,11 @@
(if ledit-save-files
(save-some-buffers))
(if (get-buffer ledit-buffer)
- (save-excursion
- (set-buffer ledit-buffer)
- (goto-char (point-min))
- (insert "(declare (macros t))\n")
- (write-region (point-min) (point-max) ledit-compile-file)
- (erase-buffer)))
+ (with-current-buffer ledit-buffer
+ (goto-char (point-min))
+ (insert "(declare (macros t))\n")
+ (write-region (point-min) (point-max) ledit-compile-file)
+ (erase-buffer)))
(suspend-emacs ledit-go-to-liszt-string)
(load ledit-read-file t t))