unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Yuri Khan <yuri.v.khan@gmail.com>
To: Jean-Christophe Helary <jean.christophe.helary@gmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: format use inquiry
Date: Tue, 20 Jun 2017 22:02:50 +0700	[thread overview]
Message-ID: <CAP_d_8U=naBZr-oMoXosQf4J+SfSThOnJSUotx9d_oauCLnzww@mail.gmail.com> (raw)
In-Reply-To: <BD6A3938-3833-4235-BCC7-9A233429B423@gmail.com>

On Tue, Jun 20, 2017 at 3:48 PM, Jean-Christophe Helary
<jean.christophe.helary@gmail.com> 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.")



  parent reply	other threads:[~2017-06-20 15:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-20  8:48 format use inquiry Jean-Christophe Helary
2017-06-20 11:20 ` Thien-Thi Nguyen
2017-06-20 15:02 ` Yuri Khan [this message]
2017-06-20 19:51   ` Jean-Christophe Helary
2017-06-20 22:53 ` Glenn Morris
2017-06-21  0:20   ` Jean-Christophe Helary
2017-06-21  1:23     ` Paul Eggert
2017-06-21  3:38       ` Jean-Christophe Helary
2017-06-22  1:57   ` Richard Stallman
2017-07-01  1:56     ` Jean-Christophe Helary
2017-07-01  2:32       ` Drew Adams
2017-07-01  4:38         ` Jean-Christophe Helary
2017-07-01 15:43           ` Drew Adams
2017-07-02  1:35             ` Jean-Christophe Helary

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAP_d_8U=naBZr-oMoXosQf4J+SfSThOnJSUotx9d_oauCLnzww@mail.gmail.com' \
    --to=yuri.v.khan@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=jean.christophe.helary@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).