all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#6276: Could indent-tabs-mode etc be made minor modes?
@ 2010-05-26 16:56 Lennart Borgman
  2010-05-31 20:32 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Lennart Borgman @ 2010-05-26 16:56 UTC (permalink / raw)
  To: 6276

I just saw on EmacsWiki a list of minor modes that do not have a
command for turning them on, for example indent-tabs-mode. This is
instead a defcustom.

Could this be turned into a global minor mode, for example with something like

(define-minor-mode indent-tabs-mode
  "test"
  :global t
  :variable indent-tabs-mode)

If so then I think it should be done, because the current situation is
a bit confusing.

The minor modes without commands to turn them on that was mentioned was:

  ‘adaptive-fill-mode’
  ‘auto-hscroll-mode’
  ‘indent-tabs-mode’
  ‘shift-select-mode’
  ‘ediff-word-mode’





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#6276: Could indent-tabs-mode etc be made minor modes?
  2010-05-26 16:56 bug#6276: Could indent-tabs-mode etc be made minor modes? Lennart Borgman
@ 2010-05-31 20:32 ` Stefan Monnier
  2010-05-31 21:08   ` Drew Adams
  2021-07-18 13:22   ` Lars Ingebrigtsen
  0 siblings, 2 replies; 4+ messages in thread
From: Stefan Monnier @ 2010-05-31 20:32 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: 6276

> I just saw on EmacsWiki a list of minor modes that do not have a
> command for turning them on, for example indent-tabs-mode.  This is
> instead a defcustom.

> Could this be turned into a global minor mode, for example with
> something like

Sounds OK to me.

> (define-minor-mode indent-tabs-mode
>   "test"
>   :global t
>   :variable indent-tabs-mode)

I'd rather keep the :variable uses to a minimum.
In the case of indent-tabs-mode, maybe the better course of action is to
move `indent-to' and `indent-tabs-mode' from C to Lisp.


        Stefan





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#6276: Could indent-tabs-mode etc be made minor modes?
  2010-05-31 20:32 ` Stefan Monnier
@ 2010-05-31 21:08   ` Drew Adams
  2021-07-18 13:22   ` Lars Ingebrigtsen
  1 sibling, 0 replies; 4+ messages in thread
From: Drew Adams @ 2010-05-31 21:08 UTC (permalink / raw)
  To: 'Stefan Monnier', 'Lennart Borgman'; +Cc: 6276

> > (define-minor-mode indent-tabs-mode "test" :global t
> >   :variable indent-tabs-mode)
> 
> I'd rather keep the :variable uses to a minimum.
> In the case of indent-tabs-mode, maybe the better course of 
> action is to move `indent-to' and `indent-tabs-mode' from C to Lisp.

However you decide to do it, please make sure that this, in many people's
.emacs, still works (across versions):

(setq-default indent-tabs-mode nil)






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#6276: Could indent-tabs-mode etc be made minor modes?
  2010-05-31 20:32 ` Stefan Monnier
  2010-05-31 21:08   ` Drew Adams
@ 2021-07-18 13:22   ` Lars Ingebrigtsen
  1 sibling, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-18 13:22 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Lennart Borgman, 6276

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> I just saw on EmacsWiki a list of minor modes that do not have a
>> command for turning them on, for example indent-tabs-mode.  This is
>> instead a defcustom.
>
>> Could this be turned into a global minor mode, for example with
>> something like
>
> Sounds OK to me.
>
>> (define-minor-mode indent-tabs-mode
>>   "test"
>>   :global t
>>   :variable indent-tabs-mode)
>
> I'd rather keep the :variable uses to a minimum.
> In the case of indent-tabs-mode, maybe the better course of action is to
> move `indent-to' and `indent-tabs-mode' from C to Lisp.

I see the charm of moving `indent-to' to Lisp, but it's a function that
used a lot and should remain as quick as possible, I think.

So I just went ahead with Lennart's suggestion to add the trivial minor
mode instead.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-18 13:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-26 16:56 bug#6276: Could indent-tabs-mode etc be made minor modes? Lennart Borgman
2010-05-31 20:32 ` Stefan Monnier
2010-05-31 21:08   ` Drew Adams
2021-07-18 13:22   ` Lars Ingebrigtsen

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.