aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/eshell
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/esh-io.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el
index 1bcfe2b46e7..3aa785c7c1b 100644
--- a/lisp/eshell/esh-io.el
+++ b/lisp/eshell/esh-io.el
@@ -343,8 +343,9 @@ it defaults to `insert'."
343 (let* ((exists (get-file-buffer target)) 343 (let* ((exists (get-file-buffer target))
344 (buf (find-file-noselect target t))) 344 (buf (find-file-noselect target t)))
345 (with-current-buffer buf 345 (with-current-buffer buf
346 (if buffer-read-only 346 (if buffer-file-read-only
347 (error "Cannot write to read-only file `%s'" target)) 347 (error "Cannot write to read-only file `%s'" target))
348 (setq buffer-read-only nil)
348 (set (make-local-variable 'eshell-output-file-buffer) 349 (set (make-local-variable 'eshell-output-file-buffer)
349 (if (eq exists buf) 0 t)) 350 (if (eq exists buf) 0 t))
350 (cond ((eq mode 'overwrite) 351 (cond ((eq mode 'overwrite)