emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug#55862: Removing indent-tabs-mode set to t by default


From: goncholden
Subject: Re: bug#55862: Removing indent-tabs-mode set to t by default
Date: Mon, 13 Jun 2022 01:36:44 +0000

------- 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)`?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]