all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* defcustom with deprecated values
@ 2020-10-16 10:30 Robert Pluim
  2020-10-17  6:12 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Pluim @ 2020-10-16 10:30 UTC (permalink / raw)
  To: emacs-devel

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
-- 



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-17  6:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-16 10:30 defcustom with deprecated values Robert Pluim
2020-10-17  6:12 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.