Function: delete-dir-local-variable

delete-dir-local-variable is an autoloaded, interactive and byte-compiled function defined in files-x.el.gz.

Signature

(delete-dir-local-variable MODE VARIABLE &optional FILE)

Documentation

Delete all MODE settings of dir-local VARIABLE from .dir-locals.el.

With a prefix argument, prompt for the file to modify.

When called from Lisp, FILE may be the expanded name of the dir-locals file from where to delete VARIABLE.

View in manual

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 delete-dir-local-variable (mode variable &optional file)
  "Delete all MODE settings of dir-local VARIABLE from .dir-locals.el.

With a prefix argument, prompt for the file to modify.

When called from Lisp, FILE may be the expanded name of the dir-locals file
from where to delete VARIABLE."
  (interactive
   (list
    (read-file-local-variable-mode)
    (read-file-local-variable "Delete directory-local variable")
    (when current-prefix-arg
      (read-dir-locals-file))))
  (modify-dir-local-variable mode variable nil 'delete file))