needed a check at several occassions, if the current line
contains printable characters.
What about the following to solve this?
(defun empty-line-p ()
"Returns t if cursor is at an empty line "
(interactive)
(save-excursion
(beginning-of-line)
(if
(looking-at "^[ \t\f\r]*$")
t
nil)))