[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: empty-line-p
From: |
Xavier Maillard |
Subject: |
Re: empty-line-p |
Date: |
Sat, 31 Mar 2007 17:17:17 +0200 |
User-agent: |
Rmail in GNU Emacs 23.0.51.1 on GNU/Linux |
> wrap it in a `save-match-data'.
>
> David
>
OK, thanks. So I got this now:
Here is what I would do instead:
(defun empty-line-p (&optional ispec)
"Returns t if cursor is at an empty line, nil otherwise.
Displays result in minibuffer when called interactive."
(interactive "p")
(save-excursion
(beginning-of-line)
(save-match-data
(let ((res (looking-at empty-line-p-chars)))
(or (and ispec
(message "%s" res))
res)))))
Xavier