[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: format use inquiry
From: |
Yuri Khan |
Subject: |
Re: format use inquiry |
Date: |
Tue, 20 Jun 2017 22:02:50 +0700 |
On Tue, Jun 20, 2017 at 3:48 PM, Jean-Christophe Helary
<address@hidden> wrote:
> I'd like to know if that kind of code is acceptable or not:
>
> (format "http%s://elpa.gnu.org/packages/"
> (if (gnutls-available-p) "s" ""))
The standard localization argument against concatenating an "s" onto a
word does not apply here. But, one day, someone is going to grep for
occurrences of http:// to see if it’s still used anywhere.
That someone could be you.
Spell it out.
(defvar …-elpa-root
(if (gnutls-available-p)
"https://elpa.gnu.org/packages/"
"http://elpa.gnu.org/packages/")
"…some doc…. http and https schemes are supported;
https is conditional on GnuTLS.")