Some functions give errors in a derived major mode from python-mode
I am maintaining a major mode which is derived from python-mode (https://github.com/sagemath/sage-shell-mode). Functions such as py-forward-statement
or py-switch-imenu-index-function
give errors if major-mode is not equal to python-mode (https://github.com/sagemath/sage-shell-mode/issues/34).
Since the syntax of the SageMath language is almost the same as that of Python, using (derived-mode-p 'python-mode)
is more useful than (eq major-mode 'python-mode)
for us. Could you use (derived-mode-p 'python-mode)
instead of (eq major-mode 'python-mode)
in py-forward-statement
and py-switch-imenu-index-function
?