Use derived-mode-p instead of a symbol comparison