1553 |
;; defined in individual style hooks |
;; defined in individual style hooks |
1554 |
(TeX-update-style)) |
(TeX-update-style)) |
1555 |
|
|
1556 |
|
(defun LaTeX-arg-usepackage (optional) |
1557 |
|
"Insert arguments to usepackage." |
1558 |
|
(let ((TeX-file-extensions '("sty"))) |
1559 |
|
(TeX-arg-input-file nil "Package") |
1560 |
|
(save-excursion |
1561 |
|
(search-backward-regexp "{\\(.*\\)}") |
1562 |
|
(let* ((package (match-string 1)) |
1563 |
|
(var (intern (format "LaTeX-%s-package-options" package))) |
1564 |
|
(crm-separator ",") |
1565 |
|
(TeX-arg-opening-brace LaTeX-optop) |
1566 |
|
(TeX-arg-closing-brace LaTeX-optcl) |
1567 |
|
options) |
1568 |
|
(if (or (and (boundp var) |
1569 |
|
(listp (symbol-value var))) |
1570 |
|
(fboundp var)) |
1571 |
|
(if (functionp var) |
1572 |
|
(setq options (funcall var)) |
1573 |
|
(setq options |
1574 |
|
(mapconcat 'identity |
1575 |
|
(TeX-completing-read-multiple |
1576 |
|
"Options: " (mapcar 'list (symbol-value var))) |
1577 |
|
","))) |
1578 |
|
(setq options (read-string "Options: "))) |
1579 |
|
(TeX-argument-insert options t))))) |
1580 |
|
|
1581 |
(defvar TeX-global-input-files nil |
(defvar TeX-global-input-files nil |
1582 |
"List of the non-local TeX input files. |
"List of the non-local TeX input files. |
1583 |
|
|
4994 |
[ "Number of arguments" ] [ "Default value for first argument" ] t) |
[ "Number of arguments" ] [ "Default value for first argument" ] t) |
4995 |
'("renewcommand*" TeX-arg-macro |
'("renewcommand*" TeX-arg-macro |
4996 |
[ "Number of arguments" ] [ "Default value for first argument" ] t) |
[ "Number of arguments" ] [ "Default value for first argument" ] t) |
4997 |
'("usepackage" [ "Options" ] (TeX-arg-input-file "Package")) |
'("usepackage" LaTeX-arg-usepackage) |
4998 |
'("documentclass" TeX-arg-document))) |
'("documentclass" TeX-arg-document))) |
4999 |
|
|
5000 |
(TeX-add-style-hook "latex2e" |
(TeX-add-style-hook "latex2e" |