Function: add-file-local-variable-prop-line
add-file-local-variable-prop-line is an autoloaded, interactive and
byte-compiled function defined in files-x.el.gz.
Signature
(add-file-local-variable-prop-line VARIABLE VALUE &optional INTERACTIVE)
Documentation
Add file-local VARIABLE with its VALUE to the -*- line.
This command deletes all existing settings of VARIABLE (except mode
and eval) and adds a new file-local VARIABLE with VALUE to
the -*- line.
If there is no -*- line at the beginning of the current file buffer then this function adds it.
Probably introduced at or before Emacs version 23.2.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/files-x.el.gz
;;;###autoload
(defun add-file-local-variable-prop-line (variable value &optional interactive)
"Add file-local VARIABLE with its VALUE to the -*- line.
This command deletes all existing settings of VARIABLE (except `mode'
and `eval') and adds a new file-local VARIABLE with VALUE to
the -*- line.
If there is no -*- line at the beginning of the current file buffer
then this function adds it."
(interactive
(let ((variable (read-file-local-variable "Add -*- file-local variable")))
(list variable (read-file-local-variable-value variable) t)))
(modify-file-local-variable-prop-line variable value 'add-or-replace interactive))