diff src/search.c @ 371:cc15677e0335 r21-2b1

Import from CVS: tag r21-2b1
author cvs
date Mon, 13 Aug 2007 11:03:08 +0200
parents a4f53d9b3154
children 8626e4521993
line wrap: on
line diff
--- a/src/search.c	Mon Aug 13 11:01:58 2007 +0200
+++ b/src/search.c	Mon Aug 13 11:03:08 2007 +0200
@@ -302,7 +302,6 @@
   s2 = BI_BUF_ZV (buf) - p2;
 
   regex_emacs_buffer = buf;
-  regex_emacs_buffer_p = 1;
   i = re_match_2 (bufp, (char *) BI_BUF_BYTE_ADDRESS (buf, p1),
 		  s1, (char *) BI_BUF_BYTE_ADDRESS (buf, p2), s2,
 		  BI_BUF_PT (buf) - BI_BUF_BEGV (buf), &search_regs,
@@ -393,7 +392,6 @@
   {
     Bytecount bis = charcount_to_bytecount (XSTRING_DATA (string), s);
     regex_emacs_buffer = buf;
-    regex_emacs_buffer_p = 0;
     val = re_search (bufp, (char *) XSTRING_DATA (string),
 		     XSTRING_LENGTH (string), bis,
 		     XSTRING_LENGTH (string) - bis,
@@ -487,7 +485,6 @@
 
   /* #### evil current-buffer dependency */
   regex_emacs_buffer = current_buffer;
-  regex_emacs_buffer_p = 0;
   val = re_search (bufp, (char *) newnonreloc + offset, length, 0,
 		   length, 0);
 
@@ -1124,7 +1121,6 @@
 	  Bytecount val;
 	  QUIT;
           regex_emacs_buffer = buf;
-	  regex_emacs_buffer_p = 1;
 	  val = re_search_2 (bufp,
 			     (char *) BI_BUF_BYTE_ADDRESS (buf, p1), s1,
 			     (char *) BI_BUF_BYTE_ADDRESS (buf, p2), s2,
@@ -1163,7 +1159,6 @@
 	  Bytecount val;
 	  QUIT;
           regex_emacs_buffer = buf;
-	  regex_emacs_buffer_p = 1;
           val = re_search_2 (bufp,
 			     (char *) BI_BUF_BYTE_ADDRESS (buf, p1), s1,
 			     (char *) BI_BUF_BYTE_ADDRESS (buf, p2), s2,
@@ -2041,10 +2036,6 @@
 	    newtext = accum;
 	}
 
-      /* newtext can be nil. */
-      if (NILP (newtext))
-	newtext = build_string ("");
-
       if (case_action == all_caps)
 	newtext = Fupcase (newtext, buffer);
       else if (case_action == cap_initial)