Patch with tests attached. Please let me know if I missed anything, or if the code could be improved. I read through CONTRIBUTE and may have accidentally sent this patch in as a new bug report, sorry! This was generated from 'emacs-26' where the bug occurs, and will merge just fine into 'master'. The bug also exists on 'emacs-25' but the code is slightly different ('provided-mode-derived-p' had not been extracted yet from 'derived-mode-p'). I can supply a back-ported patch as well. Thanks, Andy On 09/21/2018 8:22 am, help-debbugs@gnu.org wrote: > Thank you for filing a new bug report with debbugs.gnu.org. > > This is an automatically generated reply to let you know your message > has been received. > > Your message is being forwarded to the package maintainers and other > interested parties for their attention; they will reply in due course. > > Your message has been sent to the package maintainer(s): > bug-gnu-emacs@gnu.org > > If you wish to submit further information on this problem, please > send it to 32795@debbugs.gnu.org. > > Please do not send mail to help-debbugs@gnu.org unless you wish > to report a problem with the Bug-tracking system.