0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-15 22:16:27 +00:00

org: check for derived-mode-p instead of "org-mode" exactly

* lisp/org.el (org-mode-restart): Check for derived-mode-p instead of
  "org-mode" exactly.  This covers a situation normal-mode already
  instantiates a derived mode (e.g. via file local variables).
This commit is contained in:
Achim Gratz 2013-11-27 20:52:03 +01:00
parent f2483ec4bb
commit e655e664bf

View file

@ -20468,8 +20468,8 @@ Also updates the keyword regular expressions."
(interactive)
;; this will set the mode *and* set file local variables.
(normal-mode)
;; but it may leave us in some other mode
(unless (string= "org-mode" mode-name)
;; but it may leave us in some unrelated mode
(unless (derived-mode-p "org-mode")
(org-mode))
(message "Org-mode restarted"))