]> git.eshelyaron.com Git - emacs.git/commit
Get rid of re_set_syntax
authorMichal Nazarewicz <mina86@mina86.com>
Wed, 27 Jul 2016 20:39:04 +0000 (22:39 +0200)
committerMichal Nazarewicz <mina86@mina86.com>
Tue, 2 Aug 2016 13:39:10 +0000 (15:39 +0200)
commit04d96eca08ff797c0cd93c33fe8589f4623fc449
treeadc46050fff677705e5be6400502495e3943dd1f
parent9a418e0f98a6ee14d9984e597038168ebe0a7a03
Get rid of re_set_syntax

Instead of using a global variable for storing regex syntax, pass it
to re_compile_pattern.  This is only enabled when compiling Emacs (i.e.
‘#ifdef emacs’).

* src/regex.h (re_set_syntax): Declare only #ifndef emacs.
(re_compile_pattern): Now takes syntax argument #ifdef emacs.

* src/regex.c (re_syntax_options): Define only #ifndef emacs.
(re_compile_pattern): Use the new syntax argument #ifdef emacs.

* src/search.c (compile_pattern_1): Don’t use re_set_syntax and
instead pass syntax to re_compile_pattern directly.
src/regex.c
src/regex.h
src/search.c