Fix #4559: wrong-type-arg error on RET in some comments

Some modes will set comment-line-break-function to an anonymous function
or advice (as octave-mode does), which will cause this fboundp check to
throw a type error when you press RET while on a commented line.
This commit is contained in:
Henrik Lissner 2021-04-18 13:05:26 -04:00
parent a0de71dee8
commit f3748b2977

View file

@ -248,7 +248,7 @@ Continues comments if executed from a commented line. Consults
(interactive "*")
(when (and +default-want-RET-continue-comments
(doom-point-in-comment-p)
(fboundp comment-line-break-function))
(functionp comment-line-break-function))
(funcall comment-line-break-function nil)
t))