Variable: file-preserve-symlinks-on-save
file-preserve-symlinks-on-save is a customizable variable defined in
files.el.gz.
Value
nil
Documentation
If non-nil, saving a buffer visited via a symlink won't overwrite the symlink.
This is only relevant if file-precious-flag is non-nil -- if
this is nil, Emacs will preserve the symlinks anyway.
This variable was added, or its default value changed, in Emacs 28.1.
Probably introduced at or before Emacs version 28.1.
Source Code
;; Defined in /usr/src/emacs/lisp/files.el.gz
(defcustom file-preserve-symlinks-on-save nil
"If non-nil, saving a buffer visited via a symlink won't overwrite the symlink.
This is only relevant if `file-precious-flag' is non-nil -- if
this is nil, Emacs will preserve the symlinks anyway."
:type 'boolean
:version "28.1"
:group 'files)