[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Manually enable package completion
From: |
Arash Esbati |
Subject: |
Re: Manually enable package completion |
Date: |
Mon, 30 May 2022 19:46:29 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 |
Denis Bitouzé <denis.bitouze@univ-littoral.fr> writes:
> Well, not that easy when you don't know anything to `elisp` :$
No worries, that will come quick :-)
> Looking at `tcolorbox.el` and `listings.el`, I tried the following for
> the environments `ltx-code` and friends:
>
> ┌────
> │ (defvar LaTeX-ltx-code-keyval-options
> │ '(("title")
> │ ("notitle")
> │ ("adjusted title")))
> │
> │ (defun LaTeX-ltx-code-keyval-options ()
> │ "Return an updated list of key=vals from letgut class."
> │ (append
> │ ;; Standard key=vals:
> │ LaTeX-listings-key-val-options))
> │
> │ (LaTeX-add-environments
> │ '("bookreview" LaTeX-env-args
> │ (TeX-arg-key-val (("title")
> │ ("reviewer")
> │ ("bibkey")
> │ ("frontcover")
> │ ("price"))))
> │ '("ltx-code" LaTeX-env-args
> │ [TeX-arg-key-val (LaTeX-ltx-code-keyval-options)])
> │ '("ltx-code-result" LaTeX-env-args
> │ [TeX-arg-key-val (LaTeX-ltx-code-keyval-options)])
> │ '("ltx-code-external-result" LaTeX-env-args
> │ [TeX-arg-key-val (LaTeX-ltx-code-keyval-options)]
> │ TeX-arg-file))
> └────
>
> but it doesn't work:
>
> ┌────
> │ mapcar: Wrong type argument: listp, LaTeX-ltx-code-keyval-options
> └────
I'm not familiar with the code of letgut.cls, but in case 'ltx-code' and
friends take keyval's form the listings package, you can do something
like this:
(LaTeX-add-environments
'("bookreview" LaTeX-env-args
(TeX-arg-key-val (("title")
("reviewer")
("bibkey")
("frontcover")
("price"))))
'("ltx-code" LaTeX-env-args
[TeX-arg-key-val (LaTeX-listings-key-val-options)])
'("ltx-code-result" LaTeX-env-args
[TeX-arg-key-val (LaTeX-listings-key-val-options)])
'("ltx-code-external-result" LaTeX-env-args
[TeX-arg-key-val (LaTeX-listings-key-val-options)]
TeX-arg-file))
I put that in the letgut.el I have and it works. The file is attached.
Best, Arash
letgut.el
Description: application/emacs-lisp
- Manually enable package completion, Denis Bitouzé, 2022/05/13
- Re: Manually enable package completion, Arash Esbati, 2022/05/13
- Re: Manually enable package completion, Denis Bitouzé, 2022/05/13
- Re: Manually enable package completion, Arash Esbati, 2022/05/13
- Re: Manually enable package completion, Denis Bitouzé, 2022/05/23
- Re: Manually enable package completion, Arash Esbati, 2022/05/24
- Re: Manually enable package completion, Denis Bitouzé, 2022/05/30
- Re: Manually enable package completion, Denis Bitouzé, 2022/05/30
- Re: Manually enable package completion,
Arash Esbati <=
Re: Manually enable package completion, Mandar Mitra, 2022/05/13