diff options
| author | Glenn Morris | 2012-12-12 21:29:15 -0800 |
|---|---|---|
| committer | Glenn Morris | 2012-12-12 21:29:15 -0800 |
| commit | 727f97393714c5c92aef793f0749ebfde1d14f3c (patch) | |
| tree | 1bb7d815c7b2a1f1076fa0b0afbdab70045215a0 /src | |
| parent | d20704efe62cf45255252168b4f4c453a8c88430 (diff) | |
| parent | bfe6ffb652954956ca984d594deb88d45f8cfd77 (diff) | |
| download | emacs-727f97393714c5c92aef793f0749ebfde1d14f3c.tar.gz emacs-727f97393714c5c92aef793f0749ebfde1d14f3c.zip | |
Merge from emacs-24; up to 2012-11-30T04:44:52Z!cyd@gnu.org
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 12 | ||||
| -rw-r--r-- | src/fileio.c | 14 | ||||
| -rw-r--r-- | src/search.c | 16 |
3 files changed, 38 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 53c0d93f512..b7bb772d266 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2012-12-13 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * search.c (search_buffer): Check the inverse translations of each | ||
| 4 | character in pattern when the buffer being searched is unibyte. | ||
| 5 | (Bug#13084) | ||
| 6 | |||
| 7 | 2012-12-13 Paul Eggert <eggert@cs.ucla.edu> | ||
| 8 | |||
| 9 | * fileio.c (Fvisited_file_modtime): Return (-1 ...) for nonexistent | ||
| 10 | files, fixing a regression from 24.2. | ||
| 11 | (Fverify_visited_file_modtime): Don't read uninitialized st.st_size. | ||
| 12 | |||
| 1 | 2012-12-13 Paul Eggert <eggert@cs.ucla.edu> | 13 | 2012-12-13 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 14 | ||
| 3 | * fileio.c (Fcopy_file): Make fstat failure as serious as open failure. | 15 | * fileio.c (Fcopy_file): Make fstat failure as serious as open failure. |
diff --git a/src/fileio.c b/src/fileio.c index d9029d29168..874162c5bb6 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -5126,8 +5126,8 @@ See Info node `(elisp)Modification Time' for more details. */) | |||
| 5126 | ? get_stat_mtime (&st) | 5126 | ? get_stat_mtime (&st) |
| 5127 | : time_error_value (errno)); | 5127 | : time_error_value (errno)); |
| 5128 | if (EMACS_TIME_EQ (mtime, b->modtime) | 5128 | if (EMACS_TIME_EQ (mtime, b->modtime) |
| 5129 | && (st.st_size == b->modtime_size | 5129 | && (b->modtime_size < 0 |
| 5130 | || b->modtime_size < 0)) | 5130 | || st.st_size == b->modtime_size)) |
| 5131 | return Qt; | 5131 | return Qt; |
| 5132 | return Qnil; | 5132 | return Qnil; |
| 5133 | } | 5133 | } |
| @@ -5154,7 +5154,15 @@ See Info node `(elisp)Modification Time' for more details. */) | |||
| 5154 | (void) | 5154 | (void) |
| 5155 | { | 5155 | { |
| 5156 | if (EMACS_NSECS (current_buffer->modtime) < 0) | 5156 | if (EMACS_NSECS (current_buffer->modtime) < 0) |
| 5157 | return make_number (0); | 5157 | { |
| 5158 | if (EMACS_NSECS (current_buffer->modtime) == NONEXISTENT_MODTIME_NSECS) | ||
| 5159 | { | ||
| 5160 | /* make_lisp_time won't work here if time_t is unsigned. */ | ||
| 5161 | return list4 (make_number (-1), make_number (65535), | ||
| 5162 | make_number (0), make_number (0)); | ||
| 5163 | } | ||
| 5164 | return make_number (0); | ||
| 5165 | } | ||
| 5158 | return make_lisp_time (current_buffer->modtime); | 5166 | return make_lisp_time (current_buffer->modtime); |
| 5159 | } | 5167 | } |
| 5160 | 5168 | ||
diff --git a/src/search.c b/src/search.c index aacdbe33eef..7f26601cc69 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -1406,7 +1406,7 @@ search_buffer (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte, | |||
| 1406 | char_base = 0; | 1406 | char_base = 0; |
| 1407 | while (--len >= 0) | 1407 | while (--len >= 0) |
| 1408 | { | 1408 | { |
| 1409 | int c, translated; | 1409 | int c, translated, inverse; |
| 1410 | 1410 | ||
| 1411 | /* If we got here and the RE flag is set, it's because we're | 1411 | /* If we got here and the RE flag is set, it's because we're |
| 1412 | dealing with a regexp known to be trivial, so the backslash | 1412 | dealing with a regexp known to be trivial, so the backslash |
| @@ -1420,6 +1420,20 @@ search_buffer (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte, | |||
| 1420 | c = *base_pat++; | 1420 | c = *base_pat++; |
| 1421 | TRANSLATE (translated, trt, c); | 1421 | TRANSLATE (translated, trt, c); |
| 1422 | *pat++ = translated; | 1422 | *pat++ = translated; |
| 1423 | /* Check that none of C's equivalents violates the | ||
| 1424 | assumptions of boyer_moore. */ | ||
| 1425 | TRANSLATE (inverse, inverse_trt, c); | ||
| 1426 | while (1) | ||
| 1427 | { | ||
| 1428 | if (inverse >= 0200) | ||
| 1429 | { | ||
| 1430 | boyer_moore_ok = 0; | ||
| 1431 | break; | ||
| 1432 | } | ||
| 1433 | if (c == inverse) | ||
| 1434 | break; | ||
| 1435 | TRANSLATE (inverse, inverse_trt, inverse); | ||
| 1436 | } | ||
| 1423 | } | 1437 | } |
| 1424 | } | 1438 | } |
| 1425 | 1439 | ||