Function: projectile-add-dir-local-variable

projectile-add-dir-local-variable is an autoloaded and byte-compiled function defined in projectile.el.

Signature

(projectile-add-dir-local-variable MODE VARIABLE VALUE)

Documentation

Run add-dir-local-variable with .dir-locals.el in root of project.

Parameters MODE VARIABLE VALUE are passed directly to add-dir-local-variable.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260310.858/projectile.el
;;;###autoload
(defun projectile-add-dir-local-variable (mode variable value)
  "Run `add-dir-local-variable' with .dir-locals.el in root of project.

Parameters MODE VARIABLE VALUE are passed directly to `add-dir-local-variable'."
  (let ((inhibit-read-only t)
        (default-directory (projectile-acquire-root)))
    (save-selected-window
      (add-dir-local-variable mode variable value)
      (save-buffer)
      (kill-buffer))))