diff --git a/hgext/pager.py b/hgext/pager.py --- a/hgext/pager.py +++ b/hgext/pager.py @@ -28,6 +28,7 @@ from mercurial import ( commands, dispatch, extensions, + registrar, ) # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for @@ -36,13 +37,20 @@ from mercurial import ( # leave the attribute unspecified. testedwith = 'ships-with-hg-core' +configtable = {} +configitem = registrar.configitem(configtable) + +configitem('pager', 'attend', + default=lambda: attended, +) + def uisetup(ui): def pagecmd(orig, ui, options, cmd, cmdfunc): auto = options['pager'] == 'auto' if auto and not ui.pageractive: usepager = False - attend = ui.configlist('pager', 'attend', attended) + attend = ui.configlist('pager', 'attend') ignore = ui.configlist('pager', 'ignore') cmds, _ = cmdutil.findcmd(cmd, commands.table)