[Top][All Lists]

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

Re: Problems with new smtpmail

From: Óscar Fuentes
Subject: Re: Problems with new smtpmail
Date: Wed, 06 Jul 2011 22:34:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Lars Magne Ingebrigtsen <address@hidden> writes:

> Óscar Fuentes <address@hidden> writes:
>> Yes, but now it is ignored if listed on custom-set-variables even when
>> smtpmail is loaded later:
>> (custom-set-variables
>>   '(smtpmail-default-smtp-server "foo"))
>> (load "smtpmail")
>> fails here (smtpmail asks for a smtp server while sending email).
> The definition of these two variables hasn't changed.  It's still:
> (defvar smtpmail-default-smtp-server nil
>   "Specify default SMTP server.
> This only has effect if you specify it before loading the smtpmail library.")
> (defcustom smtpmail-smtp-server
>   (or (getenv "SMTPSERVER") smtpmail-default-smtp-server)
>   "The name of the host running SMTP server."
>   :type '(choice (const nil) string)
>   :group 'smtpmail)
> The only change I've done is to make `smtpmail-default-smtp-server' a
> defvar.
> (custom-set-variables
>   '(smtpmail-default-smtp-server "foo"))
> on a defvar-ed variable still sets it, doesn't it?
> So I'm wondering whether you're somehow loading smtpmail.el before you
> set `smtpmail-default-smtp-server'.
> Or is there something else subtle that I'm missing about going from a
> defcustom to a defvar?

With .emacs containing

  '(smtpmail-default-smtp-server "foo"))

starting Emacs and M-x eval-expression smtpmail-default-smtp-server

Debugger entered--Lisp error: (void-variable smtpmail-default-smtp-server)


 '(smtpmail-default-smtp-server "smtp.telefonica.net" NOW))

works. So yes, there is something about custom-set-variables and

reply via email to

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