* 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).
@@ -20468,8 +20468,8 @@ Also updates the keyword regular expressions."
;; this will set the mode *and* set file local variables.
- ;; 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")
(message "Org-mode restarted"))