[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Calling Lisp from undo.c's record_* functions
From: |
Phillip Lord |
Subject: |
Re: Calling Lisp from undo.c's record_* functions |
Date: |
Wed, 18 Nov 2015 12:26:10 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
>> As far as I can tell, changing a text property will result in changes to
>> the undo list, but doesn't call prepare_to_modify_buffer. Rather
>> modify_text_properties appears to call prepare_to_modify_buffer_1
>> directly. Bit surprising -- I wouldn't have expected a function called
>> "blah_1" to be called directly from anywhere other than "blah".
>
> Ah, so maybe the call to run_undoable_change should be in
> prepare_to_modify_buffer_1 rather than in prepare_to_modify_buffer.
> I haven't actually looked at the code.
Yeah, that's on the other branch
fix/segfault-undoable-change-prepare-for-buffer
I think I have managed to replicate this error now -- not unit testable,
but forcing a GC in undo-auto--undoable-change like so:
(defun undo-auto--undoable-change ()
"Called after every undoable buffer change."
(garbage-collect)
(add-to-list 'undo-auto--undoably-changed-buffers (current-buffer))
(undo-auto--boundary-ensure-timer))
then running make check seems to segfault pretty reliably, usually
during bootstrap. fix/segfault-undoable-change-prepare-for-buffer seems
to behave rather better (even with the forced gc).
This seems like the better solution to me.
Phil
- Re: Calling Lisp from undo.c's record_* functions, (continued)
- Re: Calling Lisp from undo.c's record_* functions, Eli Zaretskii, 2015/11/17
- Re: Calling Lisp from undo.c's record_* functions, Stefan Monnier, 2015/11/17
- Re: Calling Lisp from undo.c's record_* functions, Eli Zaretskii, 2015/11/17
- Re: Calling Lisp from undo.c's record_* functions, Stefan Monnier, 2015/11/17
- Re: Calling Lisp from undo.c's record_* functions, Eli Zaretskii, 2015/11/17
- Re: Calling Lisp from undo.c's record_* functions, Stefan Monnier, 2015/11/17
- Re: Calling Lisp from undo.c's record_* functions, Eli Zaretskii, 2015/11/17
- Re: Calling Lisp from undo.c's record_* functions, Phillip Lord, 2015/11/17
- Re: Calling Lisp from undo.c's record_* functions, Phillip Lord, 2015/11/17
- Re: Calling Lisp from undo.c's record_* functions, Stefan Monnier, 2015/11/17
- Re: Calling Lisp from undo.c's record_* functions,
Phillip Lord <=
- Re: Calling Lisp from undo.c's record_* functions, Eli Zaretskii, 2015/11/17
- Re: Calling Lisp from undo.c's record_* functions, Phillip Lord, 2015/11/17
- Re: Calling Lisp from undo.c's record_* functions, Eli Zaretskii, 2015/11/17
- Re: Calling Lisp from undo.c's record_* functions, Phillip Lord, 2015/11/18
- Re: Calling Lisp from undo.c's record_* functions, David Kastrup, 2015/11/18
- Re: Calling Lisp from undo.c's record_* functions, Eli Zaretskii, 2015/11/18
- Re: Calling Lisp from undo.c's record_* functions, Eli Zaretskii, 2015/11/17
- Re: Calling Lisp from undo.c's record_* functions, Stefan Monnier, 2015/11/17
- Re: Calling Lisp from undo.c's record_* functions, Eli Zaretskii, 2015/11/17
- Re: Calling Lisp from undo.c's record_* functions, Phillip Lord, 2015/11/17