On Thu 11 Jan 2018 at 19:33, Stefan Monnier wrote: >> That will need an upcoming 'auth-source-xoauth2' package, as getting the >> password involves doing some HTTP fetching. I have the code, just need >> to find some time to add it to MELPA. > > BTW, your library can still work with Emacs-26 (and even Emacs-25) using > a hack like: > > (unless (cl-generic-p 'smtpmail-try-auth-method) > (let ((f (symbol-function 'smtpmail-try-auth-method))) > (fset 'smtpmail-try-auth-method nil) > (cl-generic-define-method 'smtpmail-try-auth-method nil > '(process mech user password) > nil f))) > > which turns the "regular function" smtpmail-try-auth-method into > a "generic function". Yes - and it can also work with Emacs-24 by advising the function instead, which is probably what I'm going to do: if the cl-* functions are there, and smtpmail is one, specialize it, otherwise advise it. -- Cesar Crusius