changeset 9081:d8e8447a4b7b

keyword: collect kwmaps using a generator expression Allowed for Python 2.4.
author Christian Ebert <blacktrash@gmx.net>
date Tue, 07 Jul 2009 23:30:53 +0200
parents 5d6c42f33b71
children 31e54756559b
files hgext/keyword.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/keyword.py	Wed Jul 08 00:30:21 2009 +0200
+++ b/hgext/keyword.py	Tue Jul 07 23:30:53 2009 +0200
@@ -124,9 +124,8 @@
 
         kwmaps = self.ui.configitems('keywordmaps')
         if kwmaps: # override default templates
-            kwmaps = [(k, templater.parsestring(v, False))
-                      for (k, v) in kwmaps]
-            self.templates = dict(kwmaps)
+            self.templates = dict((k, templater.parsestring(v, False))
+                                  for k, v in kwmaps)
         escaped = map(re.escape, self.templates.keys())
         kwpat = r'\$(%s)(: [^$\n\r]*? )??\$' % '|'.join(escaped)
         self.re_kw = re.compile(kwpat)