emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: list-at-point


From: martin rudalics
Subject: Re: list-at-point
Date: Thu, 12 Oct 2006 22:43:00 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> (put 'list 'end-op (lambda () (forward-list 1)))
> (setq thatpt-listconstruktor '\()
> (put 'list 'beginning-op (lambda () (unless (looking-at  (format "%s"
> thatpt-listconstruktor )) (backward-up-list))))

(unless (looking-at "(")) seems simpler.  But to check whether a
character starts a list you should check its syntax as

(eq (char-syntax (char-after)) ?\())

The idea of thing-at-point is to get the thing if point is before or in
it, or point is after it and not before a thing of the same kind.  What
do you get with point after (foo bar)?  What do you do if point is not
in the range beg..end?  What do you do if scan-lists reports an error?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]