Subject: Re: bug#6871: Please make linum-mode per buffer, not per major mode

From: Lennart Borgman <[email-masked]>
Date: Tue, 17 Aug 2010 13:23:53 +0200

On Tue, Aug 17, 2010 at 10:59 AM, Stefan Monnier
<[email-masked]> 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.