##// END OF EJS Templates
configitems: register the 'pager.attend' config
Boris Feld -
r34496:6d1b0970 default
parent child Browse files
Show More
@@ -28,6 +28,7 b' from mercurial import ('
28 commands,
28 commands,
29 dispatch,
29 dispatch,
30 extensions,
30 extensions,
31 registrar,
31 )
32 )
32
33
33 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
34 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
@@ -36,13 +37,20 b' from mercurial import ('
36 # leave the attribute unspecified.
37 # leave the attribute unspecified.
37 testedwith = 'ships-with-hg-core'
38 testedwith = 'ships-with-hg-core'
38
39
40 configtable = {}
41 configitem = registrar.configitem(configtable)
42
43 configitem('pager', 'attend',
44 default=lambda: attended,
45 )
46
39 def uisetup(ui):
47 def uisetup(ui):
40
48
41 def pagecmd(orig, ui, options, cmd, cmdfunc):
49 def pagecmd(orig, ui, options, cmd, cmdfunc):
42 auto = options['pager'] == 'auto'
50 auto = options['pager'] == 'auto'
43 if auto and not ui.pageractive:
51 if auto and not ui.pageractive:
44 usepager = False
52 usepager = False
45 attend = ui.configlist('pager', 'attend', attended)
53 attend = ui.configlist('pager', 'attend')
46 ignore = ui.configlist('pager', 'ignore')
54 ignore = ui.configlist('pager', 'ignore')
47 cmds, _ = cmdutil.findcmd(cmd, commands.table)
55 cmds, _ = cmdutil.findcmd(cmd, commands.table)
48
56
General Comments 0
You need to be logged in to leave comments. Login now