diff options
| author | Karoly Lorentey | 2004-01-23 21:51:08 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-01-23 21:51:08 +0000 |
| commit | 9ae44db9cce6aefe5012afbfa8bbbb1757ee1b92 (patch) | |
| tree | a5e5c3c44ffcb7c2184df9792edabbb199705b85 /src/fns.c | |
| parent | d448e98221f74c780d5163ed819b782ee32f7d74 (diff) | |
| parent | 414f7d4eb2c6aead50f48fb84b8a425d7cf356f5 (diff) | |
| download | emacs-9ae44db9cce6aefe5012afbfa8bbbb1757ee1b92.tar.gz emacs-9ae44db9cce6aefe5012afbfa8bbbb1757ee1b92.zip | |
Merged in changes from CVS HEAD
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-51
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-52
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-62
Diffstat (limited to 'src/fns.c')
| -rw-r--r-- | src/fns.c | 17 |
1 files changed, 14 insertions, 3 deletions
| @@ -5454,12 +5454,18 @@ guesswork fails. Normally, an error is signaled in such case. */) | |||
| 5454 | } | 5454 | } |
| 5455 | else | 5455 | else |
| 5456 | { | 5456 | { |
| 5457 | struct buffer *prev = current_buffer; | ||
| 5458 | |||
| 5459 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | ||
| 5460 | |||
| 5457 | CHECK_BUFFER (object); | 5461 | CHECK_BUFFER (object); |
| 5458 | 5462 | ||
| 5459 | bp = XBUFFER (object); | 5463 | bp = XBUFFER (object); |
| 5464 | if (bp != current_buffer) | ||
| 5465 | set_buffer_internal (bp); | ||
| 5460 | 5466 | ||
| 5461 | if (NILP (start)) | 5467 | if (NILP (start)) |
| 5462 | b = BUF_BEGV (bp); | 5468 | b = BEGV; |
| 5463 | else | 5469 | else |
| 5464 | { | 5470 | { |
| 5465 | CHECK_NUMBER_COERCE_MARKER (start); | 5471 | CHECK_NUMBER_COERCE_MARKER (start); |
| @@ -5467,7 +5473,7 @@ guesswork fails. Normally, an error is signaled in such case. */) | |||
| 5467 | } | 5473 | } |
| 5468 | 5474 | ||
| 5469 | if (NILP (end)) | 5475 | if (NILP (end)) |
| 5470 | e = BUF_ZV (bp); | 5476 | e = ZV; |
| 5471 | else | 5477 | else |
| 5472 | { | 5478 | { |
| 5473 | CHECK_NUMBER_COERCE_MARKER (end); | 5479 | CHECK_NUMBER_COERCE_MARKER (end); |
| @@ -5477,7 +5483,7 @@ guesswork fails. Normally, an error is signaled in such case. */) | |||
| 5477 | if (b > e) | 5483 | if (b > e) |
| 5478 | temp = b, b = e, e = temp; | 5484 | temp = b, b = e, e = temp; |
| 5479 | 5485 | ||
| 5480 | if (!(BUF_BEGV (bp) <= b && e <= BUF_ZV (bp))) | 5486 | if (!(BEGV <= b && e <= ZV)) |
| 5481 | args_out_of_range (start, end); | 5487 | args_out_of_range (start, end); |
| 5482 | 5488 | ||
| 5483 | if (NILP (coding_system)) | 5489 | if (NILP (coding_system)) |
| @@ -5544,6 +5550,11 @@ guesswork fails. Normally, an error is signaled in such case. */) | |||
| 5544 | } | 5550 | } |
| 5545 | 5551 | ||
| 5546 | object = make_buffer_string (b, e, 0); | 5552 | object = make_buffer_string (b, e, 0); |
| 5553 | if (prev != current_buffer) | ||
| 5554 | set_buffer_internal (prev); | ||
| 5555 | /* Discard the unwind protect for recovering the current | ||
| 5556 | buffer. */ | ||
| 5557 | specpdl_ptr--; | ||
| 5547 | 5558 | ||
| 5548 | if (STRING_MULTIBYTE (object)) | 5559 | if (STRING_MULTIBYTE (object)) |
| 5549 | object = code_convert_string1 (object, coding_system, Qnil, 1); | 5560 | object = code_convert_string1 (object, coding_system, Qnil, 1); |