Q: How to fix elmo-unintern
to use 2 arguments instead of 1, or silence the byte-compiler on this issue.
Here is the macro definition:
(defmacro elmo-unintern (string)
"Delete the symbol named NAME, if any, from OBARRAY.
The value is t if a symbol was found and deleted, nil otherwise.
NAME may be a string or a symbol. If it is a symbol, that symbol
is deleted, if it belongs to OBARRAY--no other symbol is deleted.
OBARRAY, if nil, defaults to the value of the variable `obarray'."
(static-if (fboundp 'unintern)
(list 'unintern string)))
Here is the bye-compile message:
In elmo-imap4-parse-response:
filename.el:92495:45:Warning: unintern called with 1 argument, but requires 2
filename.el:92513:46:Warning: unintern called with 1 argument, but requires 2
filename.el:92516:38:Warning: unintern called with 1 argument, but requires 2
Here is the comment by @Stefan from a previous bug report: https://lists.gnu.org/archive/html/bug-gnu-emacs/2015-04/msg00560.html
> Loading this file works as expected, but compiling it generates the
> warning
> unintern called with 1 argument, but requires 2
> But `unintern' doesn't require 2 arguments.
That's the `advertized-calling-convention' at work here. IOW calling
the function with only one argument still works but is deprecated.
Stefan
(elisp) Simple Macro
? What exactly is the difficulty? – npostavs Feb 09 '17 at 19:46nil
,obarray
,hello-world
? One mistake in the Wanderlust related libraries can cost an entire day to track down the error as there are zillioncondition-case
that hide errors -- yesterday, I had acondition-case-unless-debug
that still hid errors and cost me hours of time. I want to do this correctly, please. – lawlist Feb 09 '17 at 19:48npostavs
resolved the issue. I had tried usingobarray
without the'
[single quote], but the Wanderlust related libraries are filled withcondition-case
clauses that mask errors. I knew that usingobarray
(without a'
[single quote]) caused email to not function properly. This week, I spent a lot of time tinkering with elmo etc. and I decided to not waste time on this issue by continuing to guess why my attempt was not working. I wanted peace of mind that a wrong choice wouldn't cost me hours of debugging. – lawlist Feb 11 '17 at 01:14