I'm writing a routine to test to see if point is at the practical end of line.
(defun end-of-line-p ()
"T if there is only \w* between point and end of line"
(interactive)
(save-excursion
(set-mark-command nil) ;mark where we are
(move-end-of-line nil) ;move to the end of the line
(let ((str (buffer-substring (mark) (point)))) ;; does any non-ws text exist in the region? return false
(if (string-match-p "\W*" str)
t
nil))))
The problem is, when running it, I see "mark set" in the minibuffer window, instead of T or nil.