emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C indentation error.


From: Michael Cadilhac
Subject: Re: C indentation error.
Date: Fri, 17 Mar 2006 12:19:54 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0 (gnu/linux)

Michael Cadilhac <address@hidden> writes:

>   Hi !
>
>   I got an  error with some C indentation in  macro definitions in GNU
>  Emacs 22.0.50.34 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of
>  2006-03-02.
>
>   Error is triggered by:
>
>   With emacs -Q :
>   In scratch, insert the following:
>
> #foo :\
> bar
>
>   Toggle to c-mode, and try to indent the last line.
>
>   I get: Invalid search bound (wrong side of point).
>

    I spent couple of minutes trying to see what's going wrong, and
    I didn't found something very conclusive.

    However, looking at the  code of search_command, I'm wondering why
    an error could  be output even if  noerror is t or a  symbol [1] ;
    fixing this that way :

Index: search.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/search.c,v
retrieving revision 1.207
diff -c -r1.207 search.c
*** search.c    1 Mar 2006 23:52:22 -0000       1.207
--- search.c    17 Mar 2006 11:06:24 -0000
***************
*** 927,933 ****
        CHECK_NUMBER_COERCE_MARKER (bound);
        lim = XINT (bound);
        if (n > 0 ? lim < PT : lim > PT)
!       error ("Invalid search bound (wrong side of point)");
        if (lim > ZV)
        lim = ZV, lim_byte = ZV_BYTE;
        else if (lim < BEGV)
--- 927,937 ----
        CHECK_NUMBER_COERCE_MARKER (bound);
        lim = XINT (bound);
        if (n > 0 ? lim < PT : lim > PT)
!       {
!         if (NILP (noerror))
!           error ("Invalid search bound (wrong side of point)");
!         return Qnil;
!       }
        if (lim > ZV)
        lim = ZV, lim_byte = ZV_BYTE;
        else if (lim < BEGV)


    would fix the reported bug.

    But I don't  know if c-indent is supposed to  pass a wrong `bound'
    to c-syntactic-re-search-forward...

    Bye.


Footnotes: 
[1]  the « error ("Invalid search bound (wrong side of point)"); »

-- 
    Michael Cadilhac, a.k.a. Micha [mika] |
                    Epita/LRDE promo 2007 |   )\._.,--....,'``.
123 av. de Fontainebleau | 08.70.65.13.14 |  /.  _.. \   _\  (` ._,.
94270 Le Kremlin Bicetre | 06.23.20.31.30 | '._.-(,_..'--(,_...`-..'




reply via email to

[Prev in Thread] Current Thread [Next in Thread]