Jake Colman | 1 Dec 2003 16:04

Re: cc-mode for Qt, if interested

>>>>> "MS" == Martin Stjernholm <mast <at> lysator.liu.se> writes:

   MS> Jake Colman <colman <at> ppllc.com> wrote:
   >> /.../  If you fix the core to handle the missing semicolons, will
   >> that pretty much solve the problem of the Qt macros?

   MS> I don't know. Vincent Poinot obviously want them indented in another
   MS> way, as can been seen a few mails back in this thread. But maybe
   MS> that's just his personal preference rather than some generic rule most
   MS> Qt developers follow.

Qt's own source code uses the followning indentation (edited for brevity):

class Q_EXPORT QComboBox : public QWidget
{
    Q_OBJECT
    Q_ENUMS( Policy )
    Q_PROPERTY( bool editable READ editable WRITE setEditable )

public:
    QComboBox( QWidget* parent=0, const char* name=0 );
    QComboBox( bool rw, QWidget* parent=0, const char* name=0 );
};

This is my preferred indentation but is not how Vincent would like to see
it.  If you  can provide this indentation with core changes, you'd make alot
of Qt developers very happy.

--

-- 
Jake Colman                     
(Continue reading)

Alexander Pohoyda | 7 Dec 2003 12:49
Picon

bugfix: c-mode, font-locking array declaration

There seems to be a bug in c-mode. In the string:
	char abc[23], def;
variable `def' is not fontified.

Here's the proposed patch:

--- /workspace/emacs/lisp/progmodes/cc-fonts.el	Sun Nov 16 20:30:34 2003
+++ cc-fonts.el	Sun Dec  7 12:30:33 2003
 <at>  <at>  -791,10 +791,11  <at>  <at> 
 	    ;; beginning of an initializer or function prototype ("="
 	    ;; or "\\s\(").
 	    (c-syntactic-re-search-forward
-	     "[\];,\{\}\[\)>]\\|\\'\\|\\(=\\|\\(\\s\(\\)\\)" limit t t))
+	     "[;,\{\}\)>]\\|\\'\\|\\(=\\|\\(\\s\(\\)\\)" limit t t))

       (setq next-pos (match-beginning 0)
-	    id-face (if (match-beginning 2)
+	    id-face (if (and (match-beginning 2)
+			     (string-equal (match-string 2) "("))
 			'font-lock-function-name-face
 		      'font-lock-variable-name-face)
 	    got-init (match-beginning 1))

--

-- 
Alexander Pohoyda <alexander.pohoyda <at> gmx.net>
PGP Key fingerprint: 7F C9 CC 5A 75 CD 89 72  15 54 5F 62 20 23 C6 44

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
(Continue reading)

Martin Stjernholm | 8 Dec 2003 01:45
Picon
Picon
Picon
Favicon

Re: bugfix: c-mode, font-locking array declaration

Alexander Pohoyda <alexander.pohoyda <at> gmx.net> wrote:

> There seems to be a bug in c-mode. In the string:
> 	char abc[23], def;
> variable `def' is not fontified.
>
> Here's the proposed patch:
/.../

Thank you. I've checked in a slightly different fix that also
addresses a couple of other glitches.

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click

Alexander Pohoyda | 13 Dec 2003 15:25
Picon

Re: bugfix: c-mode, font-locking array declaration

Hi cc-mode master,

> > There seems to be a bug in c-mode. In the string:
> > 	char abc[23], def;
> > variable `def' is not fontified.
> >
> > Here's the proposed patch:
> /.../
> 
> Thank you. I've checked in a slightly different fix that also
> addresses a couple of other glitches.

With this Savannah compromise I'm unable to find the fix you have
submitted. I have tried both /cvs-latest/ and /cvs-2003-09-16/, but
emacs/lisp/progmodes/cc-fonts.el has only

----------------------------
revision 1.5
date: 2003/11/16 16:55:08;  author: mast;  state: Exp;  lines: +3 -3
CC Mode update (5.30.8).
----------------------------

Which fixes nothing I wanted.

Am I looking in a wrong place or your submitted changes are not yet
visible for anonymous users like myself?

--

-- 
Alexander Pohoyda <alexander.pohoyda <at> gmx.net>
PGP Key fingerprint: 7F C9 CC 5A 75 CD 89 72  15 54 5F 62 20 23 C6 44
(Continue reading)

Martin Stjernholm | 14 Dec 2003 04:05
Picon
Picon
Picon
Favicon

Re: bugfix: c-mode, font-locking array declaration

Alexander Pohoyda <alexander.pohoyda <at> gmx.net> wrote:

> With this Savannah compromise I'm unable to find the fix you have
> submitted. /.../

It's currently only in the upstream cvs repository; see
cc-mode.sf.net/anoncvs.php. I don't update the Emacs and XEmacs
repositories directly for every change, so it can take some time
before it gets there.

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click


Gmane