[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can the byte-compiler check whether functions passed by name are def
From: |
Klaus-Dieter Bauer |
Subject: |
Re: Can the byte-compiler check whether functions passed by name are defined? |
Date: |
Wed, 7 Aug 2013 21:59:01 +0200 |
2013/8/7 Stefan Monnier <address@hidden>:
>> The patch only adds a single line of code to byte-compile-normal-call
>> which calls defun byte-compile--higher-order--check-arguments.
>
> But there's no normal call in (if a #'foo1 #'foo2), so how can this work?
>
>
> Stefan
Good point. It does though.
Input file:
--------------------------------------------------
;; -*-
mode:emacs-lisp;coding:utf-8-unix;lexical-binding:t;byte-compile-dynamic:t;
-*-
(funcall (if t #'foo) "Hello World")
--------------------------------------------------
Compiler Log:
--------------------------------------------------
Compiling file c:/tmp/id1379159421d7d15c.el at Wed Aug 7 21:53:58 2013
In end of data:
id1379159421d7d15c.el:4:1:Warning: the function `foo' is not known to be
defined.
--------------------------------------------------
I guess the use of the function just doesn't match its name?
- Klaus
- Re: Can the byte-compiler check whether functions passed by name are defined?, (continued)
- Re: Can the byte-compiler check whether functions passed by name are defined?, Klaus-Dieter Bauer, 2013/08/07
- Re: Can the byte-compiler check whether functions passed by name are defined?, Stefan Monnier, 2013/08/07
- Re: Can the byte-compiler check whether functions passed by name are defined?, Klaus-Dieter Bauer, 2013/08/07
- Re: Can the byte-compiler check whether functions passed by name are defined?, Stefan Monnier, 2013/08/07
- Re: Can the byte-compiler check whether functions passed by name are defined?, Stefan Monnier, 2013/08/07
- Re: Can the byte-compiler check whether functions passed by name are defined?, Glenn Morris, 2013/08/07
- Re: Can the byte-compiler check whether functions passed by name are defined?, Glenn Morris, 2013/08/07
- Re: Can the byte-compiler check whether functions passed by name are defined?, Stefan Monnier, 2013/08/07
- Re: Can the byte-compiler check whether functions passed by name are defined?, Klaus-Dieter Bauer, 2013/08/08
- Re: Can the byte-compiler check whether functions passed by name are defined?, Stefan Monnier, 2013/08/08
- Re: Can the byte-compiler check whether functions passed by name are defined?,
Klaus-Dieter Bauer <=
- Re: Can the byte-compiler check whether functions passed by name are defined?, Stefan Monnier, 2013/08/07