From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Denis Zalevskiy Newsgroups: gmane.emacs.bugs Subject: bug#13367: 24.1; Wrong switch/case indentation inside some c++11 lambdas Date: Sun, 06 Jan 2013 14:02:22 +0200 Message-ID: <87ehhyzfht.fsf@dezj.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1357473777 8689 80.91.229.3 (6 Jan 2013 12:02:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Jan 2013 12:02:57 +0000 (UTC) To: 13367@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 06 13:03:13 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TrowZ-0008QL-8g for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Jan 2013 13:03:11 +0100 Original-Received: from localhost ([::1]:42762 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TrowJ-0005NI-Oa for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Jan 2013 07:02:55 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:52326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TrowE-0005Mi-4t for bug-gnu-emacs@gnu.org; Sun, 06 Jan 2013 07:02:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Trow9-00017Z-8i for bug-gnu-emacs@gnu.org; Sun, 06 Jan 2013 07:02:50 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36870) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Trow9-000179-6P for bug-gnu-emacs@gnu.org; Sun, 06 Jan 2013 07:02:45 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TrowQ-0005mX-Gc for bug-gnu-emacs@gnu.org; Sun, 06 Jan 2013 07:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Denis Zalevskiy Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 Jan 2013 12:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13367 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.135747378122217 (code B ref -1); Sun, 06 Jan 2013 12:03:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Jan 2013 12:03:01 +0000 Original-Received: from localhost ([127.0.0.1]:47121 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TrowO-0005mI-JE for submit@debbugs.gnu.org; Sun, 06 Jan 2013 07:03:01 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40877) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TrowJ-0005mD-Qu for submit@debbugs.gnu.org; Sun, 06 Jan 2013 07:02:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Trovy-00015v-Ps for submit@debbugs.gnu.org; Sun, 06 Jan 2013 07:02:38 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:52288) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Trovy-00015r-Nm for submit@debbugs.gnu.org; Sun, 06 Jan 2013 07:02:34 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:52229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Trovv-0005Cq-Aw for bug-gnu-emacs@gnu.org; Sun, 06 Jan 2013 07:02:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Trovr-00014e-FU for bug-gnu-emacs@gnu.org; Sun, 06 Jan 2013 07:02:31 -0500 Original-Received: from smtp130.iad.emailsrvr.com ([207.97.245.130]:56677) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Trovr-00014X-Aj for bug-gnu-emacs@gnu.org; Sun, 06 Jan 2013 07:02:27 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp43.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id C8AD52D01FC for ; Sun, 6 Jan 2013 07:02:25 -0500 (EST) X-Virus-Scanned: OK Original-Received: by smtp43.relay.iad1a.emailsrvr.com (Authenticated sender: denis.zalevskiy-AT-jollamobile.com) with ESMTPSA id AA8022D01E6 for ; Sun, 6 Jan 2013 07:02:24 -0500 (EST) User-Agent: Notmuch/0.14 (http://notmuchmail.org) Emacs/24.1.1 (x86_64-redhat-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:69436 Archived-At: Just create c++ file and enter: #include #include int main() { std::vector v; std::for_each(v.begin(), v.end(), [](int i) { switch (i) { case 1: break; // (1) ok: syntactic symbol is statement-case-intro } }); auto fn = [](int i) { switch (i) { case 1: break; // (2) wrong: syntactic symbol is brace-list-entry } }; [](int i) { switch (i) { case 1: break; // (3) ok: syntactic symbol is statement-case-intro } }; return 0; } So, while (1) and (3) are parsed fine, (2) is parsed in a wrong way. In GNU Emacs 24.1.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.24.13) of 2012-11-18 on buildvm-30.phx2.fedoraproject.org Windowing system distributor `Fedora Project', version 11.0.11204000 Configured using: `configure '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--program-prefix=' '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xft' '--with-xpm' '--with-x-toolkit=gtk' '--with-gpm=no' '--with-wide-int' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' 'LDFLAGS=-Wl,-z,relro '' 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: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: C++/l Minor modes in effect: recentf-mode: t shell-dirtrack-mode: t helm-match-plugin-mode: t erc-track-mode: t erc-ring-mode: t erc-networks-mode: t erc-netsplit-mode: t erc-menu-mode: t erc-match-mode: t erc-log-mode: t erc-list-mode: t erc-pcomplete-mode: t erc-button-mode: t erc-fill-mode: t erc-stamp-mode: t erc-autojoin-mode: t global-hl-line-mode: t global-ede-mode: t erc-nick-notify-mode: t erc-irccontrols-mode: t erc-noncommands-mode: t erc-keep-place-mode: t erc-move-to-prompt-mode: t erc-readonly-mode: t diff-auto-refine-mode: t dtrt-indent-mode: t show-paren-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Recent input: r e t u M-x q t - c p r n SPC 0 ; s t d : : v e c t o r < i n m > t > SPC i v ; f o r s t d : : f o r _ e a c h * ( ) v . b e g i n ( ) , SPC v . e n d ( ) , SPC [ ] ( ) SPC { } C-e i n t SPC i ; C-e s w i t c h SPC ( i ) SPC { } C-e c a s e SPC 1 : b r e a k ; C-c C-o C-g d e f a u l t : C-a C-SPC C-w C-x C-s C-SPC C-g C-e a u t o SPC f n SPC = SPC p [ p [ p [ [ ] ( ) SPC { { } ; C-e i n t SPC i C-a C-SPC M-w C-y C-x C-s M-x r e p o r t - e m a c s - b u Recent messages: Auto-saving...done Quit Mark set Saving file /home/denis/src/tmp/test.cpp... Wrote /home/denis/src/tmp/test.cpp Mark set Quit Mark set [2 times] Saving file /home/denis/src/tmp/test.cpp... Wrote /home/denis/src/tmp/test.cpp Load-path shadows: /home/denis/emacs/cedet/lisp/speedbar/loaddefs hides /home/denis/emacs/cedet/lisp/eieio/loaddefs /home/denis/emacs/cedet/lisp/speedbar/loaddefs hides /home/denis/emacs/cedet/lisp/cedet/loaddefs ~/emacs/misc/rpm-spec-mode hides /usr/share/emacs/site-lisp/rpm-spec-mode ~/emacs/misc/cmake-mode hides /usr/share/emacs/site-lisp/cmake/cmake-mode /home/denis/emacs/cedet/lisp/speedbar/speedbar hides /usr/share/emacs/24.1/lisp/speedbar /home/denis/emacs/cedet/lisp/common/ezimage hides /usr/share/emacs/24.1/lisp/ezimage /home/denis/emacs/cedet/lisp/speedbar/loaddefs hides /usr/share/emacs/24.1/lisp/loaddefs /home/denis/emacs/cedet/lisp/speedbar/dframe hides /usr/share/emacs/24.1/lisp/dframe /home/denis/emacs/cedet/lisp/speedbar/sb-image hides /usr/share/emacs/24.1/lisp/sb-image ~/emacs/misc/whitespace hides /usr/share/emacs/24.1/lisp/whitespace ~/emacs/magit/.dir-locals hides /usr/share/emacs/24.1/lisp/gnus/.dir-locals /home/denis/emacs/cedet/lisp/eieio/eieio-custom hides /usr/share/emacs/24.1/lisp/emacs-lisp/eieio-custom /home/denis/emacs/cedet/lisp/eieio/eieio-opt hides /usr/share/emacs/24.1/lisp/emacs-lisp/eieio-opt /home/denis/emacs/cedet/lisp/eieio/eieio-speedbar hides /usr/share/emacs/24.1/lisp/emacs-lisp/eieio-speedbar /home/denis/emacs/cedet/lisp/eieio/eieio hides /usr/share/emacs/24.1/lisp/emacs-lisp/eieio /home/denis/emacs/cedet/lisp/eieio/eieio-datadebug hides /usr/share/emacs/24.1/lisp/emacs-lisp/eieio-datadebug /home/denis/emacs/cedet/lisp/eieio/eieio-base hides /usr/share/emacs/24.1/lisp/emacs-lisp/eieio-base /home/denis/emacs/cedet/lisp/eieio/chart hides /usr/share/emacs/24.1/lisp/emacs-lisp/chart Features: (shadow emacsbug newcomment novice etags shr-color color nnimap parse-time utf7 gnus-art mm-uu mml2015 gnus-sum nnoo gnus-group gnus-undo nnmail mail-source gnus-start gnus-spec gnus-int gnus-range gnus-win shr rfc2104 gnutls network-stream starttls mailalias smtpmail sendmail qp sort mail-extr mule-util rot13 disp-table multi-isearch tabify man dabbrev ede/dired filecache recentf tree-widget helm-files image-dired tramp tramp-compat shell tramp-loaddefs dired-x dired-aux ffap helm-tags helm-bookmark helm-adaptative helm-info helm-net browse-url xml url url-proxy url-privacy url-expand url-methods url-history url-cookie url-util url-parse auth-source url-vars helm-plugin bookmark helm-locate helm-help helm-match-plugin helm-grep helm-buffers helm-elscreen helm-regexp grep helm-external helm-utils dired helm auctex-autoloads tex-site muse-autoloads sb-info info package tabulated-list saveplace erc-track erc-ring erc-networks erc-netsplit erc-menu erc-match erc-log erc-pcomplete pcomplete erc-button erc-fill erc-stamp erc-join gnus gnus-ems nnheader gnus-util whitespace sauron coffee-mode clojurescript-mode clojure-mode rx yaml-mode cmake-mode offlineimap notmuch hl-line notmuch-message notmuch-maildir-fcc notmuch-hello notmuch-show notmuch-print notmuch-crypto notmuch-mua notmuch-address notmuch-wash coolj notmuch-query goto-addr icalendar diary-lib diary-loaddefs cal-menu calendar cal-loaddefs notmuch-tag crm notmuch-lib json message rfc822 mml mailabbrev mail-utils gmm-utils mailheader mm-view mml-smime mml-sec smime password-cache dig mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util mail-prsvr ecb ecb-symboldef ecb-analyse ecb-compatibility ecb-winman-support ecb-autogen autoload ecb-tod ecb-cycle ecb-eshell ecb-help ecb-jde ecb-method-browser hideshow ecb-semantic ecb-file-browser ecb-speedbar ecb-layout compile comint ansi-color ecb-create-layout ecb-compilation ecb-common-browser ecb-navigate ecb-mode-line ecb-face tree-buffer ecb-upgrade ecb-cedet-wrapper semantic/db-mode semantic/db-find semantic/db-ref ecb-util silentcomp semantic/dep vc-git ede/cpp-root ede/emacs ede/java-root cedet-devel-load warnings eieio-opt find-func help-mode srecode/map srecode semantic/canned-configs semantic/ia-sb semantic/analyze semantic/sort semantic/scope semantic/analyze/fcn semantic/db semantic/ctxt semantic/format semantic/tag-ls semantic/find semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local cedet-compat inversion ede/speedbar ede/files ede ede/base ede/auto ede/source eieio-base eieio-speedbar speedbar pulse sb-image ezimage dframe eieio-custom cedet eieio cedet-remove-builtin go-mode-load protobuf-mode byte-opt bytecomp byte-compile cconv macroexp cc-langs cc-mode cc-fonts cc-guess cc-menus cc-cmds column-marker cc-styles cc-align cc-engine cc-vars cc-defs regexp-opt xcscope helm-config eudcb-ldap netrc eudc cus-edit cus-start cus-load eudc-vars wid-edit ldap tls znc erc-nick-notify erc-goodies erc erc-backend erc-compat format-spec thingatpt pp magit-bisect magit-key-mode assoc magit server esh-var esh-io esh-cmd esh-ext esh-proc esh-arg eldoc esh-groups eshell esh-module esh-mode esh-util edmacro kmacro ediff-merg ediff-diff ediff-wind ediff-help ediff-util ediff-mult ediff-init ediff ido iswitchb view diff-mode log-edit easymenu ring pcvs-util add-log cl dtrt-indent advice help-fns advice-preload easy-mmode epa-file epa derived epg epg-config time-date paren my-site-start tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd 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 loaddefs 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 dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)