"Stephen J. Turnbull" <stephen(a)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
"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.",
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.
XEmacs-Beta mailing list