But, since markdown-mode is autoloaded, it is not until you call markdown-mode that its file will be loaded, and not until then is the last line of markdown-mode.el executed:
(provide 'markdown-mode)
so (featurep 'markdown-mode) will be false until markdown-mode is called (and thus markdown-mode.el is loaded).
Possible fix: change (featurep 'markdown-mode) to (fboundp 'markdown-mode).
gptel-default-mode
gets set totext-mode
for me.I think what happens is:
But, since
markdown-mode
is autoloaded, it is not until you callmarkdown-mode
that its file will be loaded, and not until then is the last line ofmarkdown-mode.el
executed:so
(featurep 'markdown-mode)
will be false untilmarkdown-mode
is called (and thusmarkdown-mode.el
is loaded).Possible fix: change
(featurep 'markdown-mode)
to(fboundp 'markdown-mode)
.