Browse Source

Ensure that file local variables are set

* lisp/org.el (org-mode): Call `hack-local-variables'
  at the end of `org-mode' to set file local variables.
  Cribbed from `normal-mode'.

Reported by Tom Dye: C-c C-c on e.g an #+OPTIONS line
would lose file local variable settings.
Nick Dokos 11 years ago
parent
commit
5ea02285ba
1 changed files with 4 additions and 1 deletions
  1. 4 1
      lisp/org.el

+ 4 - 1
lisp/org.el

@@ -5512,7 +5512,10 @@ The following commands are available:
      (unless org-inhibit-startup-visibility-stuff
        (org-set-startup-visibility))))
   ;; Try to set org-hide correctly
-  (set-face-foreground 'org-hide (org-find-invisible-foreground)))
+  (set-face-foreground 'org-hide (org-find-invisible-foreground))
+  ;; Make sure that file local variables are set.
+  (report-errors "File local-variables error: %s"
+    (hack-local-variables)))
 
 ;; Update `customize-package-emacs-version-alist'
 (add-to-list 'customize-package-emacs-version-alist