summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/latex2e-help-texinfo/ltx-help.el
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/latex2e-help-texinfo/ltx-help.el')
-rw-r--r--Master/texmf-dist/doc/latex/latex2e-help-texinfo/ltx-help.el25
1 files changed, 17 insertions, 8 deletions
diff --git a/Master/texmf-dist/doc/latex/latex2e-help-texinfo/ltx-help.el b/Master/texmf-dist/doc/latex/latex2e-help-texinfo/ltx-help.el
index 9fefecb88c1..0b48d680e1b 100644
--- a/Master/texmf-dist/doc/latex/latex2e-help-texinfo/ltx-help.el
+++ b/Master/texmf-dist/doc/latex/latex2e-help-texinfo/ltx-help.el
@@ -128,18 +128,27 @@
;; Thu Apr 25 2013 Mandar Mitra (mandar.mitra@gmail.com)
;; Using with (for example) "array" goes to the top node
;; of latex2e.info instead of the intended node.
+;;
+;; Thu Dec 3 2015 Kevin Ryde (user42_kevin@yahoo.com.au)
+;; * latex-help-get-cmd-alist don't take \:: as double-colon style index,
+;; and allow "(line 123)" at the end of recent makeinfo output.
+;; * Use buffer-substring-no-properties when exists (does in XEmacs 21.4).
;;; Code:
(require 'info)
-(if (string-match "XEmacs\\|Lucid" emacs-version)
- ; XEmacs
- (fset 'ltxh-buffer-substring (symbol-function 'buffer-substring))
- ; FSFmacs
- (fset 'ltxh-buffer-substring (symbol-function 'buffer-substring-no-properties)))
+(defalias 'ltxh-buffer-substring
+ (if (fboundp 'buffer-substring-no-properties) ;; when available
+ 'buffer-substring-no-properties
+ 'buffer-substring))
-(defvar latex-help-file "(latex2e)")
+(defcustom latex-help-file "(latex2e)"
+ "Select the LaTeX2e non official reference manual translation."
+ :type '(choice
+ (string :tag "English" "(latex2e)")
+ (string :tag "French" "(latex2e-fr)")
+ (string :tag "Spanish" "(latex2e-es)") ))
(defvar latex-help-split-window nil
"*When this is non-nil, `latex-help' will always pop up the info
@@ -259,7 +268,7 @@ The values are saved in `latex-help-cmd-alist' for speed."
(save-window-excursion
(setq latex-help-cmd-alist nil)
(Info-goto-node (concat latex-help-file "Command Index"))
- (if (search-forward "::" nil t)
+ (if (re-search-forward "::$" nil t)
(progn
(end-of-buffer)
(while (re-search-backward "^\\* \\(.+\\)::$" nil t)
@@ -267,7 +276,7 @@ The values are saved in `latex-help-cmd-alist' for speed."
(setq latex-help-cmd-alist
(cons (cons key key) latex-help-cmd-alist))))
(end-of-buffer)
- (while (re-search-backward "^\\* \\(.+\\): *\\(.+\\)\\.$" nil t)
+ (while (re-search-backward "^\\* \\(.+\\): *\\(.+\\)\\." nil t)
(setq key (ltxh-buffer-substring (match-beginning 1) (match-end 1)))
(setq value (ltxh-buffer-substring (match-beginning 2) (match-end 2)))
(setq latex-help-cmd-alist