--- a/hgkw/keyword.py Thu Oct 04 14:55:38 2007 +0200
+++ b/hgkw/keyword.py Thu Oct 04 15:01:16 2007 +0200
@@ -168,10 +168,10 @@
self.node = node
kwmaps = self.ui.configitems('keywordmaps')
- if kwmaps:
- self.templates = {}
- for k, v in kwmaps:
- self.templates[k] = templater.parsestring(v, quoted=False)
+ if kwmaps: # override default templates
+ kwmaps = [(k, templater.parsestring(v, quoted=False))
+ for (k, v) in kwmaps]
+ self.templates = dict(kwmaps)
escaped = [re.escape(k) for k in self.templates.keys()]
kwpat = r'\$(%s)(: [^$\n\r]*? )??\$' % '|'.join(escaped)
self.re_kw = re.compile(kwpat)