emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r99952: * lisp/eshell/esh-io.el (e


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r99952: * lisp/eshell/esh-io.el (eshell-get-target): Better detection of read-only file (Bug#6762).
Date: Fri, 30 Jul 2010 19:25:06 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 99952
author: Leo <address@hidden>
committer: Chong Yidong <address@hidden>
branch nick: emacs-23
timestamp: Fri 2010-07-30 19:25:06 -0400
message:
  * lisp/eshell/esh-io.el (eshell-get-target): Better detection of read-only 
file (Bug#6762).
modified:
  lisp/ChangeLog
  lisp/eshell/esh-io.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-07-30 00:50:13 +0000
+++ b/lisp/ChangeLog    2010-07-30 23:25:06 +0000
@@ -1,3 +1,8 @@
+2010-07-30  Leo  <address@hidden>
+
+       * eshell/esh-io.el (eshell-get-target): Better detection of
+       read-only file (Bug#6762).
+
 2010-07-30  Juanma Barranquero  <address@hidden>
 
        * align.el (align-default-spacing): Doc fix.

=== modified file 'lisp/eshell/esh-io.el'
--- a/lisp/eshell/esh-io.el     2010-01-13 08:35:10 +0000
+++ b/lisp/eshell/esh-io.el     2010-07-30 23:25:06 +0000
@@ -343,8 +343,9 @@
        (let* ((exists (get-file-buffer target))
               (buf (find-file-noselect target t)))
          (with-current-buffer buf
-           (if buffer-read-only
+           (if buffer-file-read-only
                (error "Cannot write to read-only file `%s'" target))
+           (setq buffer-read-only nil)
            (set (make-local-variable 'eshell-output-file-buffer)
                 (if (eq exists buf) 0 t))
            (cond ((eq mode 'overwrite)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]