home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!sun-barr!apple!apple!amdahl!sde!lfk
- From: lfk@kerbit.uts.amdahl.com (Lynn Kerby)
- Newsgroups: gnu.emacs.help
- Subject: Re: TAB key in (C Fill) mode
- Message-ID: <LFK.92Jul24223655@kerbit.uts.amdahl.com>
- Date: 25 Jul 92 05:36:55 GMT
- References: <1992Jul22.163405.12632@ccd.harris.com>
- <1992Jul22.180640.5161@murdoch.acc.Virginia.EDU>
- <ETHANB.92Jul22140006@ptolemy.astro.washington.edu>
- Sender: netnews@uts.amdahl.com
- Reply-To: lfk@uts.amdahl.com
- Organization: Amdahl Corporation, Sunnyvale, CA
- Lines: 35
- In-reply-to: ethanb@ptolemy.astro.washington.edu's message of 22 Jul 92 22:00:06 GMT
-
- In article <ETHANB.92Jul22140006@ptolemy.astro.washington.edu> ethanb@ptolemy.astro.washington.edu (Ethan Bradford) writes:
- >
- > That's not quite right. Indent-tabs-mode just controls whether tabs
- > or spaces are used to move over to the goal column; it doesn't keep
- > it from using fancy logic to select a goal column.
- >
- > To make a tab just insert itself, you will have to create a
- > c-mode-hook which overrides the default definition of the tab key.
- > The following code (in your .emacs file) should do what you want:
- >
- > (setq c-mode-hook
- > (function (lambda () (local-set-key "\t" 'self-insert-command))))
- > --
- > -- Ethan (ethanb@u.washington.edu)
-
- It isn't necessary to put it into a hook, and as other posters have
- mentioned, you will loose the *useful* indent function. I have the
- following settings in my .emacs:
-
- (setq c-tab-always-indent t)
- (define-key c-mode-map "\M-\C-i" 'c-indent-command)
- (define-key c-mode-map "\C-i" 'self-insert-command)
-
- Which pretty much does the same thing, without a mode hook, and allows
- Meta-TAB to perform indentation when desired.
- --
- Lynn Kerby - Amdahl Corporation
- Sunnyvale, CA
- ...amdahl!lfk
- lfk@uts.amdahl.com
-
- Disclaimer: Any and all opinions expressed herein are my own and do not
- necessarily represent the views of anyone, especially my
- employer.
-
-