]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix evaluation order for hack-local-variables
authorTom Gillespie <tgbugs@gmail.com>
Wed, 12 May 2021 21:31:23 +0000 (23:31 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 12 May 2021 21:31:23 +0000 (23:31 +0200)
* 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

index 47c5fc133c4afd7bdcbf315d83330b85e8b3d285..60f72660f3679247fd8c44d9d4bda77b5f0df864 100644 (file)
@@ -3771,8 +3771,8 @@ inhibited."
       (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