emacs-devel
[Top][All Lists]
Advanced

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

Re: smtpmail and starttls improvement when starttls program is missing


From: Ted Zlatanov
Subject: Re: smtpmail and starttls improvement when starttls program is missing
Date: Tue, 04 Nov 2008 10:50:36 -0600
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux)

On Tue, 04 Nov 2008 09:53:17 +0900 Katsumi Yamaoka <address@hidden> wrote: 

KY> I think `with-no-warnings' and `(require 'starttls)' are unnecessary.
KY> For `with-no-warnings', it binds `byte-compile-warnings' to nil
KY> when compiling.  It is for making the byte compiler silent on any
KY> form, however there seems nothing to be warned when compiling.
KY> In addition, `with-no-warnings' is not available in Emacs 21 and
KY> XEmacs that Gnus supports, so the warning like the following is
KY> issued when compiling Gnus:

KY> While compiling the end of the data in file gnus/lisp/starttls.el:
KY>   ** The function `with-no-warnings' is not known to be defined.

KY> It is not serious since the function will not be used with those
KY> versions of Emacsen, though.

OK.  This was in the original code in smtpmail.el, I just moved it out
to starttls.el where it was more appropriate.

KY> For `(require 'starttls)', the reason I say it is unnecessary is
KY> that the function is defined in starttls.el that provides the
KY> `starttls' feature. ;-)  Therefore the function can be rewritten
KY> like the following, isn't it?
KY> (defun starttls-any-program-available ()
KY>   (let ((program (if starttls-use-gnutls
KY>                  starttls-gnutls-program
KY>                starttls-program)))
KY>     (condition-case ()
KY>     (progn
KY>       (call-process program)
KY>       program)
KY>       (error (progn
KY>            (message "No STARTTLS program was available (tried '%s')"
KY>                     program)
KY>            nil)))))

Yes, that's better, thanks.  I wasn't paying attention when I copied the
code.  Comitted.

Ted





reply via email to

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