This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Doc: make python function/method descriptions look as in Python


>> I spotted one problem.  Changing the description of gdb.prompt_hook from a defop to a defun made the xref{prompt_hook} not work.  Either that or  it was broken already.  I made it xref{gdb.prompt_hook} but that produces an error when I click on that cross-reference.  What's the texinfo magic to  define what xref points to?

>That magic is @anchor, but you broke it because you changed the name of the anchor, which you shouldn't:
>
>> -@defop Operation {@value{GDBN}} prompt_hook current_prompt 
>> -@anchor{prompt_hook}
>> +@defun gdb.prompt_hook (current_prompt) @anchor{gdb.prompt_hook}
>
>You shouldn't change the @anchor line at all, because its label has nothing to do with the method name.  It's just a label, is not visible to the reader, and it _must_ match the label inside @xref.  You cannot change one without changing the other to match.

I changed both -- that way the cross-reference appears as "Note: gdb.promp_hook" or "See gdb.prompt_hook".

	paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]