[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/search.c [emacs-unicode-2]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/src/search.c [emacs-unicode-2] |
Date: |
Wed, 08 Dec 2004 00:47:38 -0500 |
Index: emacs/src/search.c
diff -c emacs/src/search.c:1.174.2.9 emacs/src/search.c:1.174.2.10
*** emacs/src/search.c:1.174.2.9 Thu Nov 4 08:55:33 2004
--- emacs/src/search.c Wed Dec 8 05:02:20 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. */
***************
*** 83,88 ****
--- 83,90 ----
Lisp_Object Qinvalid_regexp;
+ Lisp_Object Vsearch_spaces_regexp;
+
static void set_search_regs ();
static void save_search_regs ();
static int simple_search ();
***************
*** 1018,1024 ****
return pos;
}
! if (RE && !trivial_regexp_p (string))
{
unsigned char *p1, *p2;
int s1, s2;
--- 1020,1026 ----
return pos;
}
! if (RE && !(trivial_regexp_p (string) && NILP (Vsearch_spaces_regexp)))
{
unsigned char *p1, *p2;
int s1, s2;
***************
*** 2801,2807 ****
else
{
int from;
!
if (MARKERP (marker))
{
if (XMARKER (marker)->buffer == 0)
--- 2803,2809 ----
else
{
int from;
!
if (MARKERP (marker))
{
if (XMARKER (marker)->buffer == 0)
***************
*** 2809,2823 ****
else
XSETBUFFER (last_thing_searched, XMARKER (marker)->buffer);
}
!
CHECK_NUMBER_COERCE_MARKER (marker);
from = XINT (marker);
list = Fcdr (list);
!
marker = Fcar (list);
if (MARKERP (marker) && XMARKER (marker)->buffer == 0)
XSETFASTINT (marker, 0);
!
CHECK_NUMBER_COERCE_MARKER (marker);
search_regs.start[i] = from;
search_regs.end[i] = XINT (marker);
--- 2811,2825 ----
else
XSETBUFFER (last_thing_searched, XMARKER (marker)->buffer);
}
!
CHECK_NUMBER_COERCE_MARKER (marker);
from = XINT (marker);
list = Fcdr (list);
!
marker = Fcar (list);
if (MARKERP (marker) && XMARKER (marker)->buffer == 0)
XSETFASTINT (marker, 0);
!
CHECK_NUMBER_COERCE_MARKER (marker);
search_regs.start[i] = from;
search_regs.end[i] = XINT (marker);
***************
*** 2926,2931 ****
--- 2928,2934 ----
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]);
}
***************
*** 2952,2957 ****
--- 2955,2968 ----
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);
defsubr (&Sstring_match);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/src/search.c [emacs-unicode-2],
Miles Bader <=