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

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

Running elisp code in the middle of re-search-forward


From: Stefan Monnier
Subject: Running elisp code in the middle of re-search-forward
Date: Tue, 06 Sep 2005 08:59:38 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> I can't help but think this change only sets up the conditions for some
> other bug to manifest itself.
> re-search-forward should not be able to call ange-ftp-del-tmp-name.
> I wish I could have tracked that part of the problem down but I can't
> figure out how to get symbols for Emacs turned on.
> When I attach the debugger to my Emacs I can only see the assembler code
> and have no idea which proc I am.
> I'm obviously not terribly experienced with compiling or debugging in a
> Windows environment:-(

Now that I think about it, this is probably related to the following part of
regex.c:

   /* Explicit quit checking is only used on NTemacs.  */
   #if defined WINDOWSNT && defined emacs && defined QUIT
   extern int immediate_quit;
   # define IMMEDIATE_QUIT_CHECK                        \
       do {                                     \
         if (immediate_quit) QUIT;                      \
       } while (0)
   #else
   # define IMMEDIATE_QUIT_CHECK    ((void)0)
   #endif

where IMMEDIATE_QUIT_CHECK is put at a few important places in the main
regexp-matching loop.

Does anyone know why the above code is the way it is?
Is it really safe to run QUIT from within the matching loop?
If so, why not do it under Unix as well?


        Stefan




reply via email to

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