mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-21 22:48:41 +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:
parent
f2483ec4bb
commit
e655e664bf
|
@ -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"))
|
||||
|
||||
|
|
Loading…
Reference in a new issue