* Spaces instead of tabs in new mode
@ 2009-06-16 12:06 Paulo J. Matos
2009-06-16 12:30 ` Thierry Volpiatto
0 siblings, 1 reply; 7+ messages in thread
From: Paulo J. Matos @ 2009-06-16 12:06 UTC (permalink / raw)
To: emacs list
Hi,
I have programming and indent-line for my new major mode but tabs are
not shown as spaces and are too big. How can I program emacs to show
the tabs as spaces and have a way to program the number of spaces per
tab?
Thanks,
--
Paulo Jorge Matos - pocmatos at gmail.com
http://www.pmatos.net
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Spaces instead of tabs in new mode
2009-06-16 12:06 Paulo J. Matos
@ 2009-06-16 12:30 ` Thierry Volpiatto
2009-06-16 22:49 ` Paulo J. Matos
0 siblings, 1 reply; 7+ messages in thread
From: Thierry Volpiatto @ 2009-06-16 12:30 UTC (permalink / raw)
To: help-gnu-emacs
Hi, you can put this in your .emacs:
,----
| (setq-default indent-tabs-mode nil)
`----
to avoid tab indenting.
"Paulo J. Matos" <pocmatos@gmail.com> writes:
> Hi,
>
> I have programming and indent-line for my new major mode but tabs are
> not shown as spaces and are too big. How can I program emacs to show
> the tabs as spaces and have a way to program the number of spaces per
> tab?
>
> Thanks,
--
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Spaces instead of tabs in new mode
2009-06-16 12:30 ` Thierry Volpiatto
@ 2009-06-16 22:49 ` Paulo J. Matos
2009-06-17 0:40 ` Drew Adams
0 siblings, 1 reply; 7+ messages in thread
From: Paulo J. Matos @ 2009-06-16 22:49 UTC (permalink / raw)
To: Thierry Volpiatto; +Cc: help-gnu-emacs
On Tue, 2009-06-16 at 14:30 +0200, Thierry Volpiatto wrote:
> Hi, you can put this in your .emacs:
>
> ,----
> | (setq-default indent-tabs-mode nil)
> `----
>
> to avoid tab indenting.
>
I programmed a new mode. Can't I say that specifically for this mode I
want this to always happen?
Cheers,
Paulo Matos
>
> "Paulo J. Matos" <pocmatos@gmail.com> writes:
>
> > Hi,
> >
> > I have programming and indent-line for my new major mode but tabs are
> > not shown as spaces and are too big. How can I program emacs to show
> > the tabs as spaces and have a way to program the number of spaces per
> > tab?
> >
> > Thanks,
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Spaces instead of tabs in new mode
2009-06-16 22:49 ` Paulo J. Matos
@ 2009-06-17 0:40 ` Drew Adams
2009-06-19 18:17 ` Paulo J. Matos
0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2009-06-17 0:40 UTC (permalink / raw)
To: 'Paulo J. Matos', 'Thierry Volpiatto'; +Cc: help-gnu-emacs
> > (setq-default indent-tabs-mode nil) to avoid tab indenting.
>
>
> I programmed a new mode. Can't I say that specifically for this mode I
> want this to always happen?
Put (setq indent-tabs-mode nil) in the function that turns on your mode (e.g.
`foo-mode').
This variable is automatically buffer-local, so when you use `setq' (not
`setq-default') to set it, you are setting it only in the current buffer, that
is, the buffer that is in your mode.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Spaces instead of tabs in new mode
2009-06-17 0:40 ` Drew Adams
@ 2009-06-19 18:17 ` Paulo J. Matos
0 siblings, 0 replies; 7+ messages in thread
From: Paulo J. Matos @ 2009-06-19 18:17 UTC (permalink / raw)
To: Drew Adams; +Cc: help-gnu-emacs, Thierry Volpiatto
On Wed, Jun 17, 2009 at 1:40 AM, Drew Adams<drew.adams@oracle.com> wrote:
>> > (setq-default indent-tabs-mode nil) to avoid tab indenting.
>>
>>
>> I programmed a new mode. Can't I say that specifically for this mode I
>> want this to always happen?
>
> Put (setq indent-tabs-mode nil) in the function that turns on your mode (e.g.
> `foo-mode').
>
> This variable is automatically buffer-local, so when you use `setq' (not
> `setq-default') to set it, you are setting it only in the current buffer, that
> is, the buffer that is in your mode.
>
>
Great, that's what I wanted! :)
--
Paulo Jorge Matos - pocmatos at gmail.com
http://www.pmatos.net
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-06-19 18:17 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.703.1245153994.2239.help-gnu-emacs@gnu.org>
2009-06-16 12:15 ` Spaces instead of tabs in new mode Pascal J. Bourguignon
2009-06-16 22:54 ` Paulo J. Matos
2009-06-16 12:06 Paulo J. Matos
2009-06-16 12:30 ` Thierry Volpiatto
2009-06-16 22:49 ` Paulo J. Matos
2009-06-17 0:40 ` Drew Adams
2009-06-19 18:17 ` Paulo J. Matos
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).