From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.bugs Subject: bug#5649: 23.1.92; Indentation problems in C mode Date: Thu, 25 Feb 2010 11:11:37 -0500 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1267115032 12243 80.91.229.12 (25 Feb 2010 16:23:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 25 Feb 2010 16:23:52 +0000 (UTC) To: 5649@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 25 17:23:48 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NkgV9-0006OQ-5L for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Feb 2010 17:23:47 +0100 Original-Received: from localhost ([127.0.0.1]:52781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NkgV8-0005pi-Ep for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Feb 2010 11:23:46 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NkgUh-0005f0-U0 for bug-gnu-emacs@gnu.org; Thu, 25 Feb 2010 11:23:19 -0500 Original-Received: from [140.186.70.92] (port=40940 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NkgUf-0005dY-B9 for bug-gnu-emacs@gnu.org; Thu, 25 Feb 2010 11:23:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NkgUe-0003Ad-Pu for bug-gnu-emacs@gnu.org; Thu, 25 Feb 2010 11:23:17 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53709) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NkgUe-0003AX-Ns for bug-gnu-emacs@gnu.org; Thu, 25 Feb 2010 11:23:16 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NkgPa-000568-Hn; Thu, 25 Feb 2010 11:18:02 -0500 X-Loop: bug-gnu-emacs@gnu.org Resent-From: Michael Welsh Duggan Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Feb 2010 16:18:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: report 5649 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.126711462619562 (code B ref -1); Thu, 25 Feb 2010 16:18:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Feb 2010 16:17:06 +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 1NkgOU-00055A-0N for submit@debbugs.gnu.org; Thu, 25 Feb 2010 11:17:06 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NkgJs-00051z-Oh for submit@debbugs.gnu.org; Thu, 25 Feb 2010 11:12:09 -0500 Original-Received: from mail.gnu.org ([199.232.76.166]:43277 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NkgJn-0004gG-Vr for submit@debbugs.gnu.org; Thu, 25 Feb 2010 11:12:04 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NkgJU-0004qe-4a for submit@debbugs.gnu.org; Thu, 25 Feb 2010 11:11:49 -0500 Original-Received: from lists.gnu.org ([199.232.76.165]:49621) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NkgJT-0004qa-So for submit@debbugs.gnu.org; Thu, 25 Feb 2010 11:11:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NkgJT-0002wd-A1 for bug-gnu-emacs@gnu.org; Thu, 25 Feb 2010 11:11:43 -0500 Original-Received: from [140.186.70.92] (port=41849 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NkgJR-0002vE-Ru for bug-gnu-emacs@gnu.org; Thu, 25 Feb 2010 11:11:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NkgJP-0001cP-V3 for bug-gnu-emacs@gnu.org; Thu, 25 Feb 2010 11:11:41 -0500 Original-Received: from upton.red.cert.org ([192.88.209.60]:53782) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NkgJP-0001c6-Mu for bug-gnu-emacs@gnu.org; Thu, 25 Feb 2010 11:11:39 -0500 Original-Received: from bucknell.indigo.cert.org (bucknell.indigo.cert.org [10.60.10.121]) by upton.red.cert.org (8.13.8/8.13.8) with ESMTP id o1PGBbNO008339 for ; Thu, 25 Feb 2010 11:11:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cert.org; s=jthatj15xw2j; t=1267114298; bh=qiVk8eebQ2geTtKBx7y92ENC1MYqjssJMtyQt7OHpCI=; h=From:To:Subject:Reply-To:Date:Message-ID:MIME-Version: Content-Type:Sender:Cc:In-Reply-To:References; b=B/rP9bu84bxcaJghIFENYvPZXAApgrFV87S1wF45jSKRpwQOv2YgRk09pH4TPmK6R JmaW/oVXC1N4Qbi+pZMQR4ikFSRqVX6hTggE9Wr3qvBSTpafZHbaISJq1RRXCm3hev hoSSQ/1yieL0i7nK+JpB+C/Baqc2tptWQ1+mX6jE= Original-Received: from maru.green.cert.org (maru.green.cert.org [10.21.10.16]) by bucknell.indigo.cert.org (8.13.8/8.13.8/2.77) with ESMTP id o1PGBbTZ019840 for ; Thu, 25 Feb 2010 11:11:37 -0500 Original-Received: (from mwd@localhost) by maru.green.cert.org (8.13.8/8.13.8/Submit/1.6) id o1PGBbnN021844; Thu, 25 Feb 2010 11:11:37 -0500 X-Authentication-Warning: maru.green.cert.org: mwd set sender to mwd@cert.org using -f User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Mailman-Approved-At: Thu, 25 Feb 2010 11:16:53 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 25 Feb 2010 11:18:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:35309 Archived-At: --=-=-= I'm getting some screwy indentation behavior from C mode. From a current bzr checkout/install of emacs, try the following recipe: emacs -Q foo.c | starts emacs on foo.c (included below) C-u 7 C-n | move down 7 lines TAB | indent, nothing changes (good) C-p C-p | move up 2 lines TAB C-n TAB C-n | indent 2 lines, nothing changes (good) TAB | line unindents by 2 (bad) TAB | line re-indents (good, but strange) TAB | no change this time And here's another recipe for weirdness: emacs -Q foo.c | starts emacs on foo.c (included below) C-x h | select buffer C-M-\ | indent region everything from line 7 | down to the while (0) unindents 2 C-u 5 C-n | move down to the do { C-x ( TAB C-n C-x ) | define a macro to indent and move down | a line C-x e e e e e e | Indent each line, no change Here's foo.c --=-=-= Content-Disposition: inline; filename=foo.c #if !SK_ENABLE_IPV6 # define skipaddrApplyCIDR(ipaddr, cidr) \ ipUnionApplyCIDRV4(&(ipaddr)->ip_ip, cidr) #else # define skipaddrApplyCIDR(ipaddr, cidr) \ do { \ if (skipaddrIsV6(ipaddr)) { \ ipUnionApplyCIDRV6(&((ipaddr)->ip_ip), cidr); \ } else { \ ipUnionApplyCIDRV4(&((ipaddr)->ip_ip), cidr); \ } \ } while (0) #endif --=-=-= In GNU Emacs 23.1.92.2 (i686-pc-linux-gnu, GTK+ Version 2.10.4) of 2010-02-19 on maru.green.cert.org Windowing system distributor `The X.Org Foundation', version 11.0.70101000 configured using `configure '--prefix=/home/mwd' '--without-toolkit-scroll-bars' '--with-gif=no'' 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: @im=none locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Group Minor modes in effect: gnus-undo-mode: t shell-dirtrack-mode: t display-time-mode: t diff-auto-refine-mode: t tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t Recent input: C-x h C-M-\ C-n C-n C-n C-n C-n C-n C-n C-n C-p C-o C-_ C-p C-n C-n C-n C-n C-b C-b } SPC C-p C-p C-p C-p C-p C-a C-p C-x h C-M-\ C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b \ C-p C-x h C-M-\ C-n C-n C-n C-n C-n C-n C-n C-n C-p C-n C-n C-n C-n C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-n C-a C-p C-a C-x h C-M-\ C-_ M-x r e p o r e t - e m r t - e m I n d e n t a t i o n SPC p r o b l e m s SPC i n SPC c c - m o d e M-x c c - b - b r e s u y M-p C-e C SPC m o d e C-x o C-x k y e s C-x 0 M-v M-v C-n C-p C-n C-n C-n C-n C-n C-n C-n C-n C-n C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-_ C-x k M-x r e p o r t - e m Recent messages: Checking 39 files in /home/mwd/share/emacs/23.1.92/lisp/obsolete... Checking 1 files in /home/mwd/share/emacs/23.1.92/leim... Checking for load-path shadows...done Making completion list... [4 times] Do you want to submit a report on CC Mode? (y or n) Formatting bug report buffer....... Please enter your report. Type C-c C-c to send, C-c C-k to abort. call-interactively: Beginning of buffer Auto-saving...done Undo! Load-path shadows: /afs/cert.org/usr/mwd/src/elisp/nnir hides /home/mwd/share/emacs/23.1.92/lisp/gnus/nnir Features: (reporter shadow emacsbug time-stamp tabify whitespace dabbrev vc-dispatcher vc-svn flyspell ispell cc-mode cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs help-mode view copyright gnus-dup mule-util gnus-cite ansi-color mail-extr gnus-async gnus-bcklg parse-time timezone sort gnus-ml disp-table byte-opt bytecomp byte-compile nnml utf-7 utf7 nndraft nnmh tls nnimap imap gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 epg-config mm-view gnus-cache nnir edmacro kmacro gnus-sum gnus-demon nntp gnus-group gnus-undo nnmail mail-source nnoo gnus-start gnus-spec gnus-int gnus-range gnus-win uniquify tramp-imap assoc tramp-gw tramp-fish tramp-smb tramp-cache tramp-ftp tramp-cmds tramp auth-source advice help-fns advice-preload shell format-spec tramp-compat trampver time smime dig server psvn cl cl-19 log-edit pcvs-util add-log diff-mode easy-mmode pgg pgg-parse pgg-def message sendmail ecomplete rfc822 mml easymenu mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev gmm-utils mailheader canlock sha1 hex-util hashcash gnus gnus-ems nnheader gnus-util netrc time-date mail-utils mm-util mail-prsvr wid-edit generic-x dired-x dired-aux dired ange-ftp regexp-opt comint ring tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag 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 loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs) -- Michael Welsh Duggan (mwd@cert.org) --=-=-=--