auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX-devel] [gmane.emacs.auctex.diffs] GNU AUCTeX branch, master,


From: Arash Esbati
Subject: Re: [AUCTeX-devel] [gmane.emacs.auctex.diffs] GNU AUCTeX branch, master, updated. a16a5107845aee83e6e52dd6d8cfbbe90bd6303d
Date: Thu, 10 May 2018 21:14:51 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3

Ikumi Keita <address@hidden> writes:

>>>>>> Arash Esbati <address@hidden> writes:
>> I think this patch will not work as expected.  `cl-caddr' is a function
>> and not a macro[1].  Thus, `eval-when-compile' will not expand
>> `cl-caddr' at compile-time and you get a dependency at run-time.
>
> Yes, `cl-caddr' is a function, but I think it is expanded as a macro at
> byte compilation nevertheless :-).
>
> This is a quote from the output of C-h f cl-caddr RET:
> ----------------------------------------------------------------------
> cl-caddr is a compiled Lisp function in `cl-lib.el'.
>
> (cl-caddr X)
>
> This function has a compiler macro `internal--compiler-macro-cXXr'.
> ----------------------------------------------------------------------
> And `cl-caddr' is defined in cl-lib.el as
> ----------------------------------------------------------------------
> (defun cl-caddr (x)
>   "Return the `car' of the `cdr' of the `cdr' of X."
>   (declare (compiler-macro internal--compiler-macro-cXXr))
>   (car (cdr (cdr x))))
> ----------------------------------------------------------------------
> Thanks to this compiler macro, `eval-when-compile' works without
> introducing run-time dependency on `cl-lib'.

Hi Keita,

thanks for for your response.  I admit I didn't check the definition of
`cl-caddr', but solely the manual :-|

> It is of course very easy to rewrite not to use cl-lib in this case.
> I'll replace (cl-caddr ...) with (nth 2 ...) and delete
> (eval-when-compile ...) if you prefer.

No, we're fine, thank you :-)

Best, Arash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]