[Top][All Lists]

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

Re: Mysterious fontification/C++ context issue - Patch for beginning-of-

From: Stefan Monnier
Subject: Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw.
Date: Sun, 17 Dec 2006 19:06:58 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux)

> OK, you've convinced me.  I now agree with you that CC Mode should not
> itself set that horrible variable to nil, not even as a default.  I
> should remove the offending line from cc-mode.el, and put some extra
> explanation into cc-mode.texi and programs.texi.

> Users may well want something like this in their c-mode-common-hook:

> (if (< (- (point-max) (point-min)) 100000)
>   (setq open-paren-in-column-0-is-defun-start nil))

> , so the implemention of opic0ids code in beginning-of-defun-raw should
> stay, IMAO.

> Another possibility would be a new option in CC Mode (probably
> implemented as a Clean-Up), which would guard against rogue (s and {s in
> column 0.  Were this to be switched on, c-electric-paren,
> c-electric-brace, and the filling routines would insert a \ at column 0
> when needed.

If you set it back to non-nil, then please add back some font-lock rule to
highlight offending parens in comments and strings, like it used to be done
at some point (and is still done in elisp-mode).


reply via email to

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