GNU bug report logs -
#13676
24.2.93; Compiler warnings with (defalias #'symbol ...)
Previous Next
Reported by: michael_heerdegen <at> web.de
Date: Sun, 10 Feb 2013 17:13:01 UTC
Severity: minor
Found in version 24.2.93
Fixed in version 24.3
Done: Michael Heerdegen <michael_heerdegen <at> web.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> | [...] 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
This bug report was last modified 12 years and 100 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.