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

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

bug#14303: 24.3; Bug in comment-search-backward


From: Andreas Röhler
Subject: bug#14303: 24.3; Bug in comment-search-backward
Date: Thu, 16 May 2013 09:12:29 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5

Am 16.05.2013 06:02, schrieb Leo Liu:
On 2013-05-16 00:13 +0800, Andreas Röhler wrote:
syntax-ppss is reliable, while re-search-backward comment-start-skip
might stop inside a string etc.

backward-line, end-of-line
if nt4 and nth8, goto char nth8

that's nearly all
as done consider limit of search, sure.

Watching with interest,

Andreas

I don't know what to make of this comment. Do you see a problem in the
patch?


Yes, same thing as with beg-of-defun discussed elsewhere.

+ (while (and (not found) (re-search-backward comment-start-skip limit t))
+      (setq end (match-end 0))
+      (or (nth 8 (syntax-ppss)) (setq found t)))

This might find a comment-start inside a string.

Rely at (syntax-ppss)

if nt4 and nth8, goto char nth8


Cheers,

Andreas
Thanks,
Leo







reply via email to

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