* indenting with spaces
@ 2010-01-19 16:34 andrea
2010-01-19 16:44 ` Tassilo Horn
0 siblings, 1 reply; 4+ messages in thread
From: andrea @ 2010-01-19 16:34 UTC (permalink / raw)
To: help-gnu-emacs
I use to indent everything with spaces because I prefer and I never had
problems, with this line
--8<---------------cut here---------------start------------->8---
(setq indent-tabs-mode nil)
--8<---------------cut here---------------end--------------->8---
Everything works fine, but NOT with JDE.
For some reasons it wants to use tabs, I also did this
--8<---------------cut here---------------start------------->8---
(add-hook 'jde-mode-hook
'(lambda () (require 'ecb))
'(lambda () (setq indent-tabs-mode nil)))
--8<---------------cut here---------------end--------------->8---
But no way, it still set indent-tabs-mode to t, any idea of why it
should do that?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: indenting with spaces
2010-01-19 16:34 indenting with spaces andrea
@ 2010-01-19 16:44 ` Tassilo Horn
2010-01-19 17:06 ` andrea
0 siblings, 1 reply; 4+ messages in thread
From: Tassilo Horn @ 2010-01-19 16:44 UTC (permalink / raw)
To: help-gnu-emacs
andrea <andrea.crotti.0@gmail.com> writes:
Hi Andrea,
> Everything works fine, but NOT with JDE.
> For some reasons it wants to use tabs, I also did this
>
> (add-hook 'jde-mode-hook
> '(lambda () (require 'ecb))
> '(lambda () (setq indent-tabs-mode nil)))
This won't work. `add-hook' only accepts one function, so try that:
--8<---------------cut here---------------start------------->8---
(add-hook 'jde-mode-hook
(lambda ()
(require 'ecb)
(setq indent-tabs-mode nil)))
--8<---------------cut here---------------end--------------->8---
> But no way, it still set indent-tabs-mode to t, any idea of why it
> should do that?
No, it shouldn't do that. Does it set it buffer-locally, or globally?
That would be even more impolite.
Bye,
Tassilo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: indenting with spaces
2010-01-19 16:44 ` Tassilo Horn
@ 2010-01-19 17:06 ` andrea
2010-01-19 17:54 ` Tom Rauchenwald
0 siblings, 1 reply; 4+ messages in thread
From: andrea @ 2010-01-19 17:06 UTC (permalink / raw)
To: help-gnu-emacs
Tassilo Horn <tassilo@member.fsf.org> writes:
> andrea <andrea.crotti.0@gmail.com> writes:
>
> No, it shouldn't do that. Does it set it buffer-locally, or globally?
> That would be even more impolite.
>
> Bye,
> Tassilo
Ok thanks now it works, but still I don't understand why
--8<---------------cut here---------------start------------->8---
Local in buffer init.el; global value is t
--8<---------------cut here---------------end--------------->8---
That's even if I set up and evaluate the "setq" in init.el.
Where does this global stupid value come from then?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: indenting with spaces
2010-01-19 17:06 ` andrea
@ 2010-01-19 17:54 ` Tom Rauchenwald
0 siblings, 0 replies; 4+ messages in thread
From: Tom Rauchenwald @ 2010-01-19 17:54 UTC (permalink / raw)
To: help-gnu-emacs
andrea <andrea.crotti.0@gmail.com> writes:
> Tassilo Horn <tassilo@member.fsf.org> writes:
>
>> andrea <andrea.crotti.0@gmail.com> writes:
>>
>> No, it shouldn't do that. Does it set it buffer-locally, or globally?
>> That would be even more impolite.
>>
>> Bye,
>> Tassilo
>
> Ok thanks now it works, but still I don't understand why
> Local in buffer init.el; global value is t
> That's even if I set up and evaluate the "setq" in init.el.
> Where does this global stupid value come from then?
You should use setq-default. With setq you set it buffer-locally, so it
is only set in the buffer the setq is evaluated.
To change the default use
#v+
(setq-default indent-tabs-mode nil)
#v-
-tom
--
Ob ein Sandkorn oder ein Stein,
im Wasser gehen sie beide unter.
-- Mi-do
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-01-19 17:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-19 16:34 indenting with spaces andrea
2010-01-19 16:44 ` Tassilo Horn
2010-01-19 17:06 ` andrea
2010-01-19 17:54 ` Tom Rauchenwald
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.