Function: executable-chmod

executable-chmod is a byte-compiled function defined in executable.el.gz.

Signature

(executable-chmod)

Documentation

This gets called after saving a file to assure that it be executable.

You can set the absolute or relative mode in variable executable-chmod(var)/executable-chmod(fun) for non-executable files.

Probably introduced at or before Emacs version 21.1.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/executable.el.gz
(defun executable-chmod ()
  "This gets called after saving a file to assure that it be executable.
You can set the absolute or relative mode in variable `executable-chmod' for
non-executable files."
  (and executable-chmod
       buffer-file-name
       (or (file-executable-p buffer-file-name)
	   (set-file-modes buffer-file-name
			   (if (< executable-chmod 0)
			       (- executable-chmod)
			     (logior executable-chmod
				     (file-modes buffer-file-name)))))))