Index: sphinx/htmlwriter.py =================================================================== --- sphinx/htmlwriter.py (revision 65101) +++ sphinx/htmlwriter.py (working copy) @@ -54,7 +54,7 @@ self.highlighter = PygmentsBridge('html', builder.config.pygments_style) self.no_smarty = 0 self.builder = builder - self.highlightlang = 'python' + self.highlightlang = builder.config.pygments_default_lexer self.highlightlinenothreshold = sys.maxint def visit_desc(self, node): Index: sphinx/config.py =================================================================== --- sphinx/config.py (revision 65101) +++ sphinx/config.py (working copy) @@ -40,6 +40,7 @@ add_function_parentheses = (True, True), add_module_names = (True, True), show_authors = (False, True), + pygments_default_lexer = ('python', True), pygments_style = ('sphinx', False), templates_path = ([], False), template_bridge = (None, False), Index: sphinx/latexwriter.py =================================================================== --- sphinx/latexwriter.py (revision 65101) +++ sphinx/latexwriter.py (working copy) @@ -126,7 +126,7 @@ self.bibitems = [] self.table = None self.next_table_colspec = None - self.highlightlang = 'python' + self.highlightlang = builder.config.pygments_default_lexer self.highlightlinenothreshold = sys.maxint self.written_ids = set() if docclass == 'manual':