[Bug: 21.4.19] starttls doesn't work in smtpmail

Simon Josefsson simon at josefsson.org
Tue Mar 6 09:37:30 EST 2007


"Stephen J. Turnbull" <stephen at xemacs.org> writes:

> Doug Orleans writes:
>
>  > revision 1.24: it uses the macro with-no-warnings, which I believe
>  > only exists in GNU Emacs, not XEmacs, and this causes the check for
>  > the tls executable to silently fail (because it's inside a
>  > condition-case).  When I redefined smtpmail-open-stream without the
>  > with-no-warnings macro, it works fine.  I don't know if there's some
>  > equivalent in XEmacs, or if there's any need for it.
>
> Nice catch, Doug!
>
> The idiom in XEmacs is
>
>     (let ((display-warning-minimum-level 'emergency)) ...)
>
> This means that warnings will still be logged to the *Warnings*
> buffer.  Theoretically, you *could* get a warning of an emergency
> here, but there's only one instance of a warning at that level, in
> alloc.c:
>
>   warn_when_safe
>     (Qmemory, Qemergency,
>      "%s\n"
>      "Killing some buffers may delay running out of memory.\n"
>      "However, certainly by the time you receive the 95%% warning,\n"
>      "you should clean up, kill this Emacs, and start a new one.",
>      str);
>
> which is something you probably do want to know about....  Gotta love
> that abuse of condition-case, too.  :-)
>
> Simon, I think that the best thing would be to just get rid of the
> with-no-warnings call (unless you know of bogus warnings that will
> definitely be issued), and we probably ought to change the
> condition-case to catch 'io-error, which will catch all exceptions due
> to expectable process failures.

There are several uses of with-no-warnings in modern elisp, how about
if XEmacs implements it?  The implementation seems straight forward,
here is what my Emacs has:

(put 'with-no-warnings 'lisp-indent-function 0)
(defun with-no-warnings (&rest body)
  "Like `progn', but prevents compiler warnings in the body."
  ;; The implementation for the interpreter is basically trivial.
  (car (last body)))

Thanks for the CC.

/Simon



More information about the XEmacs-Beta mailing list