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: Sat, 20 Nov 2004 09:10:22 -0500

Index: emacs/src/search.c
diff -c emacs/src/search.c:1.188 emacs/src/search.c:1.189
*** emacs/src/search.c:1.188    Fri Nov 19 20:02:32 2004
--- emacs/src/search.c  Sat Nov 20 14:04:16 2004
***************
*** 83,89 ****
  
  Lisp_Object Qinvalid_regexp;
  
! Lisp_Object Vsearch_whitespace_regexp;
  
  static void set_search_regs ();
  static void save_search_regs ();
--- 83,89 ----
  
  Lisp_Object Qinvalid_regexp;
  
! Lisp_Object Vsearch_spaces_regexp;
  
  static void set_search_regs ();
  static void save_search_regs ();
***************
*** 111,117 ****
     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)
--- 111,117 ----
     PATTERN.  0 means all multibyte characters are recognized just as
     sequences of binary data.
  
!    The behavior also depends on Vsearch_spaces_regexp.  */
  
  static void
  compile_pattern_1 (cp, pattern, translate, regp, posix, multibyte)
***************
*** 162,174 ****
    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));
  
!   re_set_whitespace_regexp (NILP (Vsearch_whitespace_regexp) ? NULL
!                           : SDATA (Vsearch_whitespace_regexp));
  
    val = (char *) re_compile_pattern ((char *)raw_pattern,
                                     raw_pattern_size, &cp->buf);
--- 162,174 ----
    cp->buf.translate = (! NILP (translate) ? translate : make_number (0));
    cp->posix = posix;
    cp->buf.multibyte = multibyte;
!   cp->whitespace_regexp = Vsearch_spaces_regexp;
    BLOCK_INPUT;
    old = re_set_syntax (RE_SYNTAX_EMACS
                       | (posix ? 0 : RE_NO_POSIX_BACKTRACKING));
  
!   re_set_whitespace_regexp (NILP (Vsearch_spaces_regexp) ? NULL
!                           : SDATA (Vsearch_spaces_regexp));
  
    val = (char *) re_compile_pattern ((char *)raw_pattern,
                                     raw_pattern_size, &cp->buf);
***************
*** 236,242 ****
          && 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
--- 236,242 ----
          && EQ (cp->buf.translate, (! NILP (translate) ? translate : 
make_number (0)))
          && cp->posix == posix
          && cp->buf.multibyte == multibyte
!         && !NILP (Fequal (cp->whitespace_regexp, Vsearch_spaces_regexp)))
        break;
  
        /* If we're at the end of the cache, compile into the nil cell
***************
*** 1064,1070 ****
        return pos;
      }
  
!   if (RE && !(trivial_regexp_p (string) && NILP (Vsearch_whitespace_regexp)))
      {
        unsigned char *p1, *p2;
        int s1, s2;
--- 1064,1070 ----
        return pos;
      }
  
!   if (RE && !(trivial_regexp_p (string) && NILP (Vsearch_spaces_regexp)))
      {
        unsigned char *p1, *p2;
        int s1, s2;
***************
*** 3012,3024 ****
    saved_last_thing_searched = Qnil;
    staticpro (&saved_last_thing_searched);
  
!   DEFVAR_LISP ("search-whitespace-regexp", &Vsearch_whitespace_regexp,
        /* doc: Regexp to substitute for bunches of spaces in regexp search.
  Some commands use this for user-specified regexps.
  Spaces that occur inside character classes or repetition operators
  or other such regexp constructs are not replaced with this.
  A value of nil (which is the normal value) means treat spaces literally.  */);
!   Vsearch_whitespace_regexp = Qnil;
  
    defsubr (&Slooking_at);
    defsubr (&Sposix_looking_at);
--- 3012,3024 ----
    saved_last_thing_searched = Qnil;
    staticpro (&saved_last_thing_searched);
  
!   DEFVAR_LISP ("search-spaces-regexp", &Vsearch_spaces_regexp,
        /* doc: Regexp to substitute for bunches of spaces in regexp search.
  Some commands use this for user-specified regexps.
  Spaces that occur inside character classes or repetition operators
  or other such regexp constructs are not replaced with this.
  A value of nil (which is the normal value) means treat spaces literally.  */);
!   Vsearch_spaces_regexp = Qnil;
  
    defsubr (&Slooking_at);
    defsubr (&Sposix_looking_at);




reply via email to

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