bbdb-user
[Top][All Lists]
Advanced

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

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


From: Eric Abrahamsen
Subject: Re: add sender without mail if mail is in some ignored-list?
Date: Fri, 27 Mar 2020 09:24:03 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Kevin Brubeck Unhammer <address@hidden> writes:

> Pieter van Oostrum <address@hidden> čá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



reply via email to

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