GNU bug report logs - #6871
Please make linum-mode per buffer, not per major mode

Previous Next

Package: emacs;

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

Date: Tue, 17 Aug 2010 02:06:02 UTC

Severity: wishlist

Tags: wontfix

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 6871 <at> debbugs.gnu.org
Subject: bug#6871: Please make linum-mode per buffer, not per major mode
Date: Tue, 17 Aug 2010 14:35:19 +0200
On Tue, Aug 17, 2010 at 2:11 PM, Stefan Monnier
<monnier <at> iro.umontreal.ca> wrote:
>>>> Line numbers should work even in multi major mode buffers. Please add
>>>> the following lines to linum.el:
>>>
>>>> (put 'linum-overlays  'permanent-local t)
>>>> (put 'linum-available 'permanent-local t)
>>>> (put 'linum-mode      'permanent-local t)
>>>
>>> I don't think that's going to be sufficient: you'll probably at least
>>> also want to remove the
>>>
>>>        (add-hook 'change-major-mode-hook 'linum-delete-overlays nil t)
>>>
>>> I.e. you can't just make some vars permanent-local, you have to adjust
>>> the major mode from "mode-specific" to "permanent-local".
>
>> Yes, I know. I have added code to take careof this for linum in
>> mumamo.el. But we do not yet have code in Emacs for taking care of
>> this more generally.
>
> But your report is about fixing it in linum.el (where it belongs), which
> means to turn linum-mode from a major-mode-specific minor-mode to
> a permanent-local major-mode.  I think such a change is acceptable
> (although the motivation of multi-major-mode buffers might not be that
> compelling, since it tends to lead to the idea that most/all
> minor-modes should be made permanent-local), but we need a proper patch
> for it.

How about also removing adding linum to change-major-mode-hook?




This bug report was last modified 4 years and 243 days ago.

Previous Next


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