emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/search.c


From: Richard M . Stallman
Subject: [Emacs-diffs] Changes to emacs/src/search.c
Date: Fri, 19 Nov 2004 15:16:22 -0500

Index: emacs/src/search.c
diff -c emacs/src/search.c:1.187 emacs/src/search.c:1.188
*** emacs/src/search.c:1.187    Fri Nov 19 19:38:26 2004
--- emacs/src/search.c  Fri Nov 19 20:02:32 2004
***************
*** 41,47 ****
  struct regexp_cache
  {
    struct regexp_cache *next;
!   Lisp_Object regexp;
    struct re_pattern_buffer buf;
    char fastmap[0400];
    /* Nonzero means regexp was compiled to do full POSIX backtracking.  */
--- 41,47 ----
  struct regexp_cache
  {
    struct regexp_cache *next;
!   Lisp_Object regexp, whitespace_regexp;
    struct re_pattern_buffer buf;
    char fastmap[0400];
    /* Nonzero means regexp was compiled to do full POSIX backtracking.  */
***************
*** 109,115 ****
     for this pattern.  0 means backtrack only enough to get a valid match.
     MULTIBYTE is nonzero if we want to handle multibyte characters in
     PATTERN.  0 means all multibyte characters are recognized just as
!    sequences of binary data.  */
  
  static void
  compile_pattern_1 (cp, pattern, translate, regp, posix, multibyte)
--- 109,117 ----
     for this pattern.  0 means backtrack only enough to get a valid match.
     MULTIBYTE is nonzero if we want to handle multibyte characters in
     PATTERN.  0 means all multibyte characters are recognized just as
!    sequences of binary data.
! 
!    The behavior also depends on Vsearch_whitespace_regexp.  */
  
  static void
  compile_pattern_1 (cp, pattern, translate, regp, posix, multibyte)
***************
*** 160,165 ****
--- 162,168 ----
    cp->buf.translate = (! NILP (translate) ? translate : make_number (0));
    cp->posix = posix;
    cp->buf.multibyte = multibyte;
+   cp->whitespace_regexp = Vsearch_whitespace_regexp;
    BLOCK_INPUT;
    old = re_set_syntax (RE_SYNTAX_EMACS
                       | (posix ? 0 : RE_NO_POSIX_BACKTRACKING));
***************
*** 232,238 ****
          && !NILP (Fstring_equal (cp->regexp, pattern))
          && EQ (cp->buf.translate, (! NILP (translate) ? translate : 
make_number (0)))
          && cp->posix == posix
!         && cp->buf.multibyte == multibyte)
        break;
  
        /* If we're at the end of the cache, compile into the nil cell
--- 235,242 ----
          && !NILP (Fstring_equal (cp->regexp, pattern))
          && EQ (cp->buf.translate, (! NILP (translate) ? translate : 
make_number (0)))
          && cp->posix == posix
!         && cp->buf.multibyte == multibyte
!         && !NILP (Fequal (cp->whitespace_regexp, Vsearch_whitespace_regexp)))
        break;
  
        /* If we're at the end of the cache, compile into the nil cell
***************
*** 2981,2986 ****
--- 2985,2991 ----
        searchbufs[i].buf.buffer = (unsigned char *) xmalloc (100);
        searchbufs[i].buf.fastmap = searchbufs[i].fastmap;
        searchbufs[i].regexp = Qnil;
+       searchbufs[i].whitespace_regexp = Qnil;
        staticpro (&searchbufs[i].regexp);
        searchbufs[i].next = (i == REGEXP_CACHE_SIZE-1 ? 0 : &searchbufs[i+1]);
      }




reply via email to

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