diff options
| author | Chong Yidong | 2007-02-28 22:21:25 +0000 |
|---|---|---|
| committer | Chong Yidong | 2007-02-28 22:21:25 +0000 |
| commit | c47a9ed17aa599b4248ef15aec7326546104beee (patch) | |
| tree | 70e0b767ac6cb1b6e88c770df142d14bb27d2e0f | |
| parent | f79b31dba08765d0f4c1412191802e36e5bfdf6e (diff) | |
| download | emacs-c47a9ed17aa599b4248ef15aec7326546104beee.tar.gz emacs-c47a9ed17aa599b4248ef15aec7326546104beee.zip | |
(Fcombine_after_change_execute): Return nil if
combine_after_change_buffer has been invalidated.
| -rw-r--r-- | src/insdel.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/insdel.c b/src/insdel.c index 08043147cdf..7f15f7de52d 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -2351,6 +2351,17 @@ DEFUN ("combine-after-change-execute", Fcombine_after_change_execute, | |||
| 2351 | if (NILP (combine_after_change_list)) | 2351 | if (NILP (combine_after_change_list)) |
| 2352 | return Qnil; | 2352 | return Qnil; |
| 2353 | 2353 | ||
| 2354 | /* It is rare for combine_after_change_buffer to be invalid, but | ||
| 2355 | possible. It can happen when combine-after-change-calls is | ||
| 2356 | non-nil, and insertion calls a file handler (e.g. through | ||
| 2357 | lock_file) which scribbles into a temp file -- cyd */ | ||
| 2358 | if (!BUFFERP (combine_after_change_buffer) | ||
| 2359 | || NILP (XBUFFER (combine_after_change_buffer)->name)) | ||
| 2360 | { | ||
| 2361 | combine_after_change_list = Qnil; | ||
| 2362 | return Qnil; | ||
| 2363 | } | ||
| 2364 | |||
| 2354 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 2365 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); |
| 2355 | 2366 | ||
| 2356 | Fset_buffer (combine_after_change_buffer); | 2367 | Fset_buffer (combine_after_change_buffer); |