瀏覽代碼

Fix mode reset

Carsten Dominik 11 年之前
父節點
當前提交
723306d6e7
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      lisp/org.el

+ 4 - 3
lisp/org.el

@@ -20373,10 +20373,11 @@ This command does many different things, depending on context:
 
 (defun org-mode-restart ()
   "Restart Org-mode, to scan again for special lines.
-Also updates the keyword regular expressions."
+Also updates the keyword regular expressions and file variables."
   (interactive)
-  (org-mode)
-  (message "Org-mode restarted"))
+  (funcall major-mode)
+  (hack-local-variables)
+  (message "%s restarted" major-mode))
 
 (defun org-kill-note-or-show-branches ()
   "If this is a Note buffer, abort storing the note.  Else call `show-branches'."