Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
e5b94d44
Commit
e5b94d44
authored
Sep 17, 2006
by
Chong Yidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* search.c (clear_regexp_cache): New function.
* syntax.c (Fmodify_syntax_entry): Clear regexp cache.
parent
db70f3af
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
+24
-0
src/ChangeLog
src/ChangeLog
+6
-0
src/search.c
src/search.c
+13
-0
src/syntax.c
src/syntax.c
+5
-0
No files found.
src/ChangeLog
View file @
e5b94d44
2006-09-17 Chong Yidong <cyd@stupidchicken.com>
* search.c (clear_regexp_cache): New function.
* syntax.c (Fmodify_syntax_entry): Clear regexp cache.
2006-09-16 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
* gtkutil.c (xg_get_file_with_chooser): Check
...
...
src/search.c
View file @
e5b94d44
...
...
@@ -207,6 +207,19 @@ shrink_regexp_cache ()
}
}
/* Clear the regexp cache.
There is no danger of memory leak here because re_compile_pattern
automagically manages the memory in each re_pattern_buffer struct,
based on its `allocated' and `buffer' values. */
void
clear_regexp_cache
()
{
int
i
;
for
(
i
=
0
;
i
<
REGEXP_CACHE_SIZE
;
++
i
)
searchbufs
[
i
].
regexp
=
Qnil
;
}
/* Compile a regexp if necessary, but first check to see if there's one in
the cache.
PATTERN is the pattern to compile.
...
...
src/syntax.c
View file @
e5b94d44
...
...
@@ -1039,6 +1039,11 @@ usage: (modify-syntax-entry CHAR NEWENTRY &optional SYNTAX-TABLE) */)
check_syntax_table
(
syntax_table
);
SET_RAW_SYNTAX_ENTRY
(
syntax_table
,
XINT
(
c
),
Fstring_to_syntax
(
newentry
));
/* We clear the regexp cache, since character classes can now have
different values from those in the compiled regexps.*/
clear_regexp_cache
();
return
Qnil
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment