emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] ...


From: Carsten Dominik
Subject: Re: [O] ...
Date: Thu, 31 Jan 2013 11:37:39 +0100

Hi Christopher,

I mant to copy the list, I am doing this again now.

Wow, I was not aware that Emacs caches by content, this is an important piece 
of information.  I guess this removed the main concern I had.  Thanks for 
looking it up in the code and showing it to me.  I am not sure if I understand 
that code completely, but i trust your judgment.

-Carsten

On 31 jan. 2013, at 10:29, Christopher Schmidt <address@hidden> wrote:

> Christopher Schmidt <address@hidden> writes:
>> I was not aware of Emacs caching the regexp on a per-object rather
>> than per-content basis.  If that is true, the regexp should be made a
>> buffer local variable, of course!
> 
> I do not think that's true.
> 
> In compile_pattern:
> 
>      for (cpp = &searchbuf_head; ; cpp = &cp->next)
>        {
>          cp = *cpp;
>          ...
>          if (SCHARS (cp->regexp) == SCHARS (pattern)
>              && STRING_MULTIBYTE (cp->regexp) == STRING_MULTIBYTE (pattern)
>              && !NILP (Fstring_equal (cp->regexp, pattern))
>                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>              && EQ (cp->buf.translate, (! NILP (translate) ? translate : 
> make_number (0)))
>              && cp->posix == posix
>              && (EQ (cp->syntax_table, Qt)
>                  || EQ (cp->syntax_table, BVAR (current_buffer, 
> syntax_table)))
>              && !NILP (Fequal (cp->whitespace_regexp, Vsearch_spaces_regexp))
>              && cp->buf.charset_unibyte == charset_unibyte)
>            break;
> 
>          /* If we're at the end of the cache, compile into the nil cell
>             we found, or the last (least recently used) cell with a
>             string value.  */
>          if (cp->next == 0)
>            {
>            compile_it:
>              compile_pattern_1 (cp, pattern, translate, posix);
>              break;
>            }
>        }
>      ...
> 
>        Christopher


-- 
They can't eat you. -- Merlin Mann in his "Scared Shitless" talk




reply via email to

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