[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#4887: 23.1; list-load-path-shadows produces broken buffer
From: |
Stefan Monnier |
Subject: |
bug#4887: 23.1; list-load-path-shadows produces broken buffer |
Date: |
Wed, 11 Nov 2009 15:40:48 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
> Should linum use a different implementation method than
> define-globalized-minor-mode? (does one exist?)
You mean global-linum-mode? Yes, it could use a different method,
e.g. setting global hooks instead, but that might prove tricky.
> Should we instead fix define-globalized-minor-mode to work with all
> buffers? Its documentation via ^h f claims it works in every buffer:
That would be the best solution, yes.
Given the hooks we currently have, it's not very easy because buffers
like *Shadows* get created without running any hook, so basically the
first hook that would get triggered might be something like
window-configuration-change-hook, but that hooks has no easy way to
decide whether that buffer was just created recently or on the contrary
has been around for a long while (in which case enabling linum-mode
might be very wrong since the user may have turned it off there
earlier).
An easier solution is to not change anything to
define-globalized-minor-mode and to require Elisp code to explicitly set
a major mode for any buffer that will be displayed. E.g. for *Shadows*
the Elisp code should explicitly call fundamental-mode in it.
Stefan