From: Kim F. Storm Date: Sun, 7 Jul 2002 23:15:04 +0000 (+0000) Subject: (after-find-file): Don't check for read-only status X-Git-Tag: ttn-vms-21-2-B4~14255 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=879365c68f72f63a0ad631d11bff2cca4a3aade1;p=emacs.git (after-find-file): Don't check for read-only status of files just created (and not yet saved on disk). --- diff --git a/lisp/files.el b/lisp/files.el index a93759298c3..27ecf1901d5 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -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)