* Re: bug#55862: Removing indent-tabs-mode set to t by default
[not found] ` <83ilp93kak.fsf@gnu.org>
@ 2022-06-13 1:00 ` Sean Whitton
2022-06-13 1:36 ` goncholden
2022-06-13 13:06 ` Stefan Monnier
0 siblings, 2 replies; 4+ messages in thread
From: Sean Whitton @ 2022-06-13 1:00 UTC (permalink / raw)
To: goncholden; +Cc: emacs-devel, Eli Zaretskii
Hello,
On Thu 09 Jun 2022 at 06:53PM +03, Eli Zaretskii wrote:
>> Date: Thu, 09 Jun 2022 13:34:52 +0000
>> From: goncholden <goncholden@protonmail.com>
>> Cc: Eli Zaretskii <eliz@gnu.org>, 55862@debbugs.gnu.org
>>
>> > You have to put the setting into the major mode hook where you're
>> > interested in setting it.
>>
>> Fantastic! Could you show me how I can do that exactly?
>
> Something like this:
>
> (defun my-FOO-stuff ()
> (setq indent-tabs-mode nil)
> (add-hook 'FOO-mode-hook 'my-FOO-stuff)
>
> (Replace "FOO" with the actual mode name.)
Perhaps also worth mentioning the little-known:
(require 'mode-local)
(setq-mode-local foo-mode indent-tabs-mode nil)
--
Sean Whitton
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: bug#55862: Removing indent-tabs-mode set to t by default
2022-06-13 1:00 ` bug#55862: Removing indent-tabs-mode set to t by default Sean Whitton
@ 2022-06-13 1:36 ` goncholden
2022-06-13 13:06 ` Stefan Monnier
1 sibling, 0 replies; 4+ messages in thread
From: goncholden @ 2022-06-13 1:36 UTC (permalink / raw)
To: Sean Whitton; +Cc: emacs-devel, Eli Zaretskii
------- Original Message -------
On Monday, June 13th, 2022 at 1:00 PM, Sean Whitton <spwhitton@spwhitton.name> wrote:
> Hello,
>
> On Thu 09 Jun 2022 at 06:53PM +03, Eli Zaretskii wrote:
>
> > > Date: Thu, 09 Jun 2022 13:34:52 +0000
> > > From: goncholden goncholden@protonmail.com
> > > Cc: Eli Zaretskii eliz@gnu.org, 55862@debbugs.gnu.org
> > >
> > > > You have to put the setting into the major mode hook where you're
> > > > interested in setting it.
> > >
> > > Fantastic! Could you show me how I can do that exactly?
> >
> > Something like this:
> >
> > (defun my-FOO-stuff ()
> > (setq indent-tabs-mode nil)
> > (add-hook 'FOO-mode-hook 'my-FOO-stuff)
> >
> > (Replace "FOO" with the actual mode name.)
>
>
> Perhaps also worth mentioning the little-known:
>
> (require 'mode-local)
> (setq-mode-local foo-mode indent-tabs-mode nil)
>
> --
> Sean Whitton
Related to this is whether the following makes sense and it's good to use.
(defun my-FOO-stuff ()
(setq-local indent-tabs-mode nil)
(add-hook 'FOO-mode-hook 'my-FOO-stuff)
Can one `add-hook` to `FOO-mode-hook`, when one is using `setq-local`, of has it to be global for the major mode using `(setq indent-tabs-mode nil)`?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: bug#55862: Removing indent-tabs-mode set to t by default
2022-06-13 1:00 ` bug#55862: Removing indent-tabs-mode set to t by default Sean Whitton
2022-06-13 1:36 ` goncholden
@ 2022-06-13 13:06 ` Stefan Monnier
2022-06-13 13:26 ` goncholden
1 sibling, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2022-06-13 13:06 UTC (permalink / raw)
To: Sean Whitton; +Cc: goncholden, emacs-devel, Eli Zaretskii
> Perhaps also worth mentioning the little-known:
>
> (require 'mode-local)
> (setq-mode-local foo-mode indent-tabs-mode nil)
FWIW, I don't like this one because you lose control about *when* the
variable is set.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: bug#55862: Removing indent-tabs-mode set to t by default
2022-06-13 13:06 ` Stefan Monnier
@ 2022-06-13 13:26 ` goncholden
0 siblings, 0 replies; 4+ messages in thread
From: goncholden @ 2022-06-13 13:26 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Sean Whitton, emacs-devel, Eli Zaretskii
------- Original Message -------
On Tuesday, June 14th, 2022 at 1:06 AM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> > Perhaps also worth mentioning the little-known:
> >
> > (require 'mode-local)
> > (setq-mode-local foo-mode indent-tabs-mode nil)
>
>
> FWIW, I don't like this one because you lose control about when the
> variable is set.
>
>
> Stefan
The current standing strategy is using
(setq indent-tabs-mode nil)
This variable should be buffer local. But I wonder whether this can be made global or by major-mode.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-06-13 13:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <N5qx49eHzahLTN0Gk9hXA9GixK4Fv-ep1HX3JvqVWaGniLfS_eNtEELy7PcOi4eLe1KTsPWX_zsWAJ8iXoT8BA73yL3FV0obhTKBqllW--I=@protonmail.com>
[not found] ` <83h74u4csf.fsf@gnu.org>
[not found] ` <xrNgK-9gLRfejz667-7sLF_2g-FVcU4Qlcuz_7x_2PRyWddid2c35cwD5FSzR3nyobanP7tnE8JEfs30tyPMDLiNB2CaheQS86JhtwFrYcI=@protonmail.com>
[not found] ` <87wndq56uv.fsf@gnus.org>
[not found] ` <r6xPgbjHZ2N1yvx5oAoKGd-xLqIE8h73qKw35p-lNVindFHiJARv0GlwZjutS3YVqsys0TNudXeasY2jjFha0HU12fZWSQveL0jBwVgdtwg=@protonmail.com>
[not found] ` <83ilp93kak.fsf@gnu.org>
2022-06-13 1:00 ` bug#55862: Removing indent-tabs-mode set to t by default Sean Whitton
2022-06-13 1:36 ` goncholden
2022-06-13 13:06 ` Stefan Monnier
2022-06-13 13:26 ` goncholden
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).