Variable: break-hardlink-on-save

break-hardlink-on-save is a customizable variable defined in files.el.gz.

Value

nil

Documentation

Whether to allow breaking hardlinks when saving files.

If non-nil, then when saving a file that exists under several names (i.e., has multiple hardlinks), break the hardlink associated with buffer-file-name(var)/buffer-file-name(fun) and write to a new file, so that the other instances of the file are not affected by the save.

If buffer-file-name(var)/buffer-file-name(fun) refers to a symlink, do not break the symlink.

Unlike file-precious-flag, break-hardlink-on-save is not advisory. For example, if the directory in which a file is being saved is not itself writable, then error instead of saving in some hardlink-nonbreaking way.

See also backup-by-copying and backup-by-copying-when-linked.

This variable was added, or its default value changed, in Emacs 23.1.

Source Code

;; Defined in /usr/src/emacs/lisp/files.el.gz
(defcustom break-hardlink-on-save nil
  "Whether to allow breaking hardlinks when saving files.
If non-nil, then when saving a file that exists under several
names \(i.e., has multiple hardlinks), break the hardlink
associated with `buffer-file-name' and write to a new file, so
that the other instances of the file are not affected by the
save.

If `buffer-file-name' refers to a symlink, do not break the symlink.

Unlike `file-precious-flag', `break-hardlink-on-save' is not advisory.
For example, if the directory in which a file is being saved is not
itself writable, then error instead of saving in some
hardlink-nonbreaking way.

See also `backup-by-copying' and `backup-by-copying-when-linked'."
  :type 'boolean
  :group 'files
  :version "23.1")