all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Benjamin Rutt <rutt+news@cis.ohio-state.edu>
Subject: Re: TAB character
Date: Fri, 22 Nov 2002 16:56:42 -0500	[thread overview]
Message-ID: <wc365up2rqd.fsf@gamma.cis.ohio-state.edu> (raw)
In-Reply-To: mailman.1037819061.24117.help-gnu-emacs@gnu.org

Stirling Olson <seo@foraker.com> writes:

> How can I make the TAB key just enter a TAB character and never have
> that TAB character turn into spaces?
>
> While editing .java files and other files hitting the TAB key seems to
> follow some indenting conventions that I don't understand and don't
> prefer.  It often enters spaces and sometimes won't even let me enter a
> further tab.  I just want to have a tab character entered in the buffer
> when I hit TAB and when I backspace or delete a tab in the buffer I
> don't want it to turn into spaces.

In this case, I think you want to pick a number (like 4) that you want
to use for the distance between your tab stops.

Then, I believe you need to synchronize several variables based off of
that number:

(add-hook 'java-mode-hook
          (lambda ()
            (setq tab-width 4)
            (setq tab-stop-list '(4 8 12 16 20 24 28 32 36 40)
            (setq c-basic-offset 4))))

Future TAB presses should indent your code only to the tab stop list,
and therefore no spaces will be inserted.
-- 
Benjamin

       reply	other threads:[~2002-11-22 21:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1037819061.24117.help-gnu-emacs@gnu.org>
2002-11-22 21:56 ` Benjamin Rutt [this message]
2011-10-27 22:27 tab character Buchs, Kevin
  -- strict thread matches above, loose matches on Subject: below --
2011-10-27 13:45 Rustom Mody
2011-10-27 14:31 ` Ludwig, Mark
2011-10-27 15:05   ` Rustom Mody
2011-10-27 15:13     ` Ludwig, Mark
2011-10-27 20:23     ` Andreas Röhler
     [not found]   ` <mailman.1178.1319727924.15868.help-gnu-emacs@gnu.org>
2011-10-27 15:18     ` Pascal J. Bourguignon
2002-11-20 19:03 TAB character Stirling Olson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=wc365up2rqd.fsf@gamma.cis.ohio-state.edu \
    --to=rutt+news@cis.ohio-state.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.