changeset 46233:0c400ea7ea4d

(after-find-file): Don't check for read-only status of files just created (and not yet saved on disk).
author Kim F. Storm <storm@cua.dk>
date Sun, 07 Jul 2002 23:15:04 +0000
parents c4de1416e022
children 58b8a59669f4
files lisp/files.el
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Sun Jul 07 23:13:45 2002 +0000
+++ b/lisp/files.el	Sun Jul 07 23:15:04 2002 +0000
@@ -1424,7 +1424,8 @@
     (setq buffer-read-only t))
   ;; When a file is marked read-only,
   ;; make the buffer read-only even if root is looking at it.
-  (when (zerop (logand (file-modes (buffer-file-name)) #o222))
+  (when (and (file-modes (buffer-file-name))
+	     (zerop (logand (file-modes (buffer-file-name)) #o222)))
     (setq buffer-read-only t))
   (unless nomodes
     (when (and view-read-only view-mode)