Tassilo Horn <[email protected]> writes:

> Oleh <[email protected]> writes:
>
>>> `cl-count' is only available in Emacs 24, but we'd like to stay
>>> compatible with at least Emacs 22 and also XEmacs 21.  (Using `count'
>>> from `cl' also won't work, because we don't want to require that at
>>> runtime.)
>>
>> This one I'm not really sure how to fix. Maybe you know hot to do it?
>> Would dash.el work?
>
> No.  I'm not sure if it works with XEmacs (probably not), and adding a
> dependency just for one single function isn't justified.  So I'd just
> define a compat function `TeX-count' (in tex.el), which can just be an
> alias to `cl-count' if that's bound.  E.g., something like this:
>
> (if (fboundp 'cl-count)
>     (defalias 'TeX-count 'cl-count
>       "Return the number of occurences of the ITEM in LIST.
> The tests are done with `eql'.")

Not sure that's good.  AUCTeX does

(eval-when-compile
  (require 'cl))

in tex.el so the alias will be defined when byte-compiling, but that
does not mean that you can use cl-count at run-time.

-- 
David Kastrup

_______________________________________________
auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex

Reply via email to