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

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

Re: Different behaviour while debugging?


From: Andreas Röhler
Subject: Re: Different behaviour while debugging?
Date: Sat, 23 Feb 2013 12:35:07 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130105 Thunderbird/17.0.2

Am 23.02.2013 10:07, schrieb Thorsten Jolitz:
Andreas Röhler <andreas.roehler@easy-emacs.de> writes:

I have the very strange case that a program - in some special situation
- does not work as expected, but when I instrument the relevant
function(s) for edebug and single-step through them, everythings works
as expected and the output is fine.

IMHO that's possible, for example if some function expects faces, which are 
only there if
fontification is done

At the surface of my application program, there are no faces involved,
its about recognizing if there is a comment on a line with
'comment-on-line-p', which calls 'comment-search-forward', which
searches for 'comment-start-skip'.

Since, when in html-mode, the following condition-case (inside a 'cond
structure) is never entered in normal execution but is correctly entered
when (e)debugging, I would guess the 'comment-on-line-p' makes the
difference.

          ,---------------------------------------------------
          | ((and
          |   (save-excursion
          |     (not (eq (comment-on-line-p) (point-at-bol))))
          |   last-line-comment-p) ...)
          `---------------------------------------------------

And, actually, if I edebug 'comment-search-forward', things work as
expected, just like when I edebug my own function that contains the
above condition-case.

try some (sit-for) then

ok - thanks for the tip.


Maybe let's have a look at definitions of

comment-on-line-p
point-at-bol





reply via email to

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