浏览代码

Merge branch 'maint'

Conflicts:
	lisp/org.el
Carsten Dominik 11 年之前
父节点
当前提交
da6e2289cc
共有 1 个文件被更改,包括 4 次插入7 次删除
  1. 4 7
      lisp/org.el

+ 4 - 7
lisp/org.el

@@ -20482,14 +20482,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)
-  ;; this will set the mode *and* set file local variables.
-  (normal-mode)
-  ;; but it may leave us in some unrelated mode
-  (unless (derived-mode-p "org-mode")
-    (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'."