unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: goncholden <goncholden@protonmail.com>
To: Sean Whitton <spwhitton@spwhitton.name>
Cc: emacs-devel@gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: Re: bug#55862: Removing indent-tabs-mode set to t by default
Date: Mon, 13 Jun 2022 01:36:44 +0000	[thread overview]
Message-ID: <QF0VzQdDJOiH7RelOwtfJFb1WpRycPNflnpWjap_W5w9WvHHgQ9-44Fd-O_LlcXXtyLicklwV2HB5xect3Zs3RHfRwUeRF-0NhnxH1IvHQU=@protonmail.com> (raw)
In-Reply-To: <87mtehv0lf.fsf@melete.silentflame.com>


------- 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	other threads:[~2022-06-13  1:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
2022-06-13 13:06             ` Stefan Monnier
2022-06-13 13:26               ` goncholden

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='QF0VzQdDJOiH7RelOwtfJFb1WpRycPNflnpWjap_W5w9WvHHgQ9-44Fd-O_LlcXXtyLicklwV2HB5xect3Zs3RHfRwUeRF-0NhnxH1IvHQU=@protonmail.com' \
    --to=goncholden@protonmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=spwhitton@spwhitton.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).