Subject: bug#11134: 24.0.94; Mac's Text to Speech stopped working in emacs buffers when I moved from Snow Leopard to Lion

From: YAMAMOTO Mitsuharu <[email-masked]>
Date: Mon, 02 Apr 2012 07:50:47 +0900

>>>>> On Sun, 1 Apr 2012 11:10:48 +0200, Jan Djärv <[email-masked]> said:

>> Is it safe to call Fbuffer_string (in particular, move the gap)
>> inside read_socket_hook?  It is apparently unsafe without
>> SYNC_INPUT, but I'm not sure if it is supposed to be OK for the
>> SYNC_INPUT case.

> Can you show where move_gap runs Lisp code?

What I was concerned was not about running Lisp code.  If
read_socket_hook is called while the Lisp interpreter is operating on
some buffer contents through a pointer, then you shouldn't move the
gap in the middle of such an operation.  At least without SYNC_INPUT,
this actually happens.

> Updating the properties might run hooks, so we probably don't want
> to use Fbuffer_string for that reason.

And another reason would be what you are interested in is not always
the same as `current_buffer', but probably `XBUFFER (XWINDOW
(f->selected_window)->buffer)'.

				     YAMAMOTO Mitsuharu
				[email-masked]