emacs-devel
[Top][All Lists]
Advanced

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

defcustom with deprecated values


From: Robert Pluim
Subject: defcustom with deprecated values
Date: Fri, 16 Oct 2020 12:30:32 +0200

Hi,

in smtpmail.el we have:

(defcustom smtpmail-stream-type nil
  "Type of SMTP connections to use.
This may be either nil (upgrade with STARTTLS if possible),
`starttls' (refuse to send if STARTTLS isn't available),
`plain' (never use STARTTLS), or `ssl' (to use TLS/SSL)."
  :version "24.1"
  :type '(choice (const :tag "Possibly upgrade to STARTTLS" nil)
                 (const :tag "Always use STARTTLS" starttls)
                 (const :tag "Never use STARTTLS" plain)
                 (const :tag "Use TLS/SSL" ssl)))

This gets passed down to 'open-network-stream', which accepts 'tls
plus 'ssl as a backwards compatible equivalent. For consistency, we
should really add 'tls here as well, but I donʼt think we can remove
'ssl, since there will be configurations with that value saved that
must remain valid.

The question then is, how do we indicate that we donʼt really want
people to use 'ssl? The following kind of works, but then the
'deprecated' bit in the value list shown in 'customize' could be
misinterpreted:

(defcustom smtpmail-stream-type nil
  "Type of SMTP connections to use.
This may be either nil (upgrade with STARTTLS if possible),
`starttls' (refuse to send if STARTTLS isn't available),
`plain' (never use STARTTLS), or `tls' (to use TLS/SSL).
`ssl' is equivalent to `tls', but deprecated."
  :version "24.1"
  :type '(choice (const :tag "Possibly upgrade to STARTTLS" nil)
                 (const :tag "Always use STARTTLS" starttls)
                 (const :tag "Never use STARTTLS" plain)
                 (const :tag "Use TLS/SSL" tls)
                 (const :tag "Use TLS/SSL (deprecated)" ssl)))

(or do I give up my quest for foolish consistency? :-) )

Robert
-- 



reply via email to

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