Subject: Re: bug#38252: 27.0.50; Gnus server definitions and generic function specializers

From: Stefan Monnier <[email-masked]>
Date: Sun, 17 Nov 2019 23:36:09 -0500

> But just so I don't feel like I wasted my afternoon: how *would* one
> write the generalizer I'm talking about?

Ah, that part.
I guess It could look like (guaranteed 100% untested):

    (defvar gnus--legacy-server-tag (make-symbol "gnus-legacy-server"))
    (cl-generic-define-generalizer gnus-legacy-server-generalizer
      90 (lambda (varname &rest _)
           `(and (consp ,varname)
                 (symbolp (car ,varname))
                 (assq (car ,varname) nnoo-definition-alist)
                 (stringp (cadr ,varname))
                 gnus--legacy-server-tag))
      (lambda (tag &rest _)
        (when (eq tag gnus--legacy-server-tag) (list tag))))
    
    (cl-defmethod cl-generic-generalizers ((_ (eql gnus-legacy-server)))
      "Dispatch on old-style Gnus server definitions."
      (list gnus-legacy-server-generalizer))

-- Stefan