@@ -220,21 +220,26 @@ def run(self) -> list[Node]:
220220        node ['domain' ] =  self .domain 
221221        # 'desctype' is a backwards compatible attribute 
222222        node ['objtype' ] =  node ['desctype' ] =  self .objtype 
223+ 
224+         # Copy old option names to new ones 
225+         # xref RemovedInSphinx90Warning 
226+         # deprecate noindex, noindexentry, and nocontentsentry in Sphinx 9.0 
227+         if  'no-index'  not  in self .options  and  'noindex'  in  self .options :
228+             self .options ['no-index' ] =  self .options ['noindex' ]
229+         if  'no-index-entry'  not  in self .options  and  'noindexentry'  in  self .options :
230+             self .options ['no-index-entry' ] =  self .options ['noindexentry' ]
231+         if  'no-contents-entry'  not  in self .options  and  'nocontentsentry'  in  self .options :
232+             self .options ['no-contents-entry' ] =  self .options ['nocontentsentry' ]
233+ 
223234        node ['no-index' ] =  node ['noindex' ] =  no_index  =  (
224235            'no-index'  in  self .options 
225-             # xref RemovedInSphinx90Warning 
226-             # deprecate noindex in Sphinx 9.0 
227-             or  'noindex'  in  self .options )
236+         )
228237        node ['no-index-entry' ] =  node ['noindexentry' ] =  (
229238            'no-index-entry'  in  self .options 
230-             # xref RemovedInSphinx90Warning 
231-             # deprecate noindexentry in Sphinx 9.0 
232-             or  'noindexentry'  in  self .options )
239+         )
233240        node ['no-contents-entry' ] =  node ['nocontentsentry' ] =  (
234241            'no-contents-entry'  in  self .options 
235-             # xref RemovedInSphinx90Warning 
236-             # deprecate nocontentsentry in Sphinx 9.0 
237-             or  'nocontentsentry'  in  self .options )
242+         )
238243        node ['no-typesetting' ] =  ('no-typesetting'  in  self .options )
239244        if  self .domain :
240245            node ['classes' ].append (self .domain )
0 commit comments