(defconst reftex-toc-help
" AVAILABLE KEYS IN TOC BUFFER
============================
-n / p next-line / previous-line
-SPC Show the corresponding location of the LaTeX document.
-TAB Goto the location and keep the TOC window.
-RET Goto the location and hide the TOC window (also on mouse-2).
-< / > Promote / Demote section, or all sections in region.
-C-c > Display Index. With prefix arg, restrict index to current section.
-q / k Hide/Kill *toc* buffer, return to position of reftex-toc command.
-l i c F Toggle display of [l]abels, [i]ndex, [c]ontext, [F]ile borders.
-t Change maximum toc depth (e.g. `3 t' hides levels greater than 3).
-f / g Toggle follow mode / Refresh *toc* buffer.
-a / d Toggle auto recenter / Toggle dedicated frame
-r / C-u r Reparse the LaTeX document / Reparse entire LaTeX document.
-. In other window, show position from where `reftex-toc' was called.
-M-% Global search and replace to rename label at point.
-x Switch to TOC of external document (with LaTeX package `xr').
-z Jump to a specific section (e.g. '3 z' goes to section 3).")
+\\`n' / \\`p' `next-line' / `previous-line'
+\\`SPC' Show the corresponding location of the LaTeX document.
+\\`TAB' Goto the location and keep the TOC window.
+\\`RET' Goto the location and hide the TOC window (also on `mouse-2').
+\\`<' / \\`>' Promote / Demote section, or all sections in region.
+\\`C-c >' Display Index. With prefix arg, restrict index to current section.
+\\`q' / \\`k' Hide/Kill *toc* buffer, return to position of reftex-toc command.
+\\`l' \\`i' \\`c' \\`F' Toggle display of [l]abels, [i]ndex, [c]ontext, [F]ile borders.
+\\`t' Change maximum toc depth (e.g. `3 t' hides levels greater than 3).
+\\`f' / \\`g' Toggle follow mode / Refresh *toc* buffer.
+\\`a' / \\`d' Toggle auto recenter / Toggle dedicated frame
+\\`r' / \\`C-u r' Reparse the LaTeX document / Reparse entire LaTeX document.
+\\`.' In other window, show position from where `reftex-toc' was called.
+\\`M-%' Global search and replace to rename label at point.
+\\`x' Switch to TOC of external document (with LaTeX package `xr').
+\\`z' Jump to a specific section (e.g. \\`3 z' goes to section 3).")
(defvar reftex--rebuilding-toc nil)
(interactive)
(reftex-toc-dframe-p nil 'error)
(with-output-to-temp-buffer "*RefTeX Help*"
- (princ reftex-toc-help))
+ (let ((help (substitute-command-keys reftex-toc-help)))
+ (with-current-buffer standard-output
+ (insert help))))
(reftex-enlarge-to-fit "*RefTeX Help*" t)
;; If follow mode is active, arrange to delay it one command
(if reftex-toc-follow-mode