On Wed, Aug 18, 2010 at 9:19 AM, Stefan Monnier wrote: >>>>> 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) > [...] >>> 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? > > Yes, that's what I suggested, isn't it? I was not quite sure. > Please write a patch, test it (after removing the workarounds you > currently use), and send it here. Attached the patch. There are some other changes to linum.el too. The handling in after-change-functions was not optimal. Maybe the doc string for these hook should explain a bit more about how to use it?