GNU bug report logs - #6276
Could indent-tabs-mode etc be made minor modes?

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Wed, 26 May 2010 17:02:02 UTC

Severity: wishlist

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6276 in the body.
You can then email your comments to 6276 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6276; Package emacs. (Wed, 26 May 2010 17:02:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lennart Borgman <lennart.borgman <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 26 May 2010 17:02:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Emacs Bugs <bug-gnu-emacs <at> gnu.org>
Subject: Could indent-tabs-mode etc be made minor modes?
Date: Wed, 26 May 2010 18:56:13 +0200
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’




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6276; Package emacs. (Mon, 31 May 2010 20:33:01 GMT) Full text and rfc822 format available.

Message #8 received at 6276 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 6276 <at> debbugs.gnu.org
Subject: Re: bug#6276: Could indent-tabs-mode etc be made minor modes?
Date: Mon, 31 May 2010 16:32:55 -0400
> 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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6276; Package emacs. (Mon, 31 May 2010 21:10:03 GMT) Full text and rfc822 format available.

Message #11 received at 6276 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Stefan Monnier'" <monnier <at> iro.umontreal.ca>,
	"'Lennart Borgman'" <lennart.borgman <at> gmail.com>
Cc: 6276 <at> debbugs.gnu.org
Subject: RE: bug#6276: Could indent-tabs-mode etc be made minor modes?
Date: Mon, 31 May 2010 14:08:24 -0700
> > (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)





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6276; Package emacs. (Sun, 18 Jul 2021 13:24:02 GMT) Full text and rfc822 format available.

Message #14 received at 6276 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Lennart Borgman <lennart.borgman <at> gmail.com>, 6276 <at> debbugs.gnu.org
Subject: Re: bug#6276: Could indent-tabs-mode etc be made minor modes?
Date: Sun, 18 Jul 2021 15:22:53 +0200
Stefan Monnier <monnier <at> 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




bug marked as fixed in version 28.1, send any further explanations to 6276 <at> debbugs.gnu.org and Lennart Borgman <lennart.borgman <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 18 Jul 2021 13:24:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 16 Aug 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 248 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.