diff options
author | Brian Callahan <bcallah@cvs.openbsd.org> | 2017-08-06 04:39:46 +0000 |
---|---|---|
committer | Brian Callahan <bcallah@cvs.openbsd.org> | 2017-08-06 04:39:46 +0000 |
commit | 637b919b9a558c8384452fa336c9d911766fb734 (patch) | |
tree | b3266f25e02760a1d76facb2dfb2f1ad08b0f5e0 | |
parent | 2b8debf54ba0051d204a6c8f7dcd09e31c470ac3 (diff) |
Present the default choice before the colon in prompts. Matches GNU Emacs
behavior.
From Scott Cheloha <scottcheloha@gmail.com>
ok florian@
-rw-r--r-- | usr.bin/mg/buffer.c | 10 | ||||
-rw-r--r-- | usr.bin/mg/re_search.c | 4 | ||||
-rw-r--r-- | usr.bin/mg/search.c | 4 | ||||
-rw-r--r-- | usr.bin/mg/tags.c | 8 |
4 files changed, 13 insertions, 13 deletions
diff --git a/usr.bin/mg/buffer.c b/usr.bin/mg/buffer.c index f5aba4c243d..3057882cc1f 100644 --- a/usr.bin/mg/buffer.c +++ b/usr.bin/mg/buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buffer.c,v 1.103 2017/03/13 20:32:58 florian Exp $ */ +/* $OpenBSD: buffer.c,v 1.104 2017/08/06 04:39:45 bcallah Exp $ */ /* This file is in the public domain. */ @@ -86,7 +86,7 @@ usebuffer(int f, int n) if (curbp->b_altb == NULL) bufp = eread("Switch to buffer: ", bufn, NBUFN, EFNEW | EFBUF); else - bufp = eread("Switch to buffer: (default %s) ", bufn, NBUFN, + bufp = eread("Switch to buffer (default %s): ", bufn, NBUFN, EFNUL | EFNEW | EFBUF, curbp->b_altb->b_bname); if (bufp == NULL) @@ -112,7 +112,7 @@ poptobuffer(int f, int n) bufp = eread("Switch to buffer in other window: ", bufn, NBUFN, EFNEW | EFBUF); else - bufp = eread("Switch to buffer in other window: (default %s) ", + bufp = eread("Switch to buffer in other window (default %s): ", bufn, NBUFN, EFNUL | EFNEW | EFBUF, curbp->b_altb->b_bname); if (bufp == NULL) return (ABORT); @@ -146,7 +146,7 @@ killbuffer_cmd(int f, int n) if (f & FFRAND) /* dired mode 'q' */ bp = curbp; - else if ((bufp = eread("Kill buffer: (default %s) ", bufn, NBUFN, + else if ((bufp = eread("Kill buffer (default %s): ", bufn, NBUFN, EFNUL | EFNEW | EFBUF, curbp->b_bname)) == NULL) return (ABORT); else if (bufp[0] == '\0') @@ -746,7 +746,7 @@ bufferinsert(int f, int n) /* Get buffer to use from user */ if (curbp->b_altb != NULL) - bufp = eread("Insert buffer: (default %s) ", bufn, NBUFN, + bufp = eread("Insert buffer (default %s): ", bufn, NBUFN, EFNUL | EFNEW | EFBUF, curbp->b_altb->b_bname); else bufp = eread("Insert buffer: ", bufn, NBUFN, EFNEW | EFBUF); diff --git a/usr.bin/mg/re_search.c b/usr.bin/mg/re_search.c index ea3158ace25..f8b5deef8a3 100644 --- a/usr.bin/mg/re_search.c +++ b/usr.bin/mg/re_search.c @@ -1,4 +1,4 @@ -/* $OpenBSD: re_search.c,v 1.32 2017/05/30 07:05:22 florian Exp $ */ +/* $OpenBSD: re_search.c,v 1.33 2017/08/06 04:39:45 bcallah Exp $ */ /* This file is in the public domain. */ @@ -429,7 +429,7 @@ re_readpattern(char *re_prompt) if (re_pat[0] == '\0') rep = eread("%s: ", tpat, NPAT, EFNEW | EFCR, re_prompt); else - rep = eread("%s: (default %s) ", tpat, NPAT, + rep = eread("%s (default %s): ", tpat, NPAT, EFNUL | EFNEW | EFCR, re_prompt, re_pat); if (rep == NULL) return (ABORT); diff --git a/usr.bin/mg/search.c b/usr.bin/mg/search.c index 2abce1866d5..2339688699e 100644 --- a/usr.bin/mg/search.c +++ b/usr.bin/mg/search.c @@ -1,4 +1,4 @@ -/* $OpenBSD: search.c,v 1.45 2017/05/30 07:05:22 florian Exp $ */ +/* $OpenBSD: search.c,v 1.46 2017/08/06 04:39:45 bcallah Exp $ */ /* This file is in the public domain. */ @@ -838,7 +838,7 @@ readpattern(char *r_prompt) if (pat[0] == '\0') rep = eread("%s: ", tpat, NPAT, EFNEW | EFCR, r_prompt); else - rep = eread("%s: (default %s) ", tpat, NPAT, + rep = eread("%s (default %s): ", tpat, NPAT, EFNUL | EFNEW | EFCR, r_prompt, pat); /* specified */ diff --git a/usr.bin/mg/tags.c b/usr.bin/mg/tags.c index 24cbb50123a..7340ced99ea 100644 --- a/usr.bin/mg/tags.c +++ b/usr.bin/mg/tags.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tags.c,v 1.15 2017/05/30 07:05:22 florian Exp $ */ +/* $OpenBSD: tags.c,v 1.16 2017/08/06 04:39:45 bcallah Exp $ */ /* * This file is in the public domain. @@ -86,7 +86,7 @@ tagsvisit(int f, int n) return (FALSE); } - bufp = eread("visit tags table (default %s): ", fname, + bufp = eread("Visit tags table (default %s): ", fname, NFILEN, EFFILE | EFCR | EFNEW | EFDEF, DEFAULTFN); if (bufp == NULL) return (ABORT); @@ -150,9 +150,9 @@ findtag(int f, int n) if (curtoken(f, n, dtok) == FALSE) { dtok[0] = '\0'; - bufp = eread("Find tag:", utok, MAX_TOKEN, EFNUL | EFNEW); + bufp = eread("Find tag: ", utok, MAX_TOKEN, EFNUL | EFNEW); } else - bufp = eread("Find tag (default %s):", utok, MAX_TOKEN, + bufp = eread("Find tag (default %s): ", utok, MAX_TOKEN, EFNUL | EFNEW, dtok); if (bufp == NULL) |