diff options
author | Nick Dokos <ndokos@gmail.com> | 2013-11-25 23:38:48 -0500 |
---|---|---|
committer | Nick Dokos <ndokos@gmail.com> | 2013-11-27 09:19:56 -0500 |
commit | 0911edfac881ab17a2cd1670f169ff4bdf1ac486 (patch) | |
tree | d0e3496e342379f911b9ba12fa37ce6ef1454ccf | |
parent | a82a5206f347e1e9d2fd46aa2dd3e08df1898f19 (diff) | |
download | org-mode-0911edfac881ab17a2cd1670f169ff4bdf1ac486.tar.gz |
Second try: Ensure that file local variables are set
* lisp/org.el (org-mode-restart): Call normal-mode,
instead of org-mode. This will set the mode but it
will also set file local variables properly.
Reported by Tom Dye: C-c C-c on e.g an #+OPTIONS line
would lose file local variable settings.
The original fix (commit 5ea0228) was incorrect: if the
local variable was a mode setting, then we ended up in an
"infinite" recursion. Problem found, reported and a reproducer
provided by York Zhao.
-rw-r--r-- | lisp/org.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org.el b/lisp/org.el index c7e0be7..92344db 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -20466,7 +20466,8 @@ This command does many different things, depending on context: "Restart Org-mode, to scan again for special lines. Also updates the keyword regular expressions." (interactive) - (org-mode) + ;; this will set the mode *and* set file local variables. + (normal-mode) (message "Org-mode restarted")) (defun org-kill-note-or-show-branches () |