From: Martin S. <ma...@ly...> - 2005-04-09 18:11:22
|
"Robert N. Mcdonnell" <RMc...@be...> wrote: > Given the following as the only text in a c++-mode buffer: > > bool operator== > ( > ); > > \C-c\C-s on the second line produces ((statement-cont 1)) > > If I change the function name, in particular to operator!= > > bool operator!= > ( > ); > > \C-c\C-s on the second line produces ((topmost-intro-cont 1)) Thanks for the report. The patch below fixes this case. However, other operator declarations like operator<, operator<<, operator, and operator() are still not treated correctly. That requires a larger fix that I've only made in the development version. diff -u -r5.419.2.33 cc-engine.el --- cc-engine.el 7 Oct 2004 11:46:35 -0000 5.419.2.33 +++ cc-engine.el 9 Apr 2005 17:57:40 -0000 @@ -6103,7 +6103,9 @@ ;; Note: We use the fact that lim is always after any ;; preceding brace sexp. (while (and (zerop (c-backward-token-2 1 t lim)) - (not (looking-at "[;<,=]")))) + (or (not (looking-at "[;<,=]")) + (and c-overloadable-operators-regexp + (looking-at c-overloadable-operators-regexp))))) (or (memq (char-after) '(?, ?=)) (and (c-major-mode-is 'c++-mode) (zerop (c-backward-token-2 1 nil lim)) |