Function: autoload-ensure-file-writeable
autoload-ensure-file-writeable is a byte-compiled function defined in
autoload.el.gz.
Signature
(autoload-ensure-file-writeable FILE)
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/autoload.el.gz
(defun autoload-ensure-file-writeable (file)
;; Probably pointless, but replaces the old AUTOGEN_VCS in lisp/Makefile,
;; which was designed to handle CVSREAD=1 and equivalent.
(and autoload-ensure-writable
(let ((modes (file-modes file)))
(if (and modes (zerop (logand modes #o0200)))
;; Ignore any errors here, and let subsequent attempts
;; to write the file raise any real error.
(ignore-errors (set-file-modes file (logior modes #o0200))))))
file)