リージョンの末尾判定はどう書けばよいですか?
リージョンの各行を引数としたコマンドを実行するプログラムを書いたんですが
動的に行数がかわるためeolpで判定してみたものの
空行があるとそこでとまってしまいます

(defun mapr (b e f)
(save-excursion
(save-restriction
(narrow-to-region b e)
(goto-char (point-min))
(while (not (eolp))
(let* ((end (progn (end-of-line) (point)))
(start (progn (beginning-of-line) (point)))
)
(if (not (= start end)) (funcall f start end))
(forward-line 1))))))

(defun mapl (b e str) ""
(interactive "r\nsInputShellCommand:")
(mapr b e `(lambda (b e)
(narrow-to-region b e)
(let* ((text (buffer-string))
(command (concat str " " text))
)
(call-process-region b e "/bin/bash" t t t "-c" command)))))

利用例:範囲選択して、M-x maplしてlsと打つ
/home
/usr