all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to change indenting from spaces to tabs?
@ 2008-08-13 10:16 TriKri
  2008-08-13 16:23 ` Drew Adams
  2008-08-13 18:33 ` Eli Zaretskii
  0 siblings, 2 replies; 3+ messages in thread
From: TriKri @ 2008-08-13 10:16 UTC (permalink / raw)
  To: Help-gnu-emacs


Hello!

Programming C, Emacs indents by inserting 4 spaces for each indent depth.
Now, surrendering to the rules of the OpenOCD project, indenting should be
done by inserting 1 tab instead of 4 spaces, where the tab width should be
set to 4.

How can I make Emacs indent using tabs, and possibly also changing the tab
width?

/Kristofer
-- 
View this message in context: http://www.nabble.com/How-to-change-indenting-from-spaces-to-tabs--tp18922383p18922383.html
Sent from the Emacs - Help mailing list archive at Nabble.com.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: How to change indenting from spaces to tabs?
  2008-08-13 10:16 How to change indenting from spaces to tabs? TriKri
@ 2008-08-13 16:23 ` Drew Adams
  2008-08-13 18:33 ` Eli Zaretskii
  1 sibling, 0 replies; 3+ messages in thread
From: Drew Adams @ 2008-08-13 16:23 UTC (permalink / raw)
  To: 'TriKri', Help-gnu-emacs

> indenting should be done by inserting 1 tab instead
> of 4 spaces, where the tab width should be set to 4.
> 
> How can I make Emacs indent using tabs, and possibly also 
> changing the tab width?

(setq-default indent-tabs-mode t)
(setq default-tab-width 4)

Or perhaps set these only for the mode you want (put in the mode hook):

(setq indent-tabs-mode t
      tab-width        4)


The Emacs manual is your friend. Use `i' to look up keywords (such as `tab' and
`width') in the index.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to change indenting from spaces to tabs?
  2008-08-13 10:16 How to change indenting from spaces to tabs? TriKri
  2008-08-13 16:23 ` Drew Adams
@ 2008-08-13 18:33 ` Eli Zaretskii
  1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2008-08-13 18:33 UTC (permalink / raw)
  To: Help-gnu-emacs

> Date: Wed, 13 Aug 2008 03:16:45 -0700 (PDT)
> From: TriKri <kristoferkrus@hotmail.com>
> Cc: 
> 
> How can I make Emacs indent using tabs, and possibly also changing the tab
> width?

There's a large section on interactive customization of C Mode
indentation in the CC Mode manual.  I recommend to read it.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-08-13 18:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-13 10:16 How to change indenting from spaces to tabs? TriKri
2008-08-13 16:23 ` Drew Adams
2008-08-13 18:33 ` Eli Zaretskii

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.