Subject: Re: 23.0.90; customize/whitespace: display stops updating

From: Chong Yidong <[email-masked]>
Date: Tue, 24 Feb 2009 13:45:50 -0500

I get a crash with the following recipe, and I think it's related to the
new composition code:

emacs -Q
M-x customize-group RET whitespace RET
C-v C-v

Breakpoint 1, abort () at emacs.c:432
432       kill (getpid (), SIGABRT);
(gdb) bt
#0  abort () at emacs.c:432
#1  0x081a9e6d in analyse_first (p=0x8b51b9e "\017", pend=0x8b51bc7 "", 
    fastmap=0x0, multibyte=0) at regex.c:4295
#2  0x081a15f8 in regex_compile (
    pattern=0x83560a9
    "[\340\275...",
    size=88, syntax=3408388, bufp=0x83e3a98) at regex.c:2853
#3  0x081b3c06 in re_compile_pattern (
    pattern=0x83560a9
    "[\340\275...",
    length=88, bufp=0x83e3a98) at regex.c:6518
#4  0x08196574 in compile_pattern_1 (cp=0x83e3a88, pattern=137243907, 
    translate=138358041, regp=0x0, posix=0) at search.c:160
#5  0x081967dd in compile_pattern (pattern=137243907, regp=0x0, 
    translate=138358041, posix=0, multibyte=1) at search.c:259
#6  0x08197547 in fast_looking_at (regexp=137243907, pos=3726, pos_byte=3732, 
    limit=3742, limit_byte=3750, string=138358041) at search.c:618
#7  0x0824131f in autocmp_chars (cft_element=141223421, charpos=3726, 
    bytepos=3733, limit=3742, win=0x879c4b8, face=0x8ac0e78,
    string=138358041)
    at composite.c:957
#8  0x08241fc2 in composition_reseat_it (cmp_it=0xbfb4e364, charpos=3726, 
    bytepos=3733, endpos=5814, w=0x879c4b8, face=0x8ac0e78,
    string=138358041)
    at composite.c:1142
#9  0x08079776 in next_element_from_buffer (it=0xbfb4dfac) at xdisp.c:6514
#10 0x08077458 in get_next_display_element (it=0xbfb4dfac) at xdisp.c:5676
#11 0x0808f146 in display_line (it=0xbfb4dfac) at xdisp.c:16605

The abort does not occur if I remove these lines in
next_element_from_buffer (xdisp.c:6514), which were added during the
2008-08-29 composition changes:

      if (CHAR_COMPOSED_P (it, IT_CHARPOS (*it), IT_BYTEPOS (*it))
        && next_element_from_composition (it))
        {
          return 1;
        }