Re: add sender without mail if mail is in some ignored-list?

Eric Abrahamsen <[email protected]> Fri, 27 Mar 2020 09:24:03 -0700
Newsgroups gmane.emacs.bbdb.user
Message-ID <[email protected]>
Kevin Brubeck Unhammer <[email protected]> writes:

> Pieter van Oostrum <[email protected]> čálii:
>
>> And, by the way, you shouldn't use the value of a defun, because its
> value is undefined.
>
> That was new to me; my init is full of (setq foo (defun …)) and I've
> never had any problems with that. E.g. I now have:
>
>     bbdb-ignore-redundant-mails is a variable defined in ‘bbdb.el’.
>     Its value is ‘my-bbdb-ignore-redundant-mails’
>
> Getting a bit off-topic, but are there docs somewhere on what can go
> wrong with (setq foo (defun …))?

I doubt there are docs on it, because I doubt it's occurred to anyone
else to try that :)

The docstring of `defun' says its return value is undefined, which is
just computer manual speak for "don't do that". It's possible it works
by accident, but it could just as possibly stop working. It's safest to
use `defun' at toplevel, and then refer to it as
#'my-bbdb-ignore-redundant-mails in `setq' forms.

Eric