From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kai.grossjohann@gmx.net (=?iso-8859-1?q?Kai_Gro=DFjohann?=) Newsgroups: gmane.emacs.help Subject: Re: simple editor required Date: Sun, 08 Jun 2003 12:19:04 +0200 Organization: University of Duisburg, Germany Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <84d6ho27on.fsf@lucy.is.informatik.uni-duisburg.de> References: <1K1Da.3886$7E.44637@news-server.bigpond.net.au> <84of1c78ka.fsf@lucy.is.informatik.uni-duisburg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1055067515 7598 80.91.224.249 (8 Jun 2003 10:18:35 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 8 Jun 2003 10:18:35 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Sun Jun 08 12:18:33 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19OxFx-0001yO-00 for ; Sun, 08 Jun 2003 12:18:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19OxHz-00072g-Rh for gnu-help-gnu-emacs@m.gmane.org; Sun, 08 Jun 2003 06:20:39 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!fu-berlin.de!uni-berlin.de!pd951f8cc.dip.t-dialin.NET!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 40 Original-NNTP-Posting-Host: pd951f8cc.dip.t-dialin.net (217.81.248.204) Original-X-Trace: fu-berlin.de 1055067578 14097439 217.81.248.204 (16 [73968]) Mail-Copies-To: never User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:NN7NUP5IYpPq6T10+NPY7ZqOnJE= Original-Xref: shelby.stanford.edu gnu.emacs.help:114285 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:10779 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:10779 "Paul Edwards" writes: > The thing is, the code that I am changing is not just one style, > I have to match the code that I am editting. So I would rather > just have very basic editting working by default. ie I don't > mind have to press space 4 times after typing a "{", but I do > mind having to type 20 spaces after a "{". Okay, okay. Please use C-h v c-syntactic-indentation RET to find out if the variable is defined. If it is, you can do the following: (setq c-syntactic-indentation nil) If that doesn't do the trick, then maybe the following works: (defun pe-c-setup () (setq c-syntactic-indentation nil)) (add-hook 'c-mode-hook 'pe-c-setup) If the variable doesn't exist, then you need to do something more elaborate: (defun pe-c-setup () (local-set-key (kbd "TAB") 'indent-relative) (local-set-key (kbd "{") 'self-insert-command)) (add-hook 'c-mode-hook 'pe-c-setup) Maybe you have to add more local-set-key statements, similar to the second one, for other characters that don't just insert themselves. Also, the above was for C mode, use add-hook lines with c++-mode-hook or java-mode-hook instead of c-mode-hook to get the effect for the corresponding modes. I don't understand your comment out the delete key, though. -- This line is not blank.