[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ~`symbol-function' to get code as list even when byte-compiled?
From: |
Stefan Monnier |
Subject: |
Re: ~`symbol-function' to get code as list even when byte-compiled? |
Date: |
Tue, 26 May 2015 21:07:40 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> When I did this by putting the "payload" functions
> directly into the w3m hook that required them to all
> have one parameter, as w3m executed all them hook
Of course. That's how the hook is defined.
> However now with this solution when there is a lambda
> around the functions the lambda can deal with the
> argument, so I removed the parameters from all the
> payloads.
That presumes that this argument is never useful, i.e. that the
designers of this hook were mistaken.
> On the other hand, if I then were to add those parameters again to the
> payloads, wouldn't I have the byte-compiler complain even more (once
> for each function) that *they* don't use the argument?
Each function can decide to use the argument or not individually, which
is how things should be. You can tell the compiler that the argument is
locally unused by putting an underscore as its first char. E.g.
(defun my-payload (&optional _display)
(message "See, I don't use `display'!"))
-- Stefan
- Re: ~`symbol-function' to get code as list even when byte-compiled?, (continued)
- Re: ~`symbol-function' to get code as list even when byte-compiled?, Pascal J. Bourguignon, 2015/05/24
- Re: ~`symbol-function' to get code as list even when byte-compiled?, Emanuel Berg, 2015/05/25
- Re: ~`symbol-function' to get code as list even when byte-compiled?, Pascal J. Bourguignon, 2015/05/25
- Message not available
- Re: ~`symbol-function' to get code as list even when byte-compiled?, Emanuel Berg, 2015/05/25
- Re: ~`symbol-function' to get code as list even when byte-compiled?, Pascal J. Bourguignon, 2015/05/25
- Message not available
- Re: ~`symbol-function' to get code as list even when byte-compiled?, Emanuel Berg, 2015/05/25
- Re: ~`symbol-function' to get code as list even when byte-compiled?, Emanuel Berg, 2015/05/25
- Re: ~`symbol-function' to get code as list even when byte-compiled?, Stefan Monnier, 2015/05/26
- Re: ~`symbol-function' to get code as list even when byte-compiled?, Emanuel Berg, 2015/05/26
- Re: ~`symbol-function' to get code as list even when byte-compiled?,
Stefan Monnier <=
- Re: ~`symbol-function' to get code as list even when byte-compiled?, Emanuel Berg, 2015/05/26
- Re: ~`symbol-function' to get code as list even when byte-compiled?, Stefan Monnier, 2015/05/26
- Re: ~`symbol-function' to get code as list even when byte-compiled?, Emanuel Berg, 2015/05/26
- Re: ~`symbol-function' to get code as list even when byte-compiled?, Stefan Monnier, 2015/05/26
- Re: ~`symbol-function' to get code as list even when byte-compiled?, Emanuel Berg, 2015/05/27