Copy global settings from ``cfg`` to this config.

        The settings are copied only if they were not already modified.

def copy_globals(self, cfg):
        """Copy global settings from ``cfg`` to this config.

        The settings are copied only if they were not already modified.
        """
        for name, setting in cfg.settings.items():
            csetting = self.settings.get(name)
            if (setting.is_global and csetting is not None and
                    not csetting.modified):
                csetting.set(setting.get())