Mercurial > hg
changeset 9409:57157a224037
highlight: move code from module top-level into extsetup
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Fri, 28 Aug 2009 22:14:04 +0200 |
parents | 70bf7f853adc |
children | 1c83938b6a8e |
files | hgext/highlight/__init__.py |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/highlight/__init__.py Fri Aug 28 20:53:03 2009 +0200 +++ b/hgext/highlight/__init__.py Fri Aug 28 22:14:04 2009 +0200 @@ -53,8 +53,9 @@ req.respond(common.HTTP_OK, 'text/css') return ['/* pygments_style = %s */\n\n' % pg_style, fmter.get_style_defs('')] -# monkeypatch in the new version -extensions.wrapfunction(webcommands, '_filerevision', filerevision_highlight) -extensions.wrapfunction(webcommands, 'annotate', annotate_highlight) -webcommands.highlightcss = generate_css -webcommands.__all__.append('highlightcss') +def extsetup(): + # monkeypatch in the new version + extensions.wrapfunction(webcommands, '_filerevision', filerevision_highlight) + extensions.wrapfunction(webcommands, 'annotate', annotate_highlight) + webcommands.highlightcss = generate_css + webcommands.__all__.append('highlightcss')