From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: John Lumby Newsgroups: gmane.emacs.cc-mode.general,gmane.emacs.bugs Subject: CC Mode 5.25 (C++); unwanted automatic indentation (not a bug, sorry, but can't find out how to stop it) Date: Fri, 20 Sep 2002 12:16:12 -0400 Sender: cc-mode-help-admin@lists.sourceforge.net Message-ID: <200209201616.g8KGGCj02362@lumbyrnt.torolab.ibm.com> NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1032539092 13322 127.0.0.1 (20 Sep 2002 16:24:52 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 20 Sep 2002 16:24:52 +0000 (UTC) Cc: lumby@ca.ibm.com Return-path: Original-Received: from usw-sf-fw2.sourceforge.net ([216.136.171.252] helo=usw-sf-list2.sourceforge.net) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17sQaH-0003SO-00 for ; Fri, 20 Sep 2002 18:24:50 +0200 Original-Received: from usw-sf-list1-b.sourceforge.net ([10.3.1.13] helo=usw-sf-list1.sourceforge.net) by usw-sf-list2.sourceforge.net with esmtp (Exim 3.31-VA-mm2 #1 (Debian)) id 17sQaY-0007k0-00; Fri, 20 Sep 2002 09:25:06 -0700 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by usw-sf-list1.sourceforge.net with esmtp (Cipher TLSv1:DES-CBC3-SHA:168) (Exim 3.31-VA-mm2 #1 (Debian)) id 17sQaF-0004qY-00 for ; Fri, 20 Sep 2002 09:24:47 -0700 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.10) id 17sQaD-0000tU-00 for bug-cc-mode@gnu.org; Fri, 20 Sep 2002 12:24:45 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17sQaB-0004Gh-00 for bug-cc-mode@gnu.org; Fri, 20 Sep 2002 12:24:45 -0400 Original-Received: from e35.co.us.ibm.com ([32.97.110.133]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17sQa7-0004GN-00; Fri, 20 Sep 2002 12:24:39 -0400 Original-Received: from westrelay01.boulder.ibm.com (westrelay01.boulder.ibm.com [9.17.194.22]) by e35.co.us.ibm.com (8.12.2/8.12.2) with ESMTP id g8KGOTIn034202; Fri, 20 Sep 2002 12:24:30 -0400 Original-Received: from lumbyrnt.torolab.ibm.com (lumbyrnt.torolab.ibm.com [9.26.40.121]) by westrelay01.boulder.ibm.com (8.12.3/NCO/VER6.4) with ESMTP id g8KGOP4m022320; Fri, 20 Sep 2002 10:24:25 -0600 Original-Received: (from lumby@localhost) by lumbyrnt.torolab.ibm.com (8.11.6/8.11.6) id g8KGGCj02362; Fri, 20 Sep 2002 12:16:12 -0400 X-Authentication-Warning: lumbyrnt.torolab.ibm.com: lumby set sender to lumby@ca.ibm.com using -f Original-To: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org X-Reporter-Void-Vars-Found: signal-error-on-buffer-boundary Errors-To: cc-mode-help-admin@lists.sourceforge.net X-BeenThere: cc-mode-help@lists.sourceforge.net X-Mailman-Version: 2.0.9-sf.net Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports, feature requests, and general talk about CC Mode. List-Unsubscribe: , List-Archive: X-Original-Date: Fri, 20 Sep 2002 12:16:12 -0400 Xref: main.gmane.org gmane.emacs.cc-mode.general:156 gmane.emacs.bugs:3538 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:3538 Dear Barry and Martin, Sorry to "bug" you but I am stumped. I have been using cc-mode ( CC Mode version 5.25 ) happily for several years on one particular system (FSF emacs 20.4.1). Recently I started using a linux machine running redhat 7.2, which had emacs 20.7 and cc-mode already installed - same version 5.25 of cc-mode. I am using an almost identical .emacs. Here is all that I believe relates to indenting that is in my .emacs: (setq c-mode-hook (function (lambda () (setq indent-tabs-mode nil) (... other irrelevant stuff) ))) (setq c-brace-offset -2) On this linux machine, when in cc-mode, for almost every C syntactic structure (e.g. declarations. comments), after typing the last character of whatever it is, something auto-indents the line to where I don't want it to be. This doesn't happen on my other system. I can't find any differences to explain it, nor can I find any mention in the help or vars. Note that I am NOT typing the TAB key. Can you please tell me how to turn this off. John Emacs : GNU Emacs 20.7.1 (i386-redhat-linux-gnu, X toolkit) of Mon Jul 30 2001 on stripples.devel.redhat.com Package: CC Mode 5.25 (C++) Buffer Style: gnu c-emacs-features: (1-bit) current state: ============== (setq c-basic-offset 2 c-offsets-alist '((string . c-lineup-dont-change) (c . c-lineup-C-comments) (defun-open . 0) (defun-close . 0) (defun-block-intro . +) (class-open . 0) (class-close . 0) (inline-open . 0) (inline-close . 0) (func-decl-cont . +) (knr-argdecl-intro . 5) (knr-argdecl . 0) (topmost-intro . 0) (topmost-intro-cont . 0) (member-init-intro . +) (member-init-cont . 0) (inher-intro . +) (inher-cont . c-lineup-multi-inher) (block-open . 0) (block-close . 0) (brace-list-open . 0) (brace-list-close . 0) (brace-list-intro . +) (brace-list-entry . 0) (brace-entry-open . 0) (statement . 0) (statement-cont . +) (statement-block-intro . +) (statement-case-intro . +) (statement-case-open . +) (substatement . +) (substatement-open . +) (case-label . 0) (access-label . -) (label . 0) (do-while-closure . 0) (else-clause . 0) (catch-clause . 0) (comment-intro . c-lineup-comment) (arglist-intro . c-lineup-arglist-intro-after-paren) (arglist-cont . 0) (arglist-cont-nonempty . c-lineup-arglist) (arglist-close . c-lineup-arglist) (stream-op . c-lineup-streamop) (inclass . +) (cpp-macro . -1000) (cpp-macro-cont . c-lineup-dont-change) (friend . 0) (objc-method-intro . -1000) (objc-method-args-cont . c-lineup-ObjC-method-args) (objc-method-call-cont . c-lineup-ObjC-method-call) (extern-lang-open . 0) (extern-lang-close . 0) (inextern-lang . +) (namespace-open . 0) (namespace-close . 0) (innamespace . +) (template-args-cont . +) (inlambda . c-lineup-inexpr-block) (lambda-intro-cont . +) (inexpr-statement . 0) (inexpr-class . +) ) c-cleanup-list '(scope-operator) c-comment-only-line-offset '(0 . 0) c-backslash-column 48 c-delete-function 'delete-char c-electric-pound-behavior nil c-hanging-braces-alist '((brace-list-open) (brace-entry-open) (substatement-open after) (block-close . c-snug-do-while) (extern-lang-open after) (inexpr-class-open after) (inexpr-class-close before)) c-hanging-colons-alist nil c-hanging-comment-starter-p t c-hanging-comment-ender-p t c-indent-comments-syntactically-p nil c-tab-always-indent t c-comment-continuation-stars "" c-label-minimum-indentation 1 defun-prompt-regexp nil tab-width 8 comment-column 32 ) ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf