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

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

Re: list-at-point


From: Andreas Roehler
Subject: Re: list-at-point
Date: Sat, 14 Oct 2006 19:41:21 +0200
User-agent: Thunderbird 1.5.0.4 (X11/20060516)


Checked your patch

with a bound of (thing-at-point 'list)- function

Watched execution with edebug.
(foo at the beginning of the buffer, cursor at pipe)

(defun foo ()
 " "
 (message "%s" "baz"))
______|__________________

->
Result: (23 44)

wrong, must be: (23 43)

(defun foo ()
 " "
 (message "%s" "baz"))
__________________|_____

edebug-signal: Format specifier doesn't match argument type

;;;;;;;


The last error reveals a problem in `backward-up-list' IMO.

Workaround:

      (while (in-string-p)
    (backward-char 1))

list-ops now in use:

(put 'list 'end-op (lambda () (forward-list 1)))
(put 'list 'beginning-op
    (lambda ()
      (while (in-string-p)
    (backward-char 1))
      (while
      (and
       (not (bobp))
       (not (eq (char-syntax (char-after)) ?\()))
    (backward-up-list))))


A solution is still needed, if point is not inside a
list, just near.

IMO it should not neither go inside nor across them.


Cheers

__
Andreas Roehler









reply via email to

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