bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#13676: 24.2.93; Compiler warnings with (defalias #'symbol ...)


From: Michael Heerdegen
Subject: bug#13676: 24.2.93; Compiler warnings with (defalias #'symbol ...)
Date: Mon, 11 Feb 2013 16:04:54 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.93 (gnu/linux)

Hello Stefan,

thanks for the explanation.  I'll close it.


Michael.

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> > |  [...]  But unlike `quote', it also serves as a note to the Emacs
> > |evaluator and byte-compiler that FUNCTION-OBJECT is intended to be used
> > |as a function.  [...]
>
> Right, this means that #'foo is a reference to the function stored in
> foo'.
>
> > (defalias #'my-package-end-of-line
>
> So, this is weird, because you're not referring to the function stored
> in `my-package-end-of-line' here, instead you really want to set the
> `symbol-function' slot of the symbol, so the argument you want to pass
> to `defalias' is not a function but a symbol.
>
> Both work in practice, but the intention expressed by the use of #' is
> incorrect here.
>
> >   (if (fboundp #'end-of-visual-line)
>
> Similarly, here it should be (fboundp 'end-of-visual-line) since
> fboundp's argument should be a symbol, not a function.
>
>
>         Stefan





reply via email to

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