diff options
author | Jim Blandy <jimb@redhat.com> | 1992-12-12 14:44:09 +0000 |
---|---|---|
committer | Jim Blandy <jimb@redhat.com> | 1992-12-12 14:44:09 +0000 |
commit | 71715da973271729a9c02cfaeb548a570c0d1d8a (patch) | |
tree | 6ceaba3991bcdbc263687220cf4eeac0efa55bcb /src/regex.c | |
parent | c6b4078874633d5403b27c82d1a09a2f887cedf9 (diff) | |
download | emacs-71715da973271729a9c02cfaeb548a570c0d1d8a.tar.gz |
*** empty log message ***
Diffstat (limited to 'src/regex.c')
-rw-r--r-- | src/regex.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/regex.c b/src/regex.c index a0e4e8950e5..c1609504dff 100644 --- a/src/regex.c +++ b/src/regex.c @@ -29,7 +29,7 @@ /* We need this for `regex.h', and perhaps for the Emacs include files. */ #include <sys/types.h> -#if defined (HAVE_CONFIG_H) || defined (emacs) +#ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -3989,21 +3989,13 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) /* If we're at the end of the pattern, we can change. */ if (p2 == pend) - { /* But if we're also at the end of the string, we might - as well skip changing anything. For example, in `a+' - against `a', we'll have already matched the `a', and - I don't see the the point of changing the opcode, - popping the failure point, finding out it fails, and - then going into our endgame. */ - if (d == dend) - { - p = pend; - DEBUG_PRINT1 (" End of pattern & string => done.\n"); - continue; - } - + { + /* Consider what happens when matching ":\(.*\)" + against ":/". I don't really understand this code + yet. */ p[-3] = (unsigned char) pop_failure_jump; - DEBUG_PRINT1 (" End of pattern => pop_failure_jump.\n"); + DEBUG_PRINT1 + (" End of pattern: change to `pop_failure_jump'.\n"); } else if ((re_opcode_t) *p2 == exactn |