[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] imakeidx.el and a patch for latex.el
From: |
Tassilo Horn |
Subject: |
Re: [AUCTeX-devel] imakeidx.el and a patch for latex.el |
Date: |
Thu, 27 Dec 2012 21:19:39 +0100 |
User-agent: |
Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) |
"address@hidden" <address@hidden> writes:
Hi Mosè,
> --- latex.el-old 2012-12-26 12:41:44.000000000 +0100
> +++ latex.el 2012-12-26 12:42:25.000000000 +0100
> @@ -1900,6 +1900,13 @@
> nil t)
> optional))
>
> +(defcustom LaTeX-pagestyle-list
> + '(("plain") ("empty") ("headings") ("myheadings"))
> + "A list of available pagestyles."
> + :group 'LaTeX
> + :type '(repeat (list (string))))
> +(make-variable-buffer-local 'LaTeX-pagestyle-list)
Why not simply a list '("plain" "empty" "headings" "myheadings")?
> ;;; imakeidx.el --- AUCTeX style for `imakeidx.sty'.
>
> [...]
>
> ;; `firstpagestyle' and `headers' options for `indexsetup' macro are
> ;; available only if `fancyhdr' is not loaded. The following code
> ;; works only if `imakeidx' is loaded before `fancyhdr'
> (unless (member "fancyhdr" TeX-active-styles)
> ;; `firstpagestyle' key takes as value one of the available
> ;; pagestyles. `LaTeX-pagestyle-list' is a list of lists of
> ;; strings, we need a list of strings
> (setq LaTeX-imakeidx-firstpagestyle-values nil)
> (dotimes (i (list-length LaTeX-pagestyle-list))
> (setq LaTeX-imakeidx-firstpagestyle-values
> (append LaTeX-imakeidx-firstpagestyle-values
> (nth i LaTeX-pagestyle-list))))
If LaTeX-pagestyle-list was just a list, you could do
(setq LaTeX-imakeidx-firstpagestyle-values
LaTeX-pagestyle-list)
Even with LaTeX-pagestyle-list being an alist, you'd use something like
(setq LaTeX-imakeidx-firstpagestyle-values
(mapcar #'car LaTeX-pagestyle-list))
instead of dotimes/nth.
> (TeX-run-style-hooks
> "multicol"
> "xpatch"
> "pdftexcmds"
> "ifluatex"
> "ifxetex"
> "xkeyval")
Does imakeidx automatically enable all these other styles?
Bye,
Tassilo