all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [emacs-pretest-bug] Re: C indentation error.
@ 2006-03-21 18:16 Michael Cadilhac
  2006-03-27 18:13 ` Michael Cadilhac
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Cadilhac @ 2006-03-21 18:16 UTC (permalink / raw)



[-- Attachment #1.1.1: Type: text/plain, Size: 23 bytes --]


  Any reaction ? :-)


[-- Attachment #1.1.2: Type: message/rfc822, Size: 5561 bytes --]

From: Michael Cadilhac <michael.cadilhac@lrde.org>
To: rms@gnu.org
Cc: emacs-pretest-bug@gnu.org, bug-cc-mode@gnu.org
Subject: Re: C indentation error.
Date: Sun, 19 Mar 2006 19:07:32 +0100
Message-ID: <87lkv6tijf.fsf@mahaena.lrde>

Richard Stallman <rms@gnu.org> writes:

>     >   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).
>
> 	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 :
>
> The noerror argument means "no error if the search fails".
> Invalid arguments are a different issue.
>
> I will clarify this in the Lisp manual.
>
> So your proposed change in search.c should not be installed.

  That's what I thought ; I was  trying to get a reaction for this bug
  report ;-)

> Instead, the  code in CC  mode should be  fixed not to  pass invalid
> search bounds.

  After a little more search, I propose the following change :

Index: lisp/progmodes/cc-engine.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/cc-engine.el,v
retrieving revision 1.47
diff -c -r1.47 cc-engine.el
*** lisp/progmodes/cc-engine.el 24 Feb 2006 15:33:02 -0000      1.47
--- lisp/progmodes/cc-engine.el 19 Mar 2006 17:59:56 -0000
***************
*** 5916,5922 ****
                         ;; it shouldn't apply when we check the
                         ;; preceding label.
                         c-record-type-identifiers)
!                    (c-forward-syntactic-ws)
                     (c-forward-label nil pte start))))))))
  
           ;; Check that the next nonsymbol token is ":".  Allow '('
--- 5916,5922 ----
                         ;; it shouldn't apply when we check the
                         ;; preceding label.
                         c-record-type-identifiers)
!                    (c-forward-syntactic-ws pte)
                     (c-forward-label nil pte start))))))))
  
           ;; Check that the next nonsymbol token is ":".  Allow '('


----------------------------------------------------------------------

  Well... It fixes the bug, really, but it doesn't investigate the bug
  as it probably should be ;  the bug _may_ be in c-forward-sws, a too
  long function for me to work on ;-)

  Bye !

-- 
    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 | '._.-(,_..'--(,_...`-..'

[-- Attachment #1.1.3: Type: text/plain, Size: 259 bytes --]



-- 
    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 | '._.-(,_..'--(,_...`-..'

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-03-28 19:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-21 18:16 [emacs-pretest-bug] Re: C indentation error Michael Cadilhac
2006-03-27 18:13 ` Michael Cadilhac
2006-03-28 19:33   ` Richard Stallman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.