unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Alan Mackenzie<none@example.invalid>
Subject: Re: c indentation - replace spaces with tabs
Date: Mon, 8 Dec 2003 21:21:30 +0000	[thread overview]
Message-ID: <q0q2rb.b6.ln@acm.acm> (raw)
In-Reply-To: mailman.1301.1070809217.399.help-gnu-emacs@gnu.org

Micha Feigin <michf@post.tau.ac.il> wrote on Sun, 7 Dec 2003 15:57:31 +0200:
> Is it possible ....

_Anything_ is possible in Emacs.  Almost.  :-)

> .... to make emacs automatically replace every 8 consecutive
> spaces with a tab? (this can actually be done in indentation time
> instead of write time if I menage to get the indentations right).

If you're happy about tabs being used in any mode, put the following in
your emacs:

(setq indent-tabs-mode t)

.  If you just want it in C Mode, use the C Mode hook:

(defun mf-enable-indent-tabs ()
  (setq indent-tabs-mode t))
(add-hook 'c-mode-hook 'mf-enable-indent-tabs)

.  All the best!

-- 
Alan Mackenzie (Munich, Germany)
Email: aacm@muuc.dee; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").

       reply	other threads:[~2003-12-08 21:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1301.1070809217.399.help-gnu-emacs@gnu.org>
2003-12-08 21:21 ` Alan Mackenzie [this message]
2003-12-07 13:57 c indentation - replace spaces with tabs Micha Feigin
2003-12-07 15:19 ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=q0q2rb.b6.ln@acm.acm \
    --to=none@example.invalid \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).