Commit b82adee1 authored by Johan Claesson's avatar Johan Claesson Committed by Lars Ingebrigtsen
Browse files

Invalidate dir-locals-directory-cache when writing dir-local file

* lisp/files-x.el (modify-dir-local-variable): Remove file from
the cache when writing to ensure that we load the new version
later (bug#13860).
parent f9464020
Pipeline #2890 failed with stage
in 67 minutes and 25 seconds
......@@ -491,6 +491,13 @@ from the MODE alist ignoring the input argument VALUE."
(cons `(,mode . ((,variable . ,value)))
variables))))
;; Invalidate cache (may be needed if this .dir-locals.el file
;; will be written with the same timestamp as is already present
;; in the cache, see bug#13860).
(setq dir-locals-directory-cache
(assoc-delete-all (file-name-directory variables-file)
dir-locals-directory-cache))
;; Insert modified alist of directory-local variables.
(insert ";;; Directory Local Variables\n")
(insert ";;; For more information see (info \"(emacs) Directory Variables\")\n\n")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment