From bd23461b6151af07f2981b5e4fb97dae1e03beb1 Mon Sep 17 00:00:00 2001 From: Tom Gillespie Date: Wed, 12 May 2021 14:15:36 -0700 Subject: [PATCH] Fix evaluation order for hack-local-variables * lisp/files.el (hack-local-variables): Fix the ordering which local variables are evaluated by `hack-local-variables' so that prop-line local variables are evaluated first. There is a hidden nreverse lurking in `hack-local-variables-apply' which means that the prop line variables must come second in order to be evaluated before the end of file variables. --- lisp/files.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index 47c5fc133c..60f72660f3 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3771,8 +3771,8 @@ hack-local-variables (with-demoted-errors "Directory-local variables error: %s" ;; Note this is a no-op if enable-local-variables is nil. (hack-dir-local-variables)) - (let ((result (append (hack-local-variables-prop-line) - (hack-local-variables--find-variables)))) + (let ((result (append (hack-local-variables--find-variables) + (hack-local-variables-prop-line)))) (if (and enable-local-variables (not (inhibit-local-variables-p))) (progn -- 2.26.3