--- a/files.el 2013-03-03 10:15:44.498835000 +0000 +++ b/files.el 2013-03-03 10:28:02.662835000 +0000 @@ -3610,14 +3610,14 @@ (defun dir-locals-find-file (file) (let ((cached-file (expand-file-name dir-locals-file-name (car dir-elt)))) (and (file-readable-p cached-file) - (equal (nth 2 dir-elt) - (nth 5 (file-attributes cached-file)))))) + (time-less-p (nth 5 (file-attributes cached-file)) + (nth 2 dir-elt))))) ;; This cache entry is OK. - dir-elt + dir-elt ;; This cache entry is invalid; clear it. (setq dir-locals-directory-cache (delq dir-elt dir-locals-directory-cache)) - ;; Return the first existing dir-locals file. Might be the same + ;; Return the first existing dir-locals file. Might be the same ;; as dir-elt's, might not (eg latter might have been deleted). locals-file) ;; No cache entry. @@ -3638,10 +3638,13 @@ (defun dir-locals-read-from-file (file) (let* ((dir-name (file-name-directory file)) (class-name (intern dir-name)) (variables (let ((read-circle nil)) - (read (current-buffer))))) + (read (current-buffer)))) + (just-now (time-subtract (current-time) + (list 0 1 0))) + (mtime (with-decoded-time-value ((high low micro just-now)) + (encode-time-value high low micro 1)))) (dir-locals-set-class-variables class-name variables) - (dir-locals-set-directory-class dir-name class-name - (nth 5 (file-attributes file))) + (dir-locals-set-directory-class dir-name class-name mtime) class-name)) (error (message "Error reading dir-locals: %S" err) nil)))))