diff --git a/CHANGES b/CHANGES index 4bd9b4622..aa38012d1 100644 --- a/CHANGES +++ b/CHANGES @@ -14,8 +14,6 @@ Features added -------------- * #4181: autodoc: Sort dictionary keys when possible -* Add :confval:`smart_quotes` to disable smart quotes through ``conf.py`` - (refs: #3967) Bugs fixed ---------- diff --git a/doc/config.rst b/doc/config.rst index 329b6fa20..7a6d20147 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -23,7 +23,8 @@ and output behavior. The configuration file is executed as Python code at build time (using :func:`execfile`, and with the current directory set to its containing -directory), and therefore can execute arbitrarily complex code. +directory), and therefore can execute arbitrarily complex code. Sphinx then +reads simple names from the file's namespace as its configuration. Important points to note: @@ -341,14 +342,6 @@ General configuration .. versionadded:: 1.3 -.. confval:: smart_quotes - - If true, `SmartyPants `_ - will be used to convert quotes and dashes to typographically correct - entities. Default: ``True``. - - .. versionadded:: 1.6.6 - .. confval:: tls_verify If true, Sphinx verifies server certifications. Default is ``True``. @@ -785,9 +778,8 @@ that use Sphinx's HTMLWriter class. entities. Default: ``True``. .. deprecated:: 1.6 - To disable smart quotes, use :confval:`smart_quotes` or the Docutils - configuration file (``docutils.conf``) instead to set there its - `smart_quotes option`_. + To disable or customize smart quotes, use the Docutils configuration file + (``docutils.conf``) instead to set there its `smart_quotes option`_. .. _`smart_quotes option`: http://docutils.sourceforge.net/docs/user/config.html#smart-quotes diff --git a/sphinx/config.py b/sphinx/config.py index 5308c52bf..02ee529a3 100644 --- a/sphinx/config.py +++ b/sphinx/config.py @@ -132,7 +132,6 @@ class Config(object): tls_verify = (True, 'env'), tls_cacerts = (None, 'env'), - smart_quotes = (True, 'env'), ) # type: Dict[unicode, Tuple] def __init__(self, dirname, filename, overrides, tags): diff --git a/sphinx/environment/__init__.py b/sphinx/environment/__init__.py index 9aec464a4..522414ea6 100644 --- a/sphinx/environment/__init__.py +++ b/sphinx/environment/__init__.py @@ -677,14 +677,14 @@ class BuildEnvironment(object): language = self.config.language or 'en' self.settings['language_code'] = language if 'smart_quotes' not in self.settings: + self.settings['smart_quotes'] = True if self.config.html_use_smartypants is not None: warnings.warn("html_use_smartypants option is deprecated. Smart " "quotes are on by default; if you want to disable " - "them, use the smart_quotes option", + "or customize them, use the smart_quotes option in " + "docutils.conf.", RemovedInSphinx17Warning) self.settings['smart_quotes'] = self.config.html_use_smartypants - else: - self.settings['smart_quotes'] = self.config.smart_quotes # confirm selected language supports smart_quotes or not for tag in normalize_language_tag(language):