From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christoph Scholtes Newsgroups: gmane.emacs.bugs Subject: bug#9544: 24.0.50; cc-mode does not indent Qt class correctly Date: Sun, 18 Sep 2011 09:12:22 -0600 Message-ID: <86y5xllwa1.fsf@googlemail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1316358797 10663 80.91.229.12 (18 Sep 2011 15:13:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 18 Sep 2011 15:13:17 +0000 (UTC) To: 9544@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 18 17:13:13 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R5J3P-0005PP-GN for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Sep 2011 17:13:11 +0200 Original-Received: from localhost ([::1]:33017 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5J3O-0008GU-Vc for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Sep 2011 11:13:10 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:53152) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5J3L-0008FD-9y for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2011 11:13:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R5J3K-0002qy-0m for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2011 11:13:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37829) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5J3J-0002qq-V3 for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2011 11:13:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1R5J85-0004Gf-Ld for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2011 11:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Christoph Scholtes Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Sep 2011 15:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 9544 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.131635905616370 (code B ref -1); Sun, 18 Sep 2011 15:18:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Sep 2011 15:17:36 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5J7f-0004Fy-IP for submit@debbugs.gnu.org; Sun, 18 Sep 2011 11:17:36 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5J7a-0004Fp-Nl for submit@debbugs.gnu.org; Sun, 18 Sep 2011 11:17:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R5J2n-0002hh-Bd for submit@debbugs.gnu.org; Sun, 18 Sep 2011 11:12:34 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:52850) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5J2n-0002hd-9m for submit@debbugs.gnu.org; Sun, 18 Sep 2011 11:12:33 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:53072) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5J2l-00085i-Q3 for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2011 11:12:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R5J2k-0002ge-3R for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2011 11:12:31 -0400 Original-Received: from mail-yx0-f169.google.com ([209.85.213.169]:64149) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5J2j-0002gJ-VF for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2011 11:12:30 -0400 Original-Received: by yxi19 with SMTP id 19so4336968yxi.0 for ; Sun, 18 Sep 2011 08:12:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=from:to:subject:user-agent:date:message-id:mime-version :content-type; bh=ULvsSZfNKgo/MWzD8iJ04I5OcUwLVrEGyj9qo9d7b8A=; b=BAi8vOVqiqWPQaHsxMM1KV0dAYJs6sgkoOx435pnxzgOqI11UCuXjCS0OJaGS3TwHf +wZYmEwA1XUhLV6Q5WSd3yC9+T0k2uFlad47GaQU1zm1OM/1LfctMuqdaRMFjGv1oBDd ydinqCdJN7jb68UIsLQFLneQ1zP8DOclCD7cE= Original-Received: by 10.151.40.17 with SMTP id s17mr1316176ybj.140.1316358748946; Sun, 18 Sep 2011 08:12:28 -0700 (PDT) Original-Received: from MARVIN (71-208-69-86.hlrn.qwest.net [71.208.69.86]) by mx.google.com with ESMTPS id m10sm21700412ang.12.2011.09.18.08.12.27 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 18 Sep 2011 08:12:28 -0700 (PDT) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (windows-nt) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 18 Sep 2011 11:18:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:51413 Archived-At: With the latest emacs trunk, from `emacs -Q' open *.hpp file with this content: class Counter : public QObject { Q_OBJECT public: Counter() { m_value = 0; } int value() const { return m_value; } public slots: void setValue(int value); signals: void valueChanged(int newValue); private: int m_value; }; Note, that the first access modifier `public' is not indented properly. All Qt other extension modifiers are indented correctly. The indentation should look like this: class Counter : public QObject { Q_OBJECT public: Counter() { m_value = 0; } [snip] The indentation works correctly when the `Q_OBJECT' macro is removed. Since cc-mode does support the Qt extensions, it should also correctly indent this class with the `Q_OBJECT' macro present. In GNU Emacs 24.0.50.1 (i386-mingw-nt6.1.7601) of 2011-09-17 on MARVIN Windowing system distributor `Microsoft Corp.', version 6.1.7601 configured using `configure --with-gcc (4.5) --no-opt --cflags -I"C:/Program Files (x86)/GnuWin32/include" -ID:/devel/emacs/libXpm-3.5.8/include -ID:/devel/emacs/libXpm-3.5.8/src -ID:/devel/emacs/gnutls-2.10.5-x86/include --ldflags -LD:/devel/emacs/gnutls-2.10.5-x86/lib' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: ENU value of $XMODIFIERS: nil locale-coding-system: cp1252 default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: paredit-mode: t my-keys-minor-mode: t erc-autojoin-mode: t erc-track-mode: t erc-match-mode: t erc-pcomplete-mode: t erc-stamp-mode: t recentf-mode: t desktop-save-mode: t autopair-mode: t autopair-global-mode: t ido-everywhere: t yas/global-mode: t yas/minor-mode: t global-auto-revert-mode: t delete-selection-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t size-indication-mode: t column-number-mode: t line-number-mode: t Recent input: M-x c c - m o d e r e o p o r t - b u C-g C-t C-/ M-x r e p o r t Recent messages: Quit Undo! Loading system routine info in idle time... Failed to convert XML routine info, falling back on idlw-rinfo. Could not locate any system routine information. Loading system routine info in idle time...done Normalizing idlwave-system-routines in idle time...done Loading and normalizing library catalogs in idle time...done Finishing initialization in idle time... Scanning all buffers... Load-path shadows: None found. Features: (shadow sort gnus-cite mail-extr gnus-msg gnus-art mm-uu mml2015 epg-config mm-view mml-smime smime password-cache dig mailcap emacsbug idlwave imenu idlwave-help idlw-help browse-url cc-mode cc-fonts cc-guess cc-menus cc-cmds vc-hg paredit my-zenburn-theme erc-join erc-track erc-match erc-pcomplete erc-stamp erc-goodies erc erc-backend erc-compat thingatpt ispell bookmark+ bookmark+-key dired-x dired bookmark+-1 nnir gnus-sum nnoo gnus-group gnus-undo nnmail mail-source gnus-start gnus-spec gnus-int gnus-range message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus gnus-ems nnheader gnus-util mail-utils mm-util mail-prsvr bookmark+-bmu help-mode view bookmark+-lit pp+ bookmark+-mac bookmark pp recentf tree-widget wid-edit midnight desktop ibuffer uniquify autopair google-c-style cc-styles cc-align cc-engine cc-vars cc-defs browse-kill-ring+ browse-kill-ring second-sel ido yasnippet dropdown-list derived edmacro kmacro assoc cl org-habit org-agenda org byte-opt warnings bytecomp byte-compile cconv macroexp ob-emacs-lisp ob-tangle ob-ref ob-lob ob-table org-footnote org-src ob-comint comint ring ob-keys ob ob-eval org-pcomplete pcomplete org-list org-faces org-compat org-entities org-macs noutline outline easy-mmode regexp-opt cal-menu easymenu calendar cal-loaddefs org-install server advice help-fns advice-preload debbugs-autoloads package tabulated-list autorevert delsel time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32 disp-table ls-lisp w32-win w32-vars tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process multi-tty emacs)