[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-AUCTeX] TeX-doc
From: |
Bernd Rellermeyer |
Subject: |
[Bug-AUCTeX] TeX-doc |
Date: |
Sun, 15 Jul 2012 11:42:51 +0200 |
Recent version of LaTeX have the info file name "latex2e" instead of "latex".
For TeX-doc to find the info file you have either to make a symlink latex.info
-> latex2e.info, or the following two fixes works for me:
;; Fix `info-lookup-alist' for latex2e.
(eval-after-load "info-look"
'(let ((latex-mode-entry
(assq 'latex-mode (assq 'symbol info-lookup-alist))))
(setcdr latex-mode-entry (list (nth 1 latex-mode-entry)
(nth 2 latex-mode-entry)
'(("(latex2e)Command Index"))
(nth 4 latex-mode-entry)
(nth 5 latex-mode-entry)))))
;; Fix `TeX-doc-backend-alist' for latex2e.
(eval-after-load "tex"
'(let ((latex-info-backend (assq 'latex-info TeX-doc-backend-alist)))
(setcdr latex-info-backend
(list (nth 1 latex-info-backend)
(lambda nil
(when (condition-case nil
(save-window-excursion
(let ((buf
(generate-new-buffer-name "*info*")))
(info "latex2e" buf)
(kill-buffer buf))
t)
(error nil))
(mapcar (lambda (x)
(let ((x (car x)))
(if (string-match "\\`\\\\" x)
(substring x 1)
x)))
(info-lookup->completions 'symbol
'latex-mode))))
(nth 3 latex-info-backend)))))
Maybe it is worth considering to change TeX-doc-backend-alist to latex2e.
- [Bug-AUCTeX] TeX-doc,
Bernd Rellermeyer <=