unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* empty-line-p
@ 2007-03-29 13:06 Andreas Roehler
  0 siblings, 0 replies; 11+ messages in thread
From: Andreas Roehler @ 2007-03-29 13:06 UTC (permalink / raw)
  To: help-gnu-emacs


Hi,

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)))


__
Andreas Roehler

^ permalink raw reply	[flat|nested] 11+ messages in thread
[parent not found: <mailman.1577.1175177310.7795.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2007-04-06 14:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-29 13:06 empty-line-p Andreas Roehler
     [not found] <mailman.1577.1175177310.7795.help-gnu-emacs@gnu.org>
2007-03-29 14:32 ` empty-line-p Joost Kremers
2007-03-30  8:56   ` empty-line-p David Hansen
2007-03-31  5:49     ` empty-line-p Andreas Roehler
2007-03-31 15:17       ` empty-line-p Xavier Maillard
2007-04-06 14:44         ` empty-line-p Andreas Roehler
     [not found]   ` <mailman.1621.1175289074.7795.help-gnu-emacs@gnu.org>
2007-04-01 20:57     ` empty-line-p Stefan Monnier
2007-03-30  5:36 ` empty-line-p Stefan Monnier
2007-03-30  5:46   ` empty-line-p Barry Margolin
2007-04-01 20:54     ` empty-line-p Stefan Monnier
2007-03-30  6:14   ` empty-line-p Andreas Roehler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).