[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TeX-arg-key-val syntax and let go of eval
From: |
Tassilo Horn |
Subject: |
Re: TeX-arg-key-val syntax and let go of eval |
Date: |
Mon, 17 Oct 2022 19:58:57 +0200 |
User-agent: |
mu4e 1.9.1; emacs 29.0.50 |
Arash Esbati <arash@gnu.org> writes:
Hi Arash,
> and then the `fboundp' check in `TeX-read-key-val' gets upset.
Indeed, fboundp only works for symbols.
> I suggest to write `TeX-read-key-val' like this:
>
> (defun TeX-read-key-val (optional key-val-alist &optional prompt)
> (multi-prompt-key-value
> (TeX-argument-prompt optional prompt "Options (k=v)")
> (cond ((or (and (symbolp key-val-alist)
> (fboundp key-val-alist))
> (functionp key-val-alist))
> (funcall key-val-alist))
> ((and (symbolp key-val-alist)
> (boundp key-val-alist))
> (symbol-value key-val-alist))
> ((and (listp key-val-alist)
> (listp (car key-val-alist)))
> key-val-alist)
> (t (error "Cannot interpret key-val-alist %S" key-val-alist)))))
>
> WDYT?
The first clause can be simplified to just (functionp key-val-alist). I
don't know why I've had the fboundp there in the first place.
Bye,
Tassilo
- Re: TeX-arg-key-val syntax and let go of eval, Arash Esbati, 2022/10/17
- Re: TeX-arg-key-val syntax and let go of eval,
Tassilo Horn <=
- Re: TeX-arg-key-val syntax and let go of eval, Arash Esbati, 2022/10/18
- Re: TeX-arg-key-val syntax and let go of eval, Tassilo Horn, 2022/10/18
- Re: TeX-arg-key-val syntax and let go of eval, Arash Esbati, 2022/10/19
- Re: TeX-arg-key-val syntax and let go of eval, Tassilo Horn, 2022/10/19
- Re: TeX-arg-key-val syntax and let go of eval, Tassilo Horn, 2022/10/20
- Re: TeX-arg-key-val syntax and let go of eval, Arash Esbati, 2022/10/21