]> git.eshelyaron.com Git - emacs.git/commitdiff
(after-find-file): Don't check for read-only status
authorKim F. Storm <storm@cua.dk>
Sun, 7 Jul 2002 23:15:04 +0000 (23:15 +0000)
committerKim F. Storm <storm@cua.dk>
Sun, 7 Jul 2002 23:15:04 +0000 (23:15 +0000)
of files just created (and not yet saved on disk).

lisp/files.el

index a93759298c362444eafefd872641c18ca9d17b2b..27ecf1901d504a42a040d901751b4dee301e0e0f 100644 (file)
@@ -1424,7 +1424,8 @@ unless NOMODES is non-nil."
     (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)