From unknown Mon Jun 23 04:09:37 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#47286 <47286@debbugs.gnu.org> To: bug#47286 <47286@debbugs.gnu.org> Subject: Status: 28.0.50; [PATCH] Replace "(default %s)" with 'format-prompt' Reply-To: bug#47286 <47286@debbugs.gnu.org> Date: Mon, 23 Jun 2025 11:09:37 +0000 retitle 47286 28.0.50; [PATCH] Replace "(default %s)" with 'format-prompt' reassign 47286 emacs submitter 47286 Gabriel severity 47286 minor tag 47286 fixed patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 20 18:23:15 2021 Received: (at submit) by debbugs.gnu.org; 20 Mar 2021 22:23:15 +0000 Received: from localhost ([127.0.0.1]:53271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNk01-00067x-HJ for submit@debbugs.gnu.org; Sat, 20 Mar 2021 18:23:15 -0400 Received: from lists.gnu.org ([209.51.188.17]:57846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNjzw-00067n-NE for submit@debbugs.gnu.org; Sat, 20 Mar 2021 18:23:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41798) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNjzw-0001tv-8e for bug-gnu-emacs@gnu.org; Sat, 20 Mar 2021 18:23:08 -0400 Received: from mail-dm6nam10olkn2078.outbound.protection.outlook.com ([40.92.41.78]:60768 helo=NAM10-DM6-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNjzr-00013T-OR for bug-gnu-emacs@gnu.org; Sat, 20 Mar 2021 18:23:07 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DEBawB/YHDKwTFCZUvpsnbRbse1KLRT59wYSXRR62/Y41woliSuljnq8zDDvuXDP7HHINOGwaxLz3MqS/9A0W8TNADudw3HuFnk312H96EsXf1eO8cuiVLjrxcdsfT+j9Tu8FnwVxoh3Icmjq0KU3QGWG9EgGYO0DiMdbt/GEJkMlNkP8zZXJwT+0pg3ylk1bSdWNFQ4y3LqGLId4/C+Za6Pq2Q7X9tk6V96mNvgtH87hnquoMvCL5cJLeEeOI/Gks4BbPT7tP0URPbDA3C5ghQAanmGbJKgwuvWWtH2x4E00Z/rxNp3HuQQJMpm4n0NuBv0qsyKLkfOPqc/v8xnfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=x81NYO/QiPtVF2OA+3krwCG8LdTN7Yj+5Woiqv6AaWs=; b=SsE1HIjXuw6fBKZuvKhkrxiPasecXtz+m5ec5/S58lyUcfkWYrwu1WLMGO/aQqSx9YpT4nZDqkTFL9DjeRU2IY9B/kVGhNQKJvOwDCtflcJQVtiGEVTxZ1KlvAxgaD3NXqd0Xc2RrYTTML1/beb+6f/dlhFnkGNdMR3canGoBBfjeFgoeVyHi0Lwx8NBiDlXEEnxzNYed3GfwBo1FfZp0AXnpaYY4DcwXBfy0l/NCx5PfWtyU5nfsxAr3WqUuoGIDCFOkyNN2FAReENlhm4jdirc2zPD0gam2UBtZFI0fTlzyqGP5kUL2zF9WocAiNoOtGu1/NRtLSIkKJXPVZwpgA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=x81NYO/QiPtVF2OA+3krwCG8LdTN7Yj+5Woiqv6AaWs=; b=qlFbX/9+Oa7b9/7DFjn5T6swgXltXXq2apG4fSwZQoLQ5mrLOdKoBz5YqaOQrRKM7WH8DXHD/uf7wSy4LTIL4ZnawmwuvS+Vv4ngF+TvfGR9b7XJyfnfTZdKk0W9aPMOVrS1ORytJCgJLe+D2pj7SpXCPoNE7k9R2K3XRYKDt4a1Zeb9N7MEq+zBf/U79mmVY49VhLobKkZZJM3F2sSy4vWjSDSx6SKFy8v8I95GKCEAzGhyfkwlBDMF4YsXEGpltOLsTcRtTmTzeO+tikX3/OI7VEDlXnpqv/l8bYOjcZckBwumusr6YOfG1rRlFl7YqUQjCVZWPienJPIGnnGGVQ== Received: from DM6NAM10FT051.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e86::42) by DM6NAM10HT141.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e86::279) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18; Sat, 20 Mar 2021 22:23:00 +0000 Received: from MN2PR01MB5886.prod.exchangelabs.com (2a01:111:e400:7e86::50) by DM6NAM10FT051.mail.protection.outlook.com (2a01:111:e400:7e86::88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18 via Frontend Transport; Sat, 20 Mar 2021 22:23:00 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:C1CCDAAE51871E0431AF6E87CF2B74948B5F5A7B41A92364A8C4AF6E4BEC6C28; UpperCasedChecksum:FD0389671F111360AE7D6597EE2E6C670887A4D21D4BD76D9D862D1D70BF6D50; SizeAsReceived:7268; Count:42 Received: from MN2PR01MB5886.prod.exchangelabs.com ([fe80::89d:edb8:e35b:21a0]) by MN2PR01MB5886.prod.exchangelabs.com ([fe80::89d:edb8:e35b:21a0%5]) with mapi id 15.20.3955.024; Sat, 20 Mar 2021 22:22:59 +0000 From: Gabriel To: bug-gnu-emacs@gnu.org Subject: 28.0.50; [PATCH] Replace "(default %s)" with 'format-prompt' Date: Sat, 20 Mar 2021 19:22:52 -0300 Message-ID: Content-Type: multipart/mixed; boundary="=-=-=" X-TMN: [Oj8tystdRLusRHIWuktjSDgDyT9xDqnas43iyNhhuuqLLUNJU3zHyJIf8vQIynhv] X-ClientProxiedBy: CP2PR80CA0177.lamprd80.prod.outlook.com (2603:10d6:102:15::19) To MN2PR01MB5886.prod.exchangelabs.com (2603:10b6:208:188::23) X-Microsoft-Original-Message-ID: <87zgyxcvnn.fsf@hotmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from precision5540 (2804:431:c7f3:ee67:f1fd:1434:d853:5bc8) by CP2PR80CA0177.lamprd80.prod.outlook.com (2603:10d6:102:15::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18 via Frontend Transport; Sat, 20 Mar 2021 22:22:57 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 42 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 13d4c91e-124d-4ff7-3062-08d8ebeeb6f4 X-MS-TrafficTypeDiagnostic: DM6NAM10HT141: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aSn8/XtF2df8KuAfei+3D8jLY8MO1IGU9YaiqYuu0BSN1HxTP43edvIsIkh9F5+Czz5natxTe9grlvckUfkvYDeaUt9T+Qikg3QoDNtSsMun8M2pVoPAS5e0zjDUe1J/KFaTAgbEa3Huxwrxl6VCWmkUARD0BXVmj1MiGjsxNZbblRVNDSfWdkDQplrmEwC1vthIxnATWCla/SRxRkj754EI4ChZ4KTFLZBNO+4FI7cpjwIlwl56zfEQpWQaXe7riFDmgz4m162cwclaJnGUCWQd/Kv7eynEXKEMRR/zY3n3oFrbQN0tZgU930FYG/V8xddwNTY2q6T1DlxRm0kdnrDovACflTwa+r7dwoyFePcphOBc0ehaslXVRlsh/Nt+K8BVSYkuXnQQhqpokEZN3G9IhGT4anitj7FpSwfGKPy2nomsCX3Ctz3ZM2eGd3Wq X-MS-Exchange-AntiSpam-MessageData: hkD3i1Km77Ww5rfdOh4od4BKTCQWZvjrmj5lz76iINj6ey+C0Ury/BuvZIiM28uMZqki4CEXM/HzHDAHYX9ftgoZApLX05VQuHMatsCZKWr1PnM1r8y3rqPoSq+NFTxogwB3JTDS3gLy6LFe1y6O6Rv9TYtkWb4W4oiwaUYktOL7XcyGPhVPEtpEt2vRhzS4Sv2QqruTBIqtgY3RDT6q1w== X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-Network-Message-Id: 13d4c91e-124d-4ff7-3062-08d8ebeeb6f4 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2021 22:22:59.5664 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DM6NAM10FT051.eop-nam10.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6NAM10HT141 Received-SPF: pass client-ip=40.92.41.78; envelope-from=gabriel376@hotmail.com; helo=NAM10-DM6-obe.outbound.protection.outlook.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) --=-=-= Content-Type: text/plain This patches replaces several occurences of the hardcoded minibuffer default prompt "(default %s)" with a call to 'format-prompt'. It also removes the suffix ": ", when applicable, that is automatically handled by 'format-prompt'. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Replace-minibuffer-default-prompt-default-s-with-for.patch >From 64b7aa2700c7281589a52317a898e7d401e52465 Mon Sep 17 00:00:00 2001 From: Gabriel do Nascimento Ribeiro Date: Fri, 19 Mar 2021 19:28:05 -0300 Subject: [PATCH] Replace minibuffer default prompt "(default %s)" with 'format-prompt' * lisp/cmuscheme.el (scheme-load-file, scheme-compile-file): Remove prompt suffix ": ". * lisp/comint.el (comint-get-source): Use 'format-prompt'. * lisp/emulation/viper-cmd.el (viper-quote-region, viper-kill-buffer) (viper-query-replace): Remove prompt suffix ": ". (viper-read-string-with-history): Use 'format-prompt'. * lisp/eshell/esh-mode.el (eshell-find-tag): Remove prompt suffix ": ". * lisp/gnus/gnus-sum.el (gnus-articles-to-read) (gnus-summary-search-article-forward) (gnus-summary-search-article-backward): Use 'format-prompt'. * lisp/international/mule-cmds.el (set-input-method, toggle-input-method) (describe-input-method, set-language-environment) (describe-language-environment): Use 'format-prompt'. * lisp/mh-e/mh-gnus.el (mh-mml-minibuffer-read-disposition): Use 'format-prompt'. * lisp/mh-e/mh-letter.el (mh-insert-letter): Use 'format-prompt'. * lisp/mh-e/mh-mime.el (mh-display-with-external-viewer) (mh-mime-save-parts, mh-mh-forward-message) (mh-mml-query-cryptographic-method, mh-minibuffer-read-type): Use 'format-prompt'. * lisp/mh-e/mh-seq.el (mh-read-seq, mh-read-range): Use 'format-prompt'. * lisp/mh-e/mh-utils.el (mh-prompt-for-folder): Use 'format-prompt'. * lisp/progmodes/cc-styles.el (c-read-offset): Use 'format-prompt'. * lisp/progmodes/etags.el (find-tag-tag): Use 'format-prompt'. (find-tag-noselect, find-tag, find-tag-other-window) (find-tag-other-frame, find-tag-regexp): Remove prompt suffix ": ". * lisp/progmodes/idlwave.el (idlwave-find-module): Use 'format-prompt'. * lisp/progmodes/inf-lisp.el (lisp-load-file, lisp-compile-file): Remove prompt suffix ": ". * lisp/progmodes/project.el (project--completing-read-strict) (project--completing-read-strict): Use 'format-prompt'. * lisp/progmodes/tcl.el (tcl-load-file, tcl-restart-with-file): Remove prompt suffix ": ". * lisp/progmodes/verilog-mode.el (verilog-surelint-off) (verilog-goto-defun): Use 'format-prompt'. * lisp/progmodes/xref.el (xref--read-identifier): Use 'format-prompt'. (xref-find-definitions, xref-find-definitions-other-window) (xref-find-definitions-other-frame, xref-find-references): Remove prompt suffix ": ". * lisp/ses.el (ses-read-printer): Use 'format-prompt'. (ses-read-cell-printer, ses-read-column-printer) (ses-read-default-printer, ses-define-local-printer): Remove prompt suffix ": ". * lisp/subr.el (read-number): Use 'minibuffer-default-prompt-format'. * lisp/term.el (term-get-source): Use 'format-prompt'. * src/minibuf.c (read-buffer): Use 'format-prompt'. --- lisp/cmuscheme.el | 4 ++-- lisp/comint.el | 6 ++---- lisp/emulation/viper-cmd.el | 31 ++++++++++++------------------- lisp/eshell/esh-mode.el | 2 +- lisp/gnus/gnus-sum.el | 31 ++++++++++++++----------------- lisp/international/mule-cmds.el | 10 +++++----- lisp/mh-e/mh-gnus.el | 2 +- lisp/mh-e/mh-letter.el | 5 +---- lisp/mh-e/mh-mime.el | 20 +++++++------------- lisp/mh-e/mh-seq.el | 16 +++++----------- lisp/mh-e/mh-utils.el | 7 +++---- lisp/progmodes/cc-styles.el | 2 +- lisp/progmodes/etags.el | 16 ++++++---------- lisp/progmodes/idlwave.el | 2 +- lisp/progmodes/inf-lisp.el | 4 ++-- lisp/progmodes/project.el | 6 ++---- lisp/progmodes/tcl.el | 4 ++-- lisp/progmodes/verilog-mode.el | 9 +++++---- lisp/progmodes/xref.el | 15 +++++---------- lisp/ses.el | 12 +++++------- lisp/subr.el | 4 ++-- lisp/term.el | 6 ++---- src/minibuf.c | 4 ++-- 23 files changed, 88 insertions(+), 130 deletions(-) diff --git a/lisp/cmuscheme.el b/lisp/cmuscheme.el index 772891d5d3..d43cdb15c0 100644 --- a/lisp/cmuscheme.el +++ b/lisp/cmuscheme.el @@ -421,7 +421,7 @@ scheme-prev-l/c-dir/file (defun scheme-load-file (file-name) "Load a Scheme file FILE-NAME into the inferior Scheme process." - (interactive (comint-get-source "Load Scheme file: " scheme-prev-l/c-dir/file + (interactive (comint-get-source "Load Scheme file" scheme-prev-l/c-dir/file scheme-source-modes t)) ; t because `load' ; needs an exact name (comint-check-source file-name) ; Check to see if buffer needs saved. @@ -433,7 +433,7 @@ scheme-load-file (defun scheme-compile-file (file-name) "Compile a Scheme file FILE-NAME in the inferior Scheme process." - (interactive (comint-get-source "Compile Scheme file: " + (interactive (comint-get-source "Compile Scheme file" scheme-prev-l/c-dir/file scheme-source-modes nil)) ; nil because COMPILE doesn't diff --git a/lisp/comint.el b/lisp/comint.el index 65072b0137..b04d404676 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -2946,7 +2946,7 @@ comint-get-source then the filename reader will only accept a file that exists. A typical use: - (interactive (comint-get-source \"Compile file: \" prev-lisp-dir/file + (interactive (comint-get-source \"Compile file\" prev-lisp-dir/file \\='(lisp-mode) t))" (let* ((def (comint-source-default prev-dir/file source-modes)) (stringfile (comint-extract-string)) @@ -2959,9 +2959,7 @@ comint-get-source (car def))) (deffile (if sfile-p (file-name-nondirectory stringfile) (cdr def))) - (ans (read-file-name (if deffile (format "%s(default %s) " - prompt deffile) - prompt) + (ans (read-file-name (format-prompt prompt deffile) defdir (concat defdir deffile) mustmatch-p))) diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index 42d6c1eb19..728f790a96 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el @@ -1786,7 +1786,7 @@ viper-quote-region (do-not-change-default t)) (setq quote-str (viper-read-string-with-history - "Quote string: " + "Quote string" nil 'viper-quote-region-history ;; FIXME: Use comment-region. @@ -1995,24 +1995,17 @@ viper-read-string-with-history #'viper-minibuffer-standard-hook (if (or (not (listp old)) (eq (car old) 'lambda)) (list old) old)))) - (val "") - (padding "") - temp-msg) + (val "")) (setq keymap (or keymap minibuffer-local-map) initial (or initial "") - viper-initial initial - temp-msg (if default - (format "(default %s) " default) - "")) + viper-initial initial) (setq viper-incomplete-ex-cmd nil) - (setq val (read-from-minibuffer prompt - (concat temp-msg initial val padding) - keymap nil history-var)) - (setq minibuffer-setup-hook nil - padding (viper-array-to-string (this-command-keys)) - temp-msg "") + (setq val (read-from-minibuffer (format-prompt prompt default) + nil + keymap nil history-var default)) + (setq minibuffer-setup-hook nil) ;; the following tries to be smart about what to put in history (if (not (string= val (car (symbol-value history-var)))) (push val (symbol-value history-var))) @@ -3825,7 +3818,7 @@ viper-kill-buffer (let (buffer buffer-name) (setq buffer-name (funcall viper-read-buffer-function - (format "Kill buffer (%s): " + (format-prompt "Kill buffer" (buffer-name (current-buffer))))) (setq buffer (if (null buffer-name) @@ -4171,8 +4164,8 @@ viper-query-replace (interactive) (let (str) (setq str (viper-read-string-with-history - (if viper-re-query-replace "Query replace regexp: " - "Query replace: ") + (if viper-re-query-replace "Query replace regexp" + "Query replace") nil ; no initial 'viper-replace1-history (car viper-replace1-history) ; default @@ -4187,7 +4180,7 @@ viper-query-replace (query-replace-regexp str (viper-read-string-with-history - (format-message "Query replace regexp `%s' with: " str) + (format-message "Query replace regexp `%s' with" str) nil ; no initial 'viper-replace1-history (car viper-replace1-history) ; default @@ -4195,7 +4188,7 @@ viper-query-replace (query-replace str (viper-read-string-with-history - (format-message "Query replace `%s' with: " str) + (format-message "Query replace `%s' with" str) nil ; no initial 'viper-replace1-history (car viper-replace1-history) ; default diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index d29b010ea0..f9dbce9770 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el @@ -458,7 +458,7 @@ eshell-find-tag (let ((inhibit-read-only t) (no-default (eobp)) (find-tag-default-function 'ignore)) - (setq tagname (car (find-tag-interactive "Find tag: " no-default))) + (setq tagname (car (find-tag-interactive "Find tag" no-default))) (with-suppressed-warnings ((obsolete find-tag)) (find-tag tagname next-p regexp-p)))) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 97da550353..c30f9a5f35 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -5977,14 +5977,15 @@ gnus-articles-to-read (input (read-string (if only-read-p - (format - "How many articles from %s (available %d, default %d): " - (gnus-group-real-name gnus-newsgroup-name) - number default) - (format - "How many articles from %s (%d default): " - (gnus-group-real-name gnus-newsgroup-name) - default)) + (format-prompt + "How many articles from %s (available %d)" + default + (gnus-group-real-name gnus-newsgroup-name) + number) + (format-prompt + "How many articles from %s" + default + (gnus-group-real-name gnus-newsgroup-name))) nil nil (number-to-string default)))) @@ -9514,11 +9515,9 @@ gnus-summary-search-article-forward (interactive (list (read-string - (format "Search article %s (regexp%s): " - (if current-prefix-arg "backward" "forward") - (if gnus-last-search-regexp - (concat ", default " gnus-last-search-regexp) - ""))) + (format-prompt "Search article %s (regexp)" + gnus-last-search-regexp + (if current-prefix-arg "backward" "forward"))) current-prefix-arg) gnus-summary-mode) (if (string-equal regexp "") @@ -9537,10 +9536,8 @@ gnus-summary-search-article-backward (interactive (list (read-string - (format "Search article backward (regexp%s): " - (if gnus-last-search-regexp - (concat ", default " gnus-last-search-regexp) - "")))) + (format-prompt "Search article backward (regexp)" + gnus-last-search-regexp))) gnus-summary-mode) (gnus-summary-search-article-forward regexp 'backward)) diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index e4bdf50f52..743b638d06 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -1524,7 +1524,7 @@ set-input-method (interactive (let* ((default (or (car input-method-history) default-input-method))) (list (read-input-method-name - (if default "Select input method (default %s): " "Select input method: ") + (format-prompt "Select input method" default) default t) t))) (activate-input-method input-method) @@ -1569,7 +1569,7 @@ toggle-input-method (if (or arg (not default)) (progn (read-input-method-name - (if default "Input method (default %s): " "Input method: " ) + (format-prompt "Input method" default) default t)) default)) (unless default-input-method @@ -1620,7 +1620,7 @@ describe-input-method "Describe input method INPUT-METHOD." (interactive (list (read-input-method-name - "Describe input method (default current choice): "))) + (format-prompt "Describe input method" current-input-method)))) (if (and input-method (symbolp input-method)) (setq input-method (symbol-name input-method))) (help-setup-xref (list #'describe-input-method @@ -1929,7 +1929,7 @@ set-language-environment the new language environment, it runs `set-language-environment-hook'." (interactive (list (read-language-name nil - "Set language environment (default English): "))) + (format-prompt "Set language environment" "English")))) (if language-name (if (symbolp language-name) (setq language-name (symbol-name language-name))) @@ -2144,7 +2144,7 @@ describe-language-environment (interactive (list (read-language-name 'documentation - "Describe language environment (default current choice): "))) + (format-prompt "Describe language environment" current-language-environment)))) (if (null language-name) (setq language-name current-language-environment)) (if (or (null language-name) diff --git a/lisp/mh-e/mh-gnus.el b/lisp/mh-e/mh-gnus.el index 6a9851662a..7898d7eece 100644 --- a/lisp/mh-e/mh-gnus.el +++ b/lisp/mh-e/mh-gnus.el @@ -129,7 +129,7 @@ mh-mml-minibuffer-read-disposition (unless default (setq default (mml-content-disposition type filename))) (let ((disposition (completing-read - (format "Disposition (default %s): " default) + (format-prompt "Disposition" default) '(("attachment") ("inline") ("")) nil t nil nil default))) (if (not (equal disposition "")) diff --git a/lisp/mh-e/mh-letter.el b/lisp/mh-e/mh-letter.el index f5ad73d800..107a0ae5e4 100644 --- a/lisp/mh-e/mh-letter.el +++ b/lisp/mh-e/mh-letter.el @@ -390,10 +390,7 @@ mh-insert-letter (or mh-sent-from-msg (nth 0 (mh-translate-range folder "cur"))) (nth 0 (mh-translate-range folder "cur")))) (message - (read-string (concat "Message number" - (or (and default - (format " (default %d): " default)) - ": ")) + (read-string (format-prompt "Message number" default) nil nil (if (numberp default) (int-to-string default) diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el index 70df9e6b0f..df3c711e3d 100644 --- a/lisp/mh-e/mh-mime.el +++ b/lisp/mh-e/mh-mime.el @@ -259,9 +259,7 @@ mh-display-with-external-viewer (methods (mapcar (lambda (x) (list (cdr (assoc 'viewer x)))) (mailcap-mime-info type 'all))) (def (caar methods)) - (prompt (format "Viewer%s: " (if def - (format " (default %s)" def) - ""))) + (prompt (format-prompt "Viewer" def)) (method (completing-read prompt methods nil nil nil nil def)) (folder mh-show-folder-buffer) (buffer-read-only nil)) @@ -395,9 +393,9 @@ mh-mime-save-parts ((and (or prompt (equal t mh-mime-save-parts-default-directory)) mh-mime-save-parts-directory) - (read-directory-name (format - "Store in directory (default %s): " - mh-mime-save-parts-directory) + (read-directory-name (format-prompt + "Store in directory" + mh-mime-save-parts-directory) "" mh-mime-save-parts-directory t "")) ((stringp mh-mime-save-parts-default-directory) mh-mime-save-parts-default-directory) @@ -1258,11 +1256,7 @@ mh-mh-forward-message (interactive (list (mml-minibuffer-read-description) (mh-prompt-for-folder "Message from" mh-sent-from-folder nil) - (read-string (concat "Messages" - (if (numberp mh-sent-from-msg) - (format " (default %d): " - mh-sent-from-msg) - ": "))))) + (read-string (format-prompt "Messages" mh-sent-from-msg)))) (beginning-of-line) (insert "#forw [") (and description @@ -1596,7 +1590,7 @@ mh-mml-query-cryptographic-method (if current-prefix-arg (let ((def (or (car mh-mml-cryptographic-method-history) mh-mml-method-default))) - (completing-read (format "Method (default %s): " def) + (completing-read (format-prompt "Method" def) '(("pgp") ("pgpmime") ("smime")) nil t nil 'mh-mml-cryptographic-method-history def)) mh-mml-method-default)) @@ -1731,7 +1725,7 @@ mh-minibuffer-read-type (type (or (and (not (equal probed-type "application/octet-stream")) probed-type) (completing-read - (format "Content type (default %s): " default) + (format-prompt "Content type" default) (mapcar #'list (mailcap-mime-types)))))) (if (not (equal type "")) type diff --git a/lisp/mh-e/mh-seq.el b/lisp/mh-e/mh-seq.el index e8a03f6704..4a464a3f55 100644 --- a/lisp/mh-e/mh-seq.el +++ b/lisp/mh-e/mh-seq.el @@ -390,10 +390,7 @@ mh-read-seq the NOT-EMPTY flag is non-nil, and supply an optional DEFAULT sequence. A reply of `%' defaults to the first sequence containing the current message." - (let* ((input (completing-read (format "%s sequence%s: " prompt - (if default - (format " (default %s)" default) - "")) + (let* ((input (completing-read (format-prompt "%s sequence" default prompt) (mh-seq-names mh-seq-list) nil nil nil 'mh-sequence-history)) (seq (cond ((equal input "%") @@ -646,13 +643,10 @@ mh-read-range ((stringp default) default) ((symbolp default) (symbol-name default)))) (prompt (cond ((and guess large default) - (format "%s (folder has %s messages, default %s)" - prompt (car counts) default)) - ((and guess large) - (format "%s (folder has %s messages)" - prompt (car counts))) + (format-prompt "%s (folder has %s messages)" + default prompt (car counts))) (default - (format "%s (default %s)" prompt default)))) + (format-prompt prompt default)))) (minibuffer-local-completion-map mh-range-completion-map) (seq-list (if (eq folder mh-current-folder) mh-seq-list @@ -662,7 +656,7 @@ mh-read-range (mh-seq-names seq-list))) (input (cond ((and (not ask-flag) unseen) (symbol-name mh-unseen-seq)) ((and (not ask-flag) (not large)) "all") - (t (completing-read (format "%s: " prompt) + (t (completing-read prompt 'mh-range-completion-function nil nil nil 'mh-range-history default)))) msg-list) diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el index d7c607df5c..8cb68f5cf1 100644 --- a/lisp/mh-e/mh-utils.el +++ b/lisp/mh-e/mh-utils.el @@ -758,10 +758,9 @@ mh-prompt-for-folder used in searching." (if (null default) (setq default "")) - (let* ((default-string (cond (default-string (format " (default %s)" default-string)) - ((equal "" default) "") - (t (format " (default %s)" default)))) - (prompt (format "%s folder%s: " prompt default-string)) + (let* ((default-string (or default-string + (if (equal default "") nil default))) + (prompt (format-prompt "%s folder" default-string prompt)) (mh-current-folder-name mh-current-folder) read-name folder-name) (while (and (setq read-name (mh-folder-completing-read diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el index aec259f1b3..7d02e1d702 100644 --- a/lisp/progmodes/cc-styles.el +++ b/lisp/progmodes/cc-styles.el @@ -442,7 +442,7 @@ c-read-offset (errmsg (concat "Offset must be int, func, var, vector, list, " "or [+,-,++,--,*,/] " defstr)) - (prompt (concat symname " offset " defstr)) + (prompt (format-prompt "%s offset" oldoff symname)) (keymap (make-sparse-keymap)) (minibuffer-completion-table obarray) (minibuffer-completion-predicate 'fboundp) diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 023c90cca5..13717b1b89 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -836,11 +836,7 @@ find-tag-tag "Read a tag name, with defaulting and completion." (let* ((completion-ignore-case (find-tag--completion-ignore-case)) (default (find-tag--default)) - (spec (completing-read (if default - (format "%s (default %s): " - (substring string 0 (string-match "[ :]+\\'" string)) - default) - string) + (spec (completing-read (format-prompt string default) (tags-lazy-completion-table) nil nil nil nil default))) (if (equal spec "") @@ -899,7 +895,7 @@ find-tag-noselect Contrast this with the ring of marks gone to by the command. See documentation of variable `tags-file-name'." - (interactive (find-tag-interactive "Find tag: ")) + (interactive (find-tag-interactive "Find tag")) (setq find-tag-history (cons tagname find-tag-history)) ;; Save the current buffer's value of `find-tag-hook' before @@ -971,7 +967,7 @@ find-tag See documentation of variable `tags-file-name'." (declare (obsolete xref-find-definitions "25.1")) - (interactive (find-tag-interactive "Find tag: ")) + (interactive (find-tag-interactive "Find tag")) (let* ((buf (find-tag-noselect tagname next-p regexp-p)) (pos (with-current-buffer buf (point)))) (condition-case nil @@ -1000,7 +996,7 @@ find-tag-other-window See documentation of variable `tags-file-name'." (declare (obsolete xref-find-definitions-other-window "25.1")) - (interactive (find-tag-interactive "Find tag other window: ")) + (interactive (find-tag-interactive "Find tag other window")) ;; This hair is to deal with the case where the tag is found in the ;; selected window's buffer; without the hair, point is moved in both @@ -1041,7 +1037,7 @@ find-tag-other-frame See documentation of variable `tags-file-name'." (declare (obsolete xref-find-definitions-other-frame "25.1")) - (interactive (find-tag-interactive "Find tag other frame: ")) + (interactive (find-tag-interactive "Find tag other frame")) (let ((pop-up-frames t)) (with-suppressed-warnings ((obsolete find-tag-other-window)) (find-tag-other-window tagname next-p)))) @@ -1065,7 +1061,7 @@ find-tag-regexp See documentation of variable `tags-file-name'." (declare (obsolete xref-find-apropos "25.1")) - (interactive (find-tag-interactive "Find tag regexp: " t)) + (interactive (find-tag-interactive "Find tag regexp" t)) ;; We go through find-tag-other-window to do all the display hair there. (funcall (if other-window 'find-tag-other-window 'find-tag) regexp next-p t)) diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index e8e55ae96d..b72d9da748 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -7820,7 +7820,7 @@ idlwave-find-module (name (idlwave-completing-read (if (or (not this-buffer) (assoc default list)) - (format "Module (Default %s): " default) + (format-prompt "Module" default) (format "Module in this file: ")) list)) type class) diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index 146ed4dca4..af6ccce3d6 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el @@ -487,7 +487,7 @@ lisp-source-modes (defun lisp-load-file (file-name) "Load a Lisp file into the inferior Lisp process." - (interactive (comint-get-source "Load Lisp file: " lisp-prev-l/c-dir/file + (interactive (comint-get-source "Load Lisp file" lisp-prev-l/c-dir/file lisp-source-modes nil)) ; nil because LOAD ; doesn't need an exact name (comint-check-source file-name) ; Check to see if buffer needs saved. @@ -500,7 +500,7 @@ lisp-load-file (defun lisp-compile-file (file-name) "Compile a Lisp file in the inferior Lisp process." - (interactive (comint-get-source "Compile Lisp file: " lisp-prev-l/c-dir/file + (interactive (comint-get-source "Compile Lisp file" lisp-prev-l/c-dir/file lisp-source-modes nil)) ; nil = don't need ; suffix .lisp (comint-check-source file-name) ; Check to see if buffer needs saved. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index bd552c917a..98a56bb6a4 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -869,9 +869,7 @@ project--completing-read-strict ;; removing it when it has no matches. Neither seems natural ;; enough. Removal is confusing; early expansion makes the prompt ;; too long. - (let* ((new-prompt (if (and default (not (string-equal default ""))) - (format "%s (default %s): " prompt default) - (format "%s: " prompt))) + (let* ((new-prompt (format-prompt prompt default)) (res (completing-read new-prompt collection predicate t nil ;; initial-input @@ -879,7 +877,7 @@ project--completing-read-strict (when (and (equal res default) (not (test-completion res collection predicate))) (setq res - (completing-read (format "%s: " prompt) + (completing-read (format-prompt prompt nil) collection predicate t res hist nil))) res)) diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el index 82e1343e05..f6a50bf1a8 100644 --- a/lisp/progmodes/tcl.el +++ b/lisp/progmodes/tcl.el @@ -1413,7 +1413,7 @@ tcl-load-file (list ;; car because comint-get-source returns a list holding the ;; filename. - (car (comint-get-source "Load Tcl file: " + (car (comint-get-source "Load Tcl file" (or (and (derived-mode-p 'tcl-mode) (buffer-file-name)) @@ -1433,7 +1433,7 @@ tcl-restart-with-file Prefix argument means switch to the Tcl buffer afterwards." (interactive (list - (car (comint-get-source "Restart with Tcl file: " + (car (comint-get-source "Restart with Tcl file" (or (and (derived-mode-p 'tcl-mode) (buffer-file-name)) diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index 55c04e1332..14a9dff869 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -5466,8 +5466,9 @@ verilog-surelint-off (let* ((pop-up-windows t)) (let ((name (expand-file-name (read-file-name - (format "Find this error in: (default %s) " - file) + (format-prompt + "Find this error in" + file) dir file t)))) (if (file-directory-p name) (setq name (expand-file-name filename name))) @@ -7863,8 +7864,8 @@ verilog-goto-defun (verilog-buffer-to-use (current-buffer)) (label (if (not (string= default "")) ;; Do completion with default - (completing-read (concat "Goto-Label: (default " - default ") ") + (completing-read (format-prompt "Goto-Label" + default) 'verilog-comp-defun nil nil "") ;; There is no default value. Complete without it (completing-read "Goto-Label: " diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index ea52befec5..3cb4247b4b 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -1192,12 +1192,7 @@ xref--read-identifier (xref--prompt-p this-command)) (let ((id (completing-read - (if def - (format "%s (default %s): " - (substring prompt 0 (string-match - "[ :]+\\'" prompt)) - def) - prompt) + (format-prompt prompt def) (xref-backend-identifier-completion-table backend) nil nil nil 'xref--read-identifier-history def))) @@ -1257,19 +1252,19 @@ xref-find-definitions definition for IDENTIFIER, display it in the selected window. Otherwise, display the list of the possible definitions in a buffer where the user can select from the list." - (interactive (list (xref--read-identifier "Find definitions of: "))) + (interactive (list (xref--read-identifier "Find definitions of"))) (xref--find-definitions identifier nil)) ;;;###autoload (defun xref-find-definitions-other-window (identifier) "Like `xref-find-definitions' but switch to the other window." - (interactive (list (xref--read-identifier "Find definitions of: "))) + (interactive (list (xref--read-identifier "Find definitions of"))) (xref--find-definitions identifier 'window)) ;;;###autoload (defun xref-find-definitions-other-frame (identifier) "Like `xref-find-definitions' but switch to the other frame." - (interactive (list (xref--read-identifier "Find definitions of: "))) + (interactive (list (xref--read-identifier "Find definitions of"))) (xref--find-definitions identifier 'frame)) ;;;###autoload @@ -1280,7 +1275,7 @@ xref-find-references With prefix argument, or if `xref-prompt-for-identifier' is t, always prompt for the identifier. If `xref-prompt-for-identifier' is nil, prompt only if there's no usable symbol at point." - (interactive (list (xref--read-identifier "Find references of: "))) + (interactive (list (xref--read-identifier "Find references of"))) (xref--find-xrefs identifier 'references identifier nil)) ;;;###autoload diff --git a/lisp/ses.el b/lisp/ses.el index a11c754abc..6058d48ed1 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -2653,9 +2653,7 @@ ses-read-printer (barf-if-buffer-read-only) (if (eq default t) (setq default "") - (setq prompt (format "%s (default %S): " - (substring prompt 0 -2) - default))) + (setq prompt (format-prompt prompt default))) (dolist (key ses-completion-keys) (define-key ses-mode-edit-map key 'ses-read-printer-complete-symbol)) ;; make it globally visible, so that it can be visible from the minibuffer. @@ -2702,7 +2700,7 @@ ses-read-cell-printer ;;Range contains differing printer functions (setq default t) (throw 'ses-read-cell-printer t)))))) - (list (ses-read-printer (format "Cell %S printer: " ses--curcell) + (list (ses-read-printer (format "Cell %S printer" ses--curcell) default)))) (unless (eq newval t) (ses-begin-change) @@ -2716,7 +2714,7 @@ ses-read-column-printer (interactive (let ((col (cdr (ses-sym-rowcol ses--curcell)))) (ses-check-curcell) - (list col (ses-read-printer (format "Column %s printer: " + (list col (ses-read-printer (format "Column %s printer" (ses-column-letter col)) (ses-col-printer col))))) @@ -2731,7 +2729,7 @@ ses-read-default-printer "Set the default printer function for cells that have no other. See `ses-read-cell-printer' for input forms." (interactive - (list (ses-read-printer "Default printer: " ses--default-printer))) + (list (ses-read-printer "Default printer" ses--default-printer))) (unless (eq newval t) (ses-begin-change) (ses-set-parameter 'ses--default-printer newval) @@ -3773,7 +3771,7 @@ ses-define-local-printer (setq name (intern name)) (let* ((cur-printer (gethash name ses--local-printer-hashmap)) (default (and cur-printer (ses--locprn-def cur-printer)))) - (setq def (ses-read-printer (format "Enter definition of printer %S: " name) + (setq def (ses-read-printer (format "Enter definition of printer %S" name) default))) (list name def))) diff --git a/lisp/subr.el b/lisp/subr.el index ef0e5e6f78..a2c1280fc1 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2806,9 +2806,9 @@ read-number (when default1 (setq prompt (if (string-match "\\(\\):[ \t]*\\'" prompt) - (replace-match (format " (default %s)" default1) t t prompt 1) + (replace-match (format minibuffer-default-prompt-format default1) t t prompt 1) (replace-regexp-in-string "[ \t]*\\'" - (format " (default %s) " default1) + (format minibuffer-default-prompt-format default1) prompt t t)))) (while (progn diff --git a/lisp/term.el b/lisp/term.el index 6beb17fb66..d41895ad3d 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -2535,7 +2535,7 @@ term-check-source ;; then the filename reader will only accept a file that exists. ;; ;; A typical use: -;; (interactive (term-get-source "Compile file: " prev-lisp-dir/file +;; (interactive (term-get-source "Compile file" prev-lisp-dir/file ;; '(lisp-mode) t)) ;; This is pretty stupid about strings. It decides we're in a string @@ -2566,9 +2566,7 @@ term-get-source (car def))) (deffile (if sfile-p (file-name-nondirectory stringfile) (cdr def))) - (ans (read-file-name (if deffile (format "%s(default %s) " - prompt deffile) - prompt) + (ans (read-file-name (format-prompt prompt deffile) defdir (concat defdir deffile) mustmatch-p))) diff --git a/src/minibuf.c b/src/minibuf.c index 4b1f4b1ff7..1c5ce52404 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1417,8 +1417,8 @@ DEFUN ("read-buffer", Fread_buffer, Sread_buffer, 1, 4, 0, STRING_MULTIBYTE (prompt)); } - AUTO_STRING (format, "%s (default %s): "); - prompt = CALLN (Fformat, format, prompt, + prompt = CALLN (Ffuncall, intern("format-prompt"), + prompt, CONSP (def) ? XCAR (def) : def); } -- 2.27.0 --=-=-= Content-Type: text/plain Thread on emacs-devel: https://lists.gnu.org/archive/html/emacs-devel/2021-03/msg00817.html Let me know if something is missing, wrong or can be improved in this patch. Regards, Gabriel --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 21 02:07:52 2021 Received: (at 47286) by debbugs.gnu.org; 21 Mar 2021 06:07:52 +0000 Received: from localhost ([127.0.0.1]:53445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNrFf-0002lz-Ux for submit@debbugs.gnu.org; Sun, 21 Mar 2021 02:07:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57072) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNrFe-0002ll-3l for 47286@debbugs.gnu.org; Sun, 21 Mar 2021 02:07:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35919) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNrFY-0006bO-H6; Sun, 21 Mar 2021 02:07:44 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3378 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lNrFX-0007Up-Hq; Sun, 21 Mar 2021 02:07:44 -0400 Date: Sun, 21 Mar 2021 08:07:44 +0200 Message-Id: <83y2ehavkf.fsf@gnu.org> From: Eli Zaretskii To: Gabriel In-Reply-To: (message from Gabriel on Sat, 20 Mar 2021 19:22:52 -0300) Subject: Re: bug#47286: 28.0.50; [PATCH] Replace "(default %s)" with 'format-prompt' References: X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 47286 Cc: 47286@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: Gabriel > Date: Sat, 20 Mar 2021 19:22:52 -0300 > > This patches replaces several occurences of the hardcoded minibuffer > default prompt "(default %s)" with a call to 'format-prompt'. It also > removes the suffix ": ", when applicable, that is automatically handled > by 'format-prompt'. Thanks. A minor nit about formatting the commit log messages in such cases, where the same change is made in many places. > * lisp/cmuscheme.el (scheme-load-file, scheme-compile-file): Remove > prompt suffix ": ". > > * lisp/comint.el (comint-get-source): Use 'format-prompt'. > > * lisp/emulation/viper-cmd.el (viper-quote-region, viper-kill-buffer) > (viper-query-replace): Remove prompt suffix ": ". > (viper-read-string-with-history): Use 'format-prompt'. > > * lisp/eshell/esh-mode.el (eshell-find-tag): Remove prompt suffix ": ". > > * lisp/gnus/gnus-sum.el (gnus-articles-to-read) > (gnus-summary-search-article-forward) > (gnus-summary-search-article-backward): Use 'format-prompt'. Instead of having a long series of basically identical text, it is better to format this as follows: * lisp/cmuscheme.el (scheme-load-file, scheme-compile-file): * lisp/comint.el (comint-get-source): * lisp/emulation/viper-cmd.el (viper-quote-region, viper-kill-buffer) (viper-query-replace, viper-read-string-with-history): * lisp/eshell/esh-mode.el (eshell-find-tag): * lisp/gnus/gnus-sum.el (gnus-articles-to-read) (gnus-summary-search-article-forward) (gnus-summary-search-article-backward): * lisp/international/mule-cmds.el (set-input-method, toggle-input-method) (describe-input-method, set-language-environment) (describe-language-environment): * lisp/mh-e/mh-gnus.el (mh-mml-minibuffer-read-disposition) (mh-insert-letter) * lisp/mh-e/mh-mime.el (mh-display-with-external-viewer) (mh-mime-save-parts, mh-mh-forward-message) (mh-mml-query-cryptographic-method): Remove prompt suffix and use 'format-prompt'. That is, have the list of files and functions, and put the description of the change only in the last one. IME, this makes the long list easier to read and understand. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 21 11:53:32 2021 Received: (at 47286) by debbugs.gnu.org; 21 Mar 2021 15:53:32 +0000 Received: from localhost ([127.0.0.1]:55290 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lO0OS-0004hY-Ac for submit@debbugs.gnu.org; Sun, 21 Mar 2021 11:53:32 -0400 Received: from mail-wm1-f54.google.com ([209.85.128.54]:35544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lO0OP-0004hJ-5H for 47286@debbugs.gnu.org; Sun, 21 Mar 2021 11:53:31 -0400 Received: by mail-wm1-f54.google.com with SMTP id a132-20020a1c668a0000b029010f141fe7c2so7770016wmc.0 for <47286@debbugs.gnu.org>; Sun, 21 Mar 2021 08:53:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=gLoN9L1jqSEYDQ1tSqDY6ifOiKGHmhUG1NGqItXaHmY=; b=I5bbTOp55Dp5PIR6iT0zxa6K8oGztIgw1rycMrrbRYIqgHVTXmyZ9RrFAQmV0G9y1d peD2lSUVM1xQOO9zrJJLAW3Y39WLJbTPf692uAlDWTvzKzcMD0fAudj+SOYM2gxhfEgu 2UPgTwmutciMmDjggzPsXlIr8wF51SmYy+aCKEA1CviJNxw2QTx03RcyAq4yTvKVP+br 6vfw9NYczeDQBI/HQ16hkz5sX2Xi/wWTk1vzKvJ2u/G4iCF7jxEYPes+ECH/hXC1+qbn HbKpiHwIFNMy5Omtn6HPSAt4zU5ivhF1lIA8iRjm+wUuKsqpqaaeu1EYR8e2ndfeWX0w 0jaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=gLoN9L1jqSEYDQ1tSqDY6ifOiKGHmhUG1NGqItXaHmY=; b=chHPicbpguFsa9iM+U8J3Yu28vTStv0bRo2QZceenpZMJNSMApyqBc8XFbUpKT0Dkx SrQ3bY5lg33GlhCtInAPsi9K1262I6UhPEB95gjxdKJMAdD1WBU4SbkR5kii6n91YMY1 lL6jhnfJjB229DKlTuH6jbAhVYtG3D0f3PYmC22bJY6W1v+FjTnt1P2pKhof8FD1336F ad4pM7o/J26wDl5XPVyDHr6+wOKiRJ2YjGNJ0nQ0RZHCv2RYCBnhhgJGquNFSGoFmgPU 9Xb4YYoMdlwltte0/v5fLOelH0BlbN3oP8wYfVuX8r2uoV7uSGvMztwzjoWU5a1JqDCa n5aw== X-Gm-Message-State: AOAM533GhpSoJX61J0yn15Zfdq2eJsULMZykhaa14YAAZ2wRa2QhawE4 7fdBViPWYmD0davuc+FBqpbInvPEL0GCog== X-Google-Smtp-Source: ABdhPJxCKTGbPEUBNiVRf5T/Sm/uIFvsKVDE7tzSFJIMIfb18BG6QMM7Qnx3CADIrM9zxHcaMe+1ag== X-Received: by 2002:a05:600c:1913:: with SMTP id j19mr12083863wmq.155.1616342002908; Sun, 21 Mar 2021 08:53:22 -0700 (PDT) Received: from hirondell (2a01cb040b29800015848624b4c61618.ipv6.abo.wanadoo.fr. [2a01:cb04:b29:8000:1584:8624:b4c6:1618]) by smtp.gmail.com with ESMTPSA id r11sm16895106wrm.26.2021.03.21.08.53.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Mar 2021 08:53:22 -0700 (PDT) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Gabriel Subject: Re: 28.0.50; [PATCH] Replace "(default %s)" with 'format-prompt' References: Date: Sun, 21 Mar 2021 16:53:21 +0100 In-Reply-To: (Gabriel's message of "Sat, 20 Mar 2021 19:22:52 -0300") Message-ID: <87o8fc1p1q.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47286 Cc: 47286@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Gabriel writes: > * lisp/progmodes/project.el (project--completing-read-strict) > (project--completing-read-strict): Use 'format-prompt'. Mmm, project.el is released on ELPA as a :core package; IIUC it strives for backward-compatibility as far back as Emacs 26.1 (cf. Package-Requires field at the top of the file), so maybe it's a bit early to use format-prompt there? Apologies if I'm misunderstanding something. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 21 14:23:11 2021 Received: (at submit) by debbugs.gnu.org; 21 Mar 2021 18:23:11 +0000 Received: from localhost ([127.0.0.1]:55481 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lO2jF-0006EQ-WE for submit@debbugs.gnu.org; Sun, 21 Mar 2021 14:23:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:35800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lO2jD-0006EH-CO for submit@debbugs.gnu.org; Sun, 21 Mar 2021 14:23:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lO2jC-0008E3-4X for bug-gnu-emacs@gnu.org; Sun, 21 Mar 2021 14:23:07 -0400 Received: from mail-oln040092003080.outbound.protection.outlook.com ([40.92.3.80]:64303 helo=NAM02-BL2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lO2j6-0000DU-TU for bug-gnu-emacs@gnu.org; Sun, 21 Mar 2021 14:23:05 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wsr/jfnp0ptQxJ8cGEQApXgq1Uw28RG5eoSODx/1toQmQeJW3UDkZ6KnMsQULMHL//c7NsC10xdClF8OPtikKeo0bt8kaoAeBSO5iXphIVoMGCtunZYkotds7FU90oeZtJeoPj0/QhrC0DmqY0qa/I1jdB1iqBKEUree/fRJes2jXZz620L+Y9M90fGPG7/jfy8/fFEj3IoPRLQwbTtujHVLxiJvbRaxOR8Kw+vMQqInHXxjKQaXB9W5Q61q1CWVYi5Ff7MxEvhlVLbSStvuARqA2ZT7jmMwJ19T/xRm2uYmpA//JdWyzW/b3GVabVtF5/j71U7E3gs1+kwRzM8V1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sqhqhDxGyWbzs6E6KUMf5sKRoOUgk8ey+2ZAu3FZeC8=; b=mScu5nS0nHwhcjZ5HrzyxBroD8NwQ0xzDkkKTUUDWlcJCeG1o6lWli4AXhkOoleNWIsQpjmcpgezuQlFGq9M/fyt/u/pgipFpYI36FisUnPYiHmJcJ5W9K/O48WZjrkmXX2ynsAs8CTPJb0z1myWLWYpuBwUc5AoCjAZn7p8I7a7mBASRowntwUzGeYzlyytB9jd0bzCHSYBHceYMCsbEI+v9VAEZ/gt7ePyXpbrCF9MidMTWOKxBoMBttgx5BBQq3bvpQ0536V+5TQTQm8bWH84mH/vvy5guKnsy1LxDriqWIgBevaBatuZtQoFdm3Hj8KvBORpDTEJwpU0XkOazA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sqhqhDxGyWbzs6E6KUMf5sKRoOUgk8ey+2ZAu3FZeC8=; b=Pd7MtoTDk/ba2jANQ9/G/2nLhs11ulSV0LKAmL0SAqMeL7/I4IGs1GpucVLQmPajZvjzeLytR+2q1I0MZKw0DOVsBq6I65gKYDHe52DZrkgyVk/eQ8oN3Pr1dbZV+KtFLlVBITt11p+MjQlTKvsRwWFUlQumo8og/gm1w5H+tWfcjcNuaKg9iEOYaCPSjaK/EWE8fAp1twezmWFgg6MF7lSmgBPTfLfIaCwSf8ZTUOiE+wB1+2pnFVW4ZauwfdUcNRvEuI8Yma3t8sbch4cVbxKdJtfVUAL8kUnm9AdC8cRUXBjB/cb6DfkZtN9EDpGv3PiGOeFXGzX4wlmYtMOtaw== Received: from CY1NAM02FT059.eop-nam02.prod.protection.outlook.com (10.152.74.57) by CY1NAM02HT090.eop-nam02.prod.protection.outlook.com (10.152.75.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.24; Sun, 21 Mar 2021 18:22:57 +0000 Received: from CH2PR01MB5879.prod.exchangelabs.com (2a01:111:e400:7e45::48) by CY1NAM02FT059.mail.protection.outlook.com (2a01:111:e400:7e45::211) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.24 via Frontend Transport; Sun, 21 Mar 2021 18:22:57 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:10AA7E676EAA2506E05A15F1661CDEE53FB504FA38649DBDD0D2F368A0E58521; UpperCasedChecksum:F1CFEB95C1F50702C1D533E8A5C3CAC756F7B1AE48867A4A41038CE5962D9B87; SizeAsReceived:7535; Count:45 Received: from CH2PR01MB5879.prod.exchangelabs.com ([fe80::592f:9a58:d8cd:d9c9]) by CH2PR01MB5879.prod.exchangelabs.com ([fe80::592f:9a58:d8cd:d9c9%7]) with mapi id 15.20.3955.025; Sun, 21 Mar 2021 18:22:57 +0000 From: Gabriel To: bug-gnu-emacs@gnu.org Subject: Re: bug#47286: 28.0.50; [PATCH] Replace "(default %s)" with 'format-prompt' References: <83y2ehavkf.fsf@gnu.org> Date: Sun, 21 Mar 2021 15:22:53 -0300 In-Reply-To: <83y2ehavkf.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 21 Mar 2021 08:07:44 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Content-Type: multipart/mixed; boundary="=-=-=" X-TMN: [upTIxLZEyX4do2xliGIQbu7O82eKXITv+yecQW509vgKhzg1YCeiCYhWXMHHMCD1] X-ClientProxiedBy: CP2PR80CA0204.lamprd80.prod.outlook.com (2603:10d6:102:16::22) To CH2PR01MB5879.prod.exchangelabs.com (2603:10b6:610:3c::12) X-Microsoft-Original-Message-ID: <87zgyw1i4i.fsf@hotmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from precision5540 (2804:431:c7f3:ee67:122d:c3e3:e49c:4674) by CP2PR80CA0204.lamprd80.prod.outlook.com (2603:10d6:102:16::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18 via Frontend Transport; Sun, 21 Mar 2021 18:22:56 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 45 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 1cdb5ce6-7b5b-4694-68d3-08d8ec9659ae X-MS-TrafficTypeDiagnostic: CY1NAM02HT090: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o7HyUWWdb3LENFylna0hJeAxDAZU/iG+mOZZPeH5xlxYAv3RS6H4MD+MgXS/AcWWEZuhPLCVMH4WDA99yXgkpL2BaIbkO770HQn9YKRJIaHIhejUvMIOvqQcO9hcTkd9DVjRM+Ad/z6s8erC/WYbxPHR/pmroAOwdOaRSaBABeH7wWGVaJoOPaNjeWKMcEG2fe/vA8w4tCXu1V976gIBehqI5mt61yIpU53dCTIU1uCL8AvFgkE6iiXWaVli6YeZHXvqOpO5EzvL5Cne4pGSg6oIVhUhAUJKCHmIr9toU1g1fC6OO19HDcLGx8iM+rdtsjJwwy2vM7aHZsXUB+V24eBFcWFZuUkOIJsA0/eZrw+GWhV+zg+B1WnOhzdF834O X-MS-Exchange-AntiSpam-MessageData: qZ27C3C6ZRoFEO/EhqycVXX7WwbKyc5Y8q3mMZYVuzcUX2U1LfxgGfEjBSBthZq3PnO6q46rwLjL5xD0Uzc8m+8zQSW0FXVXtXFRcoyWi9OHW/hrpfz/XBQKXMawDiwDprX3GwOxrnyBE+4mYrJhmMo8jOj69JKerYxsgVv6+JAqRrspN2WM/M50nnMjEzPL6UGAW7FTbE74T/x8n0v57g== X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1cdb5ce6-7b5b-4694-68d3-08d8ec9659ae X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2021 18:22:57.4582 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: CY1NAM02FT059.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1NAM02HT090 Received-SPF: pass client-ip=40.92.3.80; envelope-from=gabriel376@hotmail.com; helo=NAM02-BL2-obe.outbound.protection.outlook.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) --=-=-= Content-Type: text/plain Eli Zaretskii writes: > > That is, have the list of files and functions, and put the description > of the change only in the last one. IME, this makes the long list > easier to read and understand. Hi Eli, thank you for your suggestion, looks much better! I will make sure my next patches follow this format, if applicable. Patch with commit message updated: --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Replace-default-s-with-format-prompt.patch >From aa87da8e03ecb1532c13be22160556b1d4547299 Mon Sep 17 00:00:00 2001 From: Gabriel do Nascimento Ribeiro Date: Sun, 21 Mar 2021 14:44:32 -0300 Subject: [PATCH] Replace "(default %s)" with 'format-prompt' * lisp/cmuscheme.el (scheme-load-file, scheme-compile-file): * lisp/comint.el (comint-get-source): * lisp/emulation/viper-cmd.el (viper-quote-region, viper-kill-buffer) (viper-query-replace, viper-read-string-with-history): * lisp/eshell/esh-mode.el (eshell-find-tag): * lisp/gnus/gnus-sum.el (gnus-articles-to-read) (gnus-summary-search-article-forward) (gnus-summary-search-article-backward): * lisp/international/mule-cmds.el (set-input-method, toggle-input-method) (describe-input-method, set-language-environment) (describe-language-environment): * lisp/mh-e/mh-gnus.el (mh-mml-minibuffer-read-disposition): * lisp/mh-e/mh-letter.el (mh-insert-letter): * lisp/mh-e/mh-mime.el (mh-display-with-external-viewer) (mh-mime-save-parts, mh-mh-forward-message) (mh-mml-query-cryptographic-method, mh-minibuffer-read-type): * lisp/mh-e/mh-seq.el (mh-read-seq, mh-read-range): * lisp/mh-e/mh-utils.el (mh-prompt-for-folder): * lisp/progmodes/cc-styles.el (c-read-offset): * lisp/progmodes/etags.el (find-tag-tag): (find-tag-noselect, find-tag, find-tag-other-window) (find-tag-other-frame, find-tag-regexp): * lisp/progmodes/idlwave.el (idlwave-find-module): * lisp/progmodes/inf-lisp.el (lisp-load-file, lisp-compile-file): * lisp/progmodes/project.el (project--completing-read-strict) (project--completing-read-strict): * lisp/progmodes/tcl.el (tcl-load-file, tcl-restart-with-file): * lisp/progmodes/verilog-mode.el (verilog-surelint-off) (verilog-goto-defun): * lisp/progmodes/xref.el (xref--read-identifier): (xref-find-definitions, xref-find-definitions-other-window) (xref-find-definitions-other-frame, xref-find-references): * lisp/ses.el (ses-read-printer): (ses-read-cell-printer, ses-read-column-printer) (ses-read-default-printer, ses-define-local-printer): * lisp/subr.el (read-number): * lisp/term.el (term-get-source): * src/minibuf.c (read-buffer): Remove prompt suffix and use 'format-prompt'. --- lisp/cmuscheme.el | 4 ++-- lisp/comint.el | 6 ++---- lisp/emulation/viper-cmd.el | 31 ++++++++++++------------------- lisp/eshell/esh-mode.el | 2 +- lisp/gnus/gnus-sum.el | 31 ++++++++++++++----------------- lisp/international/mule-cmds.el | 10 +++++----- lisp/mh-e/mh-gnus.el | 2 +- lisp/mh-e/mh-letter.el | 5 +---- lisp/mh-e/mh-mime.el | 20 +++++++------------- lisp/mh-e/mh-seq.el | 16 +++++----------- lisp/mh-e/mh-utils.el | 7 +++---- lisp/progmodes/cc-styles.el | 2 +- lisp/progmodes/etags.el | 16 ++++++---------- lisp/progmodes/idlwave.el | 2 +- lisp/progmodes/inf-lisp.el | 4 ++-- lisp/progmodes/project.el | 6 ++---- lisp/progmodes/tcl.el | 4 ++-- lisp/progmodes/verilog-mode.el | 9 +++++---- lisp/progmodes/xref.el | 15 +++++---------- lisp/ses.el | 12 +++++------- lisp/subr.el | 4 ++-- lisp/term.el | 6 ++---- src/minibuf.c | 4 ++-- 23 files changed, 88 insertions(+), 130 deletions(-) diff --git a/lisp/cmuscheme.el b/lisp/cmuscheme.el index 772891d5d3..d43cdb15c0 100644 --- a/lisp/cmuscheme.el +++ b/lisp/cmuscheme.el @@ -421,7 +421,7 @@ scheme-prev-l/c-dir/file (defun scheme-load-file (file-name) "Load a Scheme file FILE-NAME into the inferior Scheme process." - (interactive (comint-get-source "Load Scheme file: " scheme-prev-l/c-dir/file + (interactive (comint-get-source "Load Scheme file" scheme-prev-l/c-dir/file scheme-source-modes t)) ; t because `load' ; needs an exact name (comint-check-source file-name) ; Check to see if buffer needs saved. @@ -433,7 +433,7 @@ scheme-load-file (defun scheme-compile-file (file-name) "Compile a Scheme file FILE-NAME in the inferior Scheme process." - (interactive (comint-get-source "Compile Scheme file: " + (interactive (comint-get-source "Compile Scheme file" scheme-prev-l/c-dir/file scheme-source-modes nil)) ; nil because COMPILE doesn't diff --git a/lisp/comint.el b/lisp/comint.el index 65072b0137..b04d404676 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -2946,7 +2946,7 @@ comint-get-source then the filename reader will only accept a file that exists. A typical use: - (interactive (comint-get-source \"Compile file: \" prev-lisp-dir/file + (interactive (comint-get-source \"Compile file\" prev-lisp-dir/file \\='(lisp-mode) t))" (let* ((def (comint-source-default prev-dir/file source-modes)) (stringfile (comint-extract-string)) @@ -2959,9 +2959,7 @@ comint-get-source (car def))) (deffile (if sfile-p (file-name-nondirectory stringfile) (cdr def))) - (ans (read-file-name (if deffile (format "%s(default %s) " - prompt deffile) - prompt) + (ans (read-file-name (format-prompt prompt deffile) defdir (concat defdir deffile) mustmatch-p))) diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index 42d6c1eb19..728f790a96 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el @@ -1786,7 +1786,7 @@ viper-quote-region (do-not-change-default t)) (setq quote-str (viper-read-string-with-history - "Quote string: " + "Quote string" nil 'viper-quote-region-history ;; FIXME: Use comment-region. @@ -1995,24 +1995,17 @@ viper-read-string-with-history #'viper-minibuffer-standard-hook (if (or (not (listp old)) (eq (car old) 'lambda)) (list old) old)))) - (val "") - (padding "") - temp-msg) + (val "")) (setq keymap (or keymap minibuffer-local-map) initial (or initial "") - viper-initial initial - temp-msg (if default - (format "(default %s) " default) - "")) + viper-initial initial) (setq viper-incomplete-ex-cmd nil) - (setq val (read-from-minibuffer prompt - (concat temp-msg initial val padding) - keymap nil history-var)) - (setq minibuffer-setup-hook nil - padding (viper-array-to-string (this-command-keys)) - temp-msg "") + (setq val (read-from-minibuffer (format-prompt prompt default) + nil + keymap nil history-var default)) + (setq minibuffer-setup-hook nil) ;; the following tries to be smart about what to put in history (if (not (string= val (car (symbol-value history-var)))) (push val (symbol-value history-var))) @@ -3825,7 +3818,7 @@ viper-kill-buffer (let (buffer buffer-name) (setq buffer-name (funcall viper-read-buffer-function - (format "Kill buffer (%s): " + (format-prompt "Kill buffer" (buffer-name (current-buffer))))) (setq buffer (if (null buffer-name) @@ -4171,8 +4164,8 @@ viper-query-replace (interactive) (let (str) (setq str (viper-read-string-with-history - (if viper-re-query-replace "Query replace regexp: " - "Query replace: ") + (if viper-re-query-replace "Query replace regexp" + "Query replace") nil ; no initial 'viper-replace1-history (car viper-replace1-history) ; default @@ -4187,7 +4180,7 @@ viper-query-replace (query-replace-regexp str (viper-read-string-with-history - (format-message "Query replace regexp `%s' with: " str) + (format-message "Query replace regexp `%s' with" str) nil ; no initial 'viper-replace1-history (car viper-replace1-history) ; default @@ -4195,7 +4188,7 @@ viper-query-replace (query-replace str (viper-read-string-with-history - (format-message "Query replace `%s' with: " str) + (format-message "Query replace `%s' with" str) nil ; no initial 'viper-replace1-history (car viper-replace1-history) ; default diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index d29b010ea0..f9dbce9770 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el @@ -458,7 +458,7 @@ eshell-find-tag (let ((inhibit-read-only t) (no-default (eobp)) (find-tag-default-function 'ignore)) - (setq tagname (car (find-tag-interactive "Find tag: " no-default))) + (setq tagname (car (find-tag-interactive "Find tag" no-default))) (with-suppressed-warnings ((obsolete find-tag)) (find-tag tagname next-p regexp-p)))) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 97da550353..c30f9a5f35 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -5977,14 +5977,15 @@ gnus-articles-to-read (input (read-string (if only-read-p - (format - "How many articles from %s (available %d, default %d): " - (gnus-group-real-name gnus-newsgroup-name) - number default) - (format - "How many articles from %s (%d default): " - (gnus-group-real-name gnus-newsgroup-name) - default)) + (format-prompt + "How many articles from %s (available %d)" + default + (gnus-group-real-name gnus-newsgroup-name) + number) + (format-prompt + "How many articles from %s" + default + (gnus-group-real-name gnus-newsgroup-name))) nil nil (number-to-string default)))) @@ -9514,11 +9515,9 @@ gnus-summary-search-article-forward (interactive (list (read-string - (format "Search article %s (regexp%s): " - (if current-prefix-arg "backward" "forward") - (if gnus-last-search-regexp - (concat ", default " gnus-last-search-regexp) - ""))) + (format-prompt "Search article %s (regexp)" + gnus-last-search-regexp + (if current-prefix-arg "backward" "forward"))) current-prefix-arg) gnus-summary-mode) (if (string-equal regexp "") @@ -9537,10 +9536,8 @@ gnus-summary-search-article-backward (interactive (list (read-string - (format "Search article backward (regexp%s): " - (if gnus-last-search-regexp - (concat ", default " gnus-last-search-regexp) - "")))) + (format-prompt "Search article backward (regexp)" + gnus-last-search-regexp))) gnus-summary-mode) (gnus-summary-search-article-forward regexp 'backward)) diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index e4bdf50f52..743b638d06 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -1524,7 +1524,7 @@ set-input-method (interactive (let* ((default (or (car input-method-history) default-input-method))) (list (read-input-method-name - (if default "Select input method (default %s): " "Select input method: ") + (format-prompt "Select input method" default) default t) t))) (activate-input-method input-method) @@ -1569,7 +1569,7 @@ toggle-input-method (if (or arg (not default)) (progn (read-input-method-name - (if default "Input method (default %s): " "Input method: " ) + (format-prompt "Input method" default) default t)) default)) (unless default-input-method @@ -1620,7 +1620,7 @@ describe-input-method "Describe input method INPUT-METHOD." (interactive (list (read-input-method-name - "Describe input method (default current choice): "))) + (format-prompt "Describe input method" current-input-method)))) (if (and input-method (symbolp input-method)) (setq input-method (symbol-name input-method))) (help-setup-xref (list #'describe-input-method @@ -1929,7 +1929,7 @@ set-language-environment the new language environment, it runs `set-language-environment-hook'." (interactive (list (read-language-name nil - "Set language environment (default English): "))) + (format-prompt "Set language environment" "English")))) (if language-name (if (symbolp language-name) (setq language-name (symbol-name language-name))) @@ -2144,7 +2144,7 @@ describe-language-environment (interactive (list (read-language-name 'documentation - "Describe language environment (default current choice): "))) + (format-prompt "Describe language environment" current-language-environment)))) (if (null language-name) (setq language-name current-language-environment)) (if (or (null language-name) diff --git a/lisp/mh-e/mh-gnus.el b/lisp/mh-e/mh-gnus.el index 6a9851662a..7898d7eece 100644 --- a/lisp/mh-e/mh-gnus.el +++ b/lisp/mh-e/mh-gnus.el @@ -129,7 +129,7 @@ mh-mml-minibuffer-read-disposition (unless default (setq default (mml-content-disposition type filename))) (let ((disposition (completing-read - (format "Disposition (default %s): " default) + (format-prompt "Disposition" default) '(("attachment") ("inline") ("")) nil t nil nil default))) (if (not (equal disposition "")) diff --git a/lisp/mh-e/mh-letter.el b/lisp/mh-e/mh-letter.el index f5ad73d800..107a0ae5e4 100644 --- a/lisp/mh-e/mh-letter.el +++ b/lisp/mh-e/mh-letter.el @@ -390,10 +390,7 @@ mh-insert-letter (or mh-sent-from-msg (nth 0 (mh-translate-range folder "cur"))) (nth 0 (mh-translate-range folder "cur")))) (message - (read-string (concat "Message number" - (or (and default - (format " (default %d): " default)) - ": ")) + (read-string (format-prompt "Message number" default) nil nil (if (numberp default) (int-to-string default) diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el index 70df9e6b0f..df3c711e3d 100644 --- a/lisp/mh-e/mh-mime.el +++ b/lisp/mh-e/mh-mime.el @@ -259,9 +259,7 @@ mh-display-with-external-viewer (methods (mapcar (lambda (x) (list (cdr (assoc 'viewer x)))) (mailcap-mime-info type 'all))) (def (caar methods)) - (prompt (format "Viewer%s: " (if def - (format " (default %s)" def) - ""))) + (prompt (format-prompt "Viewer" def)) (method (completing-read prompt methods nil nil nil nil def)) (folder mh-show-folder-buffer) (buffer-read-only nil)) @@ -395,9 +393,9 @@ mh-mime-save-parts ((and (or prompt (equal t mh-mime-save-parts-default-directory)) mh-mime-save-parts-directory) - (read-directory-name (format - "Store in directory (default %s): " - mh-mime-save-parts-directory) + (read-directory-name (format-prompt + "Store in directory" + mh-mime-save-parts-directory) "" mh-mime-save-parts-directory t "")) ((stringp mh-mime-save-parts-default-directory) mh-mime-save-parts-default-directory) @@ -1258,11 +1256,7 @@ mh-mh-forward-message (interactive (list (mml-minibuffer-read-description) (mh-prompt-for-folder "Message from" mh-sent-from-folder nil) - (read-string (concat "Messages" - (if (numberp mh-sent-from-msg) - (format " (default %d): " - mh-sent-from-msg) - ": "))))) + (read-string (format-prompt "Messages" mh-sent-from-msg)))) (beginning-of-line) (insert "#forw [") (and description @@ -1596,7 +1590,7 @@ mh-mml-query-cryptographic-method (if current-prefix-arg (let ((def (or (car mh-mml-cryptographic-method-history) mh-mml-method-default))) - (completing-read (format "Method (default %s): " def) + (completing-read (format-prompt "Method" def) '(("pgp") ("pgpmime") ("smime")) nil t nil 'mh-mml-cryptographic-method-history def)) mh-mml-method-default)) @@ -1731,7 +1725,7 @@ mh-minibuffer-read-type (type (or (and (not (equal probed-type "application/octet-stream")) probed-type) (completing-read - (format "Content type (default %s): " default) + (format-prompt "Content type" default) (mapcar #'list (mailcap-mime-types)))))) (if (not (equal type "")) type diff --git a/lisp/mh-e/mh-seq.el b/lisp/mh-e/mh-seq.el index e8a03f6704..4a464a3f55 100644 --- a/lisp/mh-e/mh-seq.el +++ b/lisp/mh-e/mh-seq.el @@ -390,10 +390,7 @@ mh-read-seq the NOT-EMPTY flag is non-nil, and supply an optional DEFAULT sequence. A reply of `%' defaults to the first sequence containing the current message." - (let* ((input (completing-read (format "%s sequence%s: " prompt - (if default - (format " (default %s)" default) - "")) + (let* ((input (completing-read (format-prompt "%s sequence" default prompt) (mh-seq-names mh-seq-list) nil nil nil 'mh-sequence-history)) (seq (cond ((equal input "%") @@ -646,13 +643,10 @@ mh-read-range ((stringp default) default) ((symbolp default) (symbol-name default)))) (prompt (cond ((and guess large default) - (format "%s (folder has %s messages, default %s)" - prompt (car counts) default)) - ((and guess large) - (format "%s (folder has %s messages)" - prompt (car counts))) + (format-prompt "%s (folder has %s messages)" + default prompt (car counts))) (default - (format "%s (default %s)" prompt default)))) + (format-prompt prompt default)))) (minibuffer-local-completion-map mh-range-completion-map) (seq-list (if (eq folder mh-current-folder) mh-seq-list @@ -662,7 +656,7 @@ mh-read-range (mh-seq-names seq-list))) (input (cond ((and (not ask-flag) unseen) (symbol-name mh-unseen-seq)) ((and (not ask-flag) (not large)) "all") - (t (completing-read (format "%s: " prompt) + (t (completing-read prompt 'mh-range-completion-function nil nil nil 'mh-range-history default)))) msg-list) diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el index d7c607df5c..8cb68f5cf1 100644 --- a/lisp/mh-e/mh-utils.el +++ b/lisp/mh-e/mh-utils.el @@ -758,10 +758,9 @@ mh-prompt-for-folder used in searching." (if (null default) (setq default "")) - (let* ((default-string (cond (default-string (format " (default %s)" default-string)) - ((equal "" default) "") - (t (format " (default %s)" default)))) - (prompt (format "%s folder%s: " prompt default-string)) + (let* ((default-string (or default-string + (if (equal default "") nil default))) + (prompt (format-prompt "%s folder" default-string prompt)) (mh-current-folder-name mh-current-folder) read-name folder-name) (while (and (setq read-name (mh-folder-completing-read diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el index aec259f1b3..7d02e1d702 100644 --- a/lisp/progmodes/cc-styles.el +++ b/lisp/progmodes/cc-styles.el @@ -442,7 +442,7 @@ c-read-offset (errmsg (concat "Offset must be int, func, var, vector, list, " "or [+,-,++,--,*,/] " defstr)) - (prompt (concat symname " offset " defstr)) + (prompt (format-prompt "%s offset" oldoff symname)) (keymap (make-sparse-keymap)) (minibuffer-completion-table obarray) (minibuffer-completion-predicate 'fboundp) diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 023c90cca5..13717b1b89 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -836,11 +836,7 @@ find-tag-tag "Read a tag name, with defaulting and completion." (let* ((completion-ignore-case (find-tag--completion-ignore-case)) (default (find-tag--default)) - (spec (completing-read (if default - (format "%s (default %s): " - (substring string 0 (string-match "[ :]+\\'" string)) - default) - string) + (spec (completing-read (format-prompt string default) (tags-lazy-completion-table) nil nil nil nil default))) (if (equal spec "") @@ -899,7 +895,7 @@ find-tag-noselect Contrast this with the ring of marks gone to by the command. See documentation of variable `tags-file-name'." - (interactive (find-tag-interactive "Find tag: ")) + (interactive (find-tag-interactive "Find tag")) (setq find-tag-history (cons tagname find-tag-history)) ;; Save the current buffer's value of `find-tag-hook' before @@ -971,7 +967,7 @@ find-tag See documentation of variable `tags-file-name'." (declare (obsolete xref-find-definitions "25.1")) - (interactive (find-tag-interactive "Find tag: ")) + (interactive (find-tag-interactive "Find tag")) (let* ((buf (find-tag-noselect tagname next-p regexp-p)) (pos (with-current-buffer buf (point)))) (condition-case nil @@ -1000,7 +996,7 @@ find-tag-other-window See documentation of variable `tags-file-name'." (declare (obsolete xref-find-definitions-other-window "25.1")) - (interactive (find-tag-interactive "Find tag other window: ")) + (interactive (find-tag-interactive "Find tag other window")) ;; This hair is to deal with the case where the tag is found in the ;; selected window's buffer; without the hair, point is moved in both @@ -1041,7 +1037,7 @@ find-tag-other-frame See documentation of variable `tags-file-name'." (declare (obsolete xref-find-definitions-other-frame "25.1")) - (interactive (find-tag-interactive "Find tag other frame: ")) + (interactive (find-tag-interactive "Find tag other frame")) (let ((pop-up-frames t)) (with-suppressed-warnings ((obsolete find-tag-other-window)) (find-tag-other-window tagname next-p)))) @@ -1065,7 +1061,7 @@ find-tag-regexp See documentation of variable `tags-file-name'." (declare (obsolete xref-find-apropos "25.1")) - (interactive (find-tag-interactive "Find tag regexp: " t)) + (interactive (find-tag-interactive "Find tag regexp" t)) ;; We go through find-tag-other-window to do all the display hair there. (funcall (if other-window 'find-tag-other-window 'find-tag) regexp next-p t)) diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index e8e55ae96d..b72d9da748 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -7820,7 +7820,7 @@ idlwave-find-module (name (idlwave-completing-read (if (or (not this-buffer) (assoc default list)) - (format "Module (Default %s): " default) + (format-prompt "Module" default) (format "Module in this file: ")) list)) type class) diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index 146ed4dca4..af6ccce3d6 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el @@ -487,7 +487,7 @@ lisp-source-modes (defun lisp-load-file (file-name) "Load a Lisp file into the inferior Lisp process." - (interactive (comint-get-source "Load Lisp file: " lisp-prev-l/c-dir/file + (interactive (comint-get-source "Load Lisp file" lisp-prev-l/c-dir/file lisp-source-modes nil)) ; nil because LOAD ; doesn't need an exact name (comint-check-source file-name) ; Check to see if buffer needs saved. @@ -500,7 +500,7 @@ lisp-load-file (defun lisp-compile-file (file-name) "Compile a Lisp file in the inferior Lisp process." - (interactive (comint-get-source "Compile Lisp file: " lisp-prev-l/c-dir/file + (interactive (comint-get-source "Compile Lisp file" lisp-prev-l/c-dir/file lisp-source-modes nil)) ; nil = don't need ; suffix .lisp (comint-check-source file-name) ; Check to see if buffer needs saved. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index b6a886f731..11f33dc919 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -869,9 +869,7 @@ project--completing-read-strict ;; removing it when it has no matches. Neither seems natural ;; enough. Removal is confusing; early expansion makes the prompt ;; too long. - (let* ((new-prompt (if (and default (not (string-equal default ""))) - (format "%s (default %s): " prompt default) - (format "%s: " prompt))) + (let* ((new-prompt (format-prompt prompt default)) (res (completing-read new-prompt collection predicate t nil ;; initial-input @@ -879,7 +877,7 @@ project--completing-read-strict (when (and (equal res default) (not (test-completion res collection predicate))) (setq res - (completing-read (format "%s: " prompt) + (completing-read (format-prompt prompt nil) collection predicate t res hist nil))) res)) diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el index 82e1343e05..f6a50bf1a8 100644 --- a/lisp/progmodes/tcl.el +++ b/lisp/progmodes/tcl.el @@ -1413,7 +1413,7 @@ tcl-load-file (list ;; car because comint-get-source returns a list holding the ;; filename. - (car (comint-get-source "Load Tcl file: " + (car (comint-get-source "Load Tcl file" (or (and (derived-mode-p 'tcl-mode) (buffer-file-name)) @@ -1433,7 +1433,7 @@ tcl-restart-with-file Prefix argument means switch to the Tcl buffer afterwards." (interactive (list - (car (comint-get-source "Restart with Tcl file: " + (car (comint-get-source "Restart with Tcl file" (or (and (derived-mode-p 'tcl-mode) (buffer-file-name)) diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index 55c04e1332..14a9dff869 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -5466,8 +5466,9 @@ verilog-surelint-off (let* ((pop-up-windows t)) (let ((name (expand-file-name (read-file-name - (format "Find this error in: (default %s) " - file) + (format-prompt + "Find this error in" + file) dir file t)))) (if (file-directory-p name) (setq name (expand-file-name filename name))) @@ -7863,8 +7864,8 @@ verilog-goto-defun (verilog-buffer-to-use (current-buffer)) (label (if (not (string= default "")) ;; Do completion with default - (completing-read (concat "Goto-Label: (default " - default ") ") + (completing-read (format-prompt "Goto-Label" + default) 'verilog-comp-defun nil nil "") ;; There is no default value. Complete without it (completing-read "Goto-Label: " diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index ea52befec5..3cb4247b4b 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -1192,12 +1192,7 @@ xref--read-identifier (xref--prompt-p this-command)) (let ((id (completing-read - (if def - (format "%s (default %s): " - (substring prompt 0 (string-match - "[ :]+\\'" prompt)) - def) - prompt) + (format-prompt prompt def) (xref-backend-identifier-completion-table backend) nil nil nil 'xref--read-identifier-history def))) @@ -1257,19 +1252,19 @@ xref-find-definitions definition for IDENTIFIER, display it in the selected window. Otherwise, display the list of the possible definitions in a buffer where the user can select from the list." - (interactive (list (xref--read-identifier "Find definitions of: "))) + (interactive (list (xref--read-identifier "Find definitions of"))) (xref--find-definitions identifier nil)) ;;;###autoload (defun xref-find-definitions-other-window (identifier) "Like `xref-find-definitions' but switch to the other window." - (interactive (list (xref--read-identifier "Find definitions of: "))) + (interactive (list (xref--read-identifier "Find definitions of"))) (xref--find-definitions identifier 'window)) ;;;###autoload (defun xref-find-definitions-other-frame (identifier) "Like `xref-find-definitions' but switch to the other frame." - (interactive (list (xref--read-identifier "Find definitions of: "))) + (interactive (list (xref--read-identifier "Find definitions of"))) (xref--find-definitions identifier 'frame)) ;;;###autoload @@ -1280,7 +1275,7 @@ xref-find-references With prefix argument, or if `xref-prompt-for-identifier' is t, always prompt for the identifier. If `xref-prompt-for-identifier' is nil, prompt only if there's no usable symbol at point." - (interactive (list (xref--read-identifier "Find references of: "))) + (interactive (list (xref--read-identifier "Find references of"))) (xref--find-xrefs identifier 'references identifier nil)) ;;;###autoload diff --git a/lisp/ses.el b/lisp/ses.el index a11c754abc..6058d48ed1 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -2653,9 +2653,7 @@ ses-read-printer (barf-if-buffer-read-only) (if (eq default t) (setq default "") - (setq prompt (format "%s (default %S): " - (substring prompt 0 -2) - default))) + (setq prompt (format-prompt prompt default))) (dolist (key ses-completion-keys) (define-key ses-mode-edit-map key 'ses-read-printer-complete-symbol)) ;; make it globally visible, so that it can be visible from the minibuffer. @@ -2702,7 +2700,7 @@ ses-read-cell-printer ;;Range contains differing printer functions (setq default t) (throw 'ses-read-cell-printer t)))))) - (list (ses-read-printer (format "Cell %S printer: " ses--curcell) + (list (ses-read-printer (format "Cell %S printer" ses--curcell) default)))) (unless (eq newval t) (ses-begin-change) @@ -2716,7 +2714,7 @@ ses-read-column-printer (interactive (let ((col (cdr (ses-sym-rowcol ses--curcell)))) (ses-check-curcell) - (list col (ses-read-printer (format "Column %s printer: " + (list col (ses-read-printer (format "Column %s printer" (ses-column-letter col)) (ses-col-printer col))))) @@ -2731,7 +2729,7 @@ ses-read-default-printer "Set the default printer function for cells that have no other. See `ses-read-cell-printer' for input forms." (interactive - (list (ses-read-printer "Default printer: " ses--default-printer))) + (list (ses-read-printer "Default printer" ses--default-printer))) (unless (eq newval t) (ses-begin-change) (ses-set-parameter 'ses--default-printer newval) @@ -3773,7 +3771,7 @@ ses-define-local-printer (setq name (intern name)) (let* ((cur-printer (gethash name ses--local-printer-hashmap)) (default (and cur-printer (ses--locprn-def cur-printer)))) - (setq def (ses-read-printer (format "Enter definition of printer %S: " name) + (setq def (ses-read-printer (format "Enter definition of printer %S" name) default))) (list name def))) diff --git a/lisp/subr.el b/lisp/subr.el index ef0e5e6f78..a2c1280fc1 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2806,9 +2806,9 @@ read-number (when default1 (setq prompt (if (string-match "\\(\\):[ \t]*\\'" prompt) - (replace-match (format " (default %s)" default1) t t prompt 1) + (replace-match (format minibuffer-default-prompt-format default1) t t prompt 1) (replace-regexp-in-string "[ \t]*\\'" - (format " (default %s) " default1) + (format minibuffer-default-prompt-format default1) prompt t t)))) (while (progn diff --git a/lisp/term.el b/lisp/term.el index 6beb17fb66..d41895ad3d 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -2535,7 +2535,7 @@ term-check-source ;; then the filename reader will only accept a file that exists. ;; ;; A typical use: -;; (interactive (term-get-source "Compile file: " prev-lisp-dir/file +;; (interactive (term-get-source "Compile file" prev-lisp-dir/file ;; '(lisp-mode) t)) ;; This is pretty stupid about strings. It decides we're in a string @@ -2566,9 +2566,7 @@ term-get-source (car def))) (deffile (if sfile-p (file-name-nondirectory stringfile) (cdr def))) - (ans (read-file-name (if deffile (format "%s(default %s) " - prompt deffile) - prompt) + (ans (read-file-name (format-prompt prompt deffile) defdir (concat defdir deffile) mustmatch-p))) diff --git a/src/minibuf.c b/src/minibuf.c index d58924ae52..c9831fd50f 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1490,8 +1490,8 @@ DEFUN ("read-buffer", Fread_buffer, Sread_buffer, 1, 4, 0, STRING_MULTIBYTE (prompt)); } - AUTO_STRING (format, "%s (default %s): "); - prompt = CALLN (Fformat, format, prompt, + prompt = CALLN (Ffuncall, intern("format-prompt"), + prompt, CONSP (def) ? XCAR (def) : def); } -- 2.27.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 21 14:31:55 2021 Received: (at submit) by debbugs.gnu.org; 21 Mar 2021 18:31:56 +0000 Received: from localhost ([127.0.0.1]:55488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lO2rj-0006Rh-89 for submit@debbugs.gnu.org; Sun, 21 Mar 2021 14:31:55 -0400 Received: from lists.gnu.org ([209.51.188.17]:39932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lO2re-0006RW-KD for submit@debbugs.gnu.org; Sun, 21 Mar 2021 14:31:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50594) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lO2rZ-00027V-D0 for bug-gnu-emacs@gnu.org; Sun, 21 Mar 2021 14:31:47 -0400 Received: from mail-mw2nam08olkn2028.outbound.protection.outlook.com ([40.92.46.28]:12905 helo=NAM04-MW2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lO2rQ-00049d-MV for bug-gnu-emacs@gnu.org; Sun, 21 Mar 2021 14:31:41 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WfJFl+2EjODp53y7fsw8Y/Iq913xLyA+rfnstMcN2Yq5gqpD6dDRzT+8MFo4g3B7F51ZmSOVcazrBsX4CmpyW8gTbfAIDqLA43pxWGQ95aeAIEPBi8o/PQZWCnJbvH3swtlG4sZWgtEKJ8URoo5lDv+fdgIk1nlGeigOg2AD/GBbfgSPIIGPAgFG2f5Tqnj531zX94+qdrJuypDEHNB6pxO/Sop++SBfYfeF1P/rRscZITK11w0OykiYpJguemBjchK4FoAdVqunwMl0F/wpYAQatnjm2p23x7gsRZLWi5+rhAHYhaqrbyy4WQShXqJmBhFXT8vRpSs6ZNxZiDfBbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=51xBLWvZnQuSINpSxyFHZGpsuXVqFFzj9WNB/h1sFks=; b=UGrNxkc5pcOnu50Tbyi3IlZDeP23NRL5GwLzGmUJGwnfsEegCTyxpAv+7nDOUelrXuUXu7n7kVUteA2FQt7RSNrC+XVztbLrRQgC1CFuqgqHQA040biM0aIVXhi6QqHJeI41gB73Rn7jFjSUi5wk7ca7PY8nBJeR/XPG21JBYcNBKYRarxNJFwBu8nJrosEiKR1YGbhenoe6Mv5az88dZVNf5vjGCNMx3lvUknj6gNT6e/rqV7qmZhc/FqyKKmDzqrfVtv+dn1o7aDvilWm2kbpOYWaXbUcsRc0kXUx9hUlVuUXBwWKzUik2SFVoZaj+RAA6az305RJ3Izee492KMQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=51xBLWvZnQuSINpSxyFHZGpsuXVqFFzj9WNB/h1sFks=; b=SvhqDesfqIu+Axp1pFrAbTQPn/FXWMUaFKT3NSpalO4Oonf7zqy3+tAsgKcn5le2kKOOvCyGdg8yiJtO0q6tAshgb7VVdyKLkMSGP7OxqwUrAVlklxxOaYGfT2l2jcxcZvkfK+U09KwGiP2w6DYmz/L8wkp1nwb5QbC7XDoIhISyD3X1sPq0eefoxDRcTQiMsZfp7rnIhlFAFdIpWlmgFJCvBd7znxVrJQa88QciNGkOD/dFF9oO1djL23Ld3xBDon07BjtUSrckeqgeRicgKvyudd3wlYVrRaOtnBSF8Uk8Aewj8jnxIA0fvF6jBNWUnTs9Vgr+vi1OMlk48WX//A== Received: from CO1NAM04FT054.eop-NAM04.prod.protection.outlook.com (10.152.90.54) by CO1NAM04HT209.eop-NAM04.prod.protection.outlook.com (10.152.91.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18; Sun, 21 Mar 2021 18:31:34 +0000 Received: from CH2PR01MB5879.prod.exchangelabs.com (2a01:111:e400:7e4d::43) by CO1NAM04FT054.mail.protection.outlook.com (2a01:111:e400:7e4d::278) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18 via Frontend Transport; Sun, 21 Mar 2021 18:31:34 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:6BC257681CB1E256B0B1A53E3B3DF13CDF564E107CAF49B553FEE501995B521D; UpperCasedChecksum:DC9008E1416A297C8A53C08B0396C6E179EA2E8FC536D87DEF920840C7F016F9; SizeAsReceived:8752; Count:46 Received: from CH2PR01MB5879.prod.exchangelabs.com ([fe80::592f:9a58:d8cd:d9c9]) by CH2PR01MB5879.prod.exchangelabs.com ([fe80::592f:9a58:d8cd:d9c9%7]) with mapi id 15.20.3955.025; Sun, 21 Mar 2021 18:31:33 +0000 From: Gabriel To: bug-gnu-emacs@gnu.org Subject: Re: bug#47286: 28.0.50; [PATCH] Replace "(default %s)" with 'format-prompt' References: <87o8fc1p1q.fsf@gmail.com> Date: Sun, 21 Mar 2021 15:31:29 -0300 In-Reply-To: <87o8fc1p1q.fsf@gmail.com> (=?utf-8?Q?=22K=C3=A9vin?= Le Gouguec"'s message of "Sun, 21 Mar 2021 16:53:21 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-TMN: [eGv/iLkM8Fy8v19aOv+NXI7pa7vTxqAJiVHQnz/PtY0TKMpqJ1HSLlOmY500sYL5] X-ClientProxiedBy: CP2P15201CA0009.LAMP152.PROD.OUTLOOK.COM (2603:10d6:102:1a::19) To CH2PR01MB5879.prod.exchangelabs.com (2603:10b6:610:3c::12) X-Microsoft-Original-Message-ID: <87v99k1hq6.fsf@hotmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from precision5540 (2804:431:c7f3:ee67:122d:c3e3:e49c:4674) by CP2P15201CA0009.LAMP152.PROD.OUTLOOK.COM (2603:10d6:102:1a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18 via Frontend Transport; Sun, 21 Mar 2021 18:31:32 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 95c01c21-0df4-45a0-93d7-08d8ec978d83 X-MS-TrafficTypeDiagnostic: CO1NAM04HT209: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yAYPLI3DMDcUohJtPo2ZROfHN4xrgAxF8LtCtyRoKxTg5di43/HRGDj8u40hMPfzWkx2H+tO+fsflN7Jn67gSPxhn/Wj5p+WvNRlFOzAULaSYhJ23tAnEecDTGaj757SbCBR99zjMTKRRHs7Nymvm6G4R6m6KzM/tHanM5mg1jYsX2Xww5effxuWP21qdbgc7cwlGAOZCVjobg2zZBJxYAz9fJ6dQ3v8V4qBBICaEFkRRn3SOqDCWIWwhAUqFoo8oT6lzuaaPi+AH6R/vpabwl/FaXkV1JPTalbb4t05QYCZRGINhlcT+A7780bhuwLgwBlKb8+NIYypKEoYnpO0eBTLZYmbkrq4tE2obPTa3MEVAfFT9SRlgGP2eLdRIfZs7oaR7ifPGph2lyXfEmbZew== X-MS-Exchange-AntiSpam-MessageData: EyQ7UuqwrECv2moPL+ujQsVPb8sSZX/4it/QIJfBEbK73ryMhel5WPFRGeOXZK+bJvX5aBN3PFXtbKAPQK4FSftrJXRknrgJIifEFwK0A9oFhYvmvy3IPrkjlso7ttOUFMqYO+3mdEvXbVoWEmVsRZnvC4iyw/zUucv2qi4i3UVJb1xDdn7c4VKqsFfGf8neUyKS6evOfvOl4fXZff5AKw== X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-Network-Message-Id: 95c01c21-0df4-45a0-93d7-08d8ec978d83 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2021 18:31:33.4780 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: CO1NAM04FT054.eop-NAM04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1NAM04HT209 Received-SPF: pass client-ip=40.92.46.28; envelope-from=gabriel376@hotmail.com; helo=NAM04-MW2-obe.outbound.protection.outlook.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) K=C3=A9vin Le Gouguec writes: > > Mmm, project.el is released on ELPA as a :core package; IIUC it strives > for backward-compatibility as far back as Emacs 26.1 > (cf. Package-Requires field at the top of the file), so maybe it's a bit > early to use format-prompt there? > > Apologies if I'm misunderstanding something. Hi Kevin, Thanks for pointing it out. I just searched for the current source tree of master branch for ocurrences of "(default %s)", so I am not sure if I changed some package that shouldn't be update. If so, I will promptly update the patch. Perhaps project.el could use a similar fallback that exists on cperl-mode.el (commit 3a95f4fc12df0a570ad413e099a22bf901b7346d): ;; Available in Emacs 28: format-prompt (defalias 'cperl--format-prompt (if (fboundp 'format-prompt) 'format-prompt (lambda (msg default) (if default (format "%s (default %s): " msg default) (concat msg ": "))))) From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 21 14:57:15 2021 Received: (at 47286) by debbugs.gnu.org; 21 Mar 2021 18:57:15 +0000 Received: from localhost ([127.0.0.1]:55500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lO3GF-00071f-H4 for submit@debbugs.gnu.org; Sun, 21 Mar 2021 14:57:15 -0400 Received: from mail-wr1-f48.google.com ([209.85.221.48]:39693) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lO3GC-00071N-Bt for 47286@debbugs.gnu.org; Sun, 21 Mar 2021 14:57:14 -0400 Received: by mail-wr1-f48.google.com with SMTP id e18so14439642wrt.6 for <47286@debbugs.gnu.org>; Sun, 21 Mar 2021 11:57:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=aYwj0XvP9mfCO5TcQIkblQpvVMn6cHgwCEWV5FBATvY=; b=oZNrrcdcpbvsI+gyZzwtwY7ZaLTpfa+PsNBUdl//EW4r6qnlTqzbrsN9m0Pxq936D/ eGBwDHSMO2QWWjS9FklkJBlcU53P7CSFge08apYsy4KZ2e0nky6SLxBsQHpaShuScWLK GhTiJvtkq6mTfYLMAPXuCC2bHQSyYuCtQE84K6dhOqfB+RkdcmSaHHa2VyCmdhIFrNKb 54/iTPMzm6rHmPx6xwcKRzCbABCWmZsthiB90HvmYl+rhnyggKkAX9HPkb4hLn1psWtk iry+OcFivBkqR2uFQrz4PyM7ACDxj4XUYDDcbaUCz4fcdWyDrbBAFtwtv6StUSvqSJwl vxcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=aYwj0XvP9mfCO5TcQIkblQpvVMn6cHgwCEWV5FBATvY=; b=RcnvSC1VxHiL0KXPLop4KDNmygkN7GwoozlYMIwjJd8eBv2SL/qn+lmGqo0noZw97t EEIa2/TyOkMqVBY7NaoTna7vePn3XKJaeXHHS2EHH4WIn94cQ7a7VqNxytrpLdse8J35 y4i45KEvHQYsMnAxNi0Wdhi3hGOB4qzg4XOQIFs9ko2lAyT6P7BPAN+g7wnIQEiqD55T 6NKX0xSoJ5TgF8unpv84TFVnk3OOrWT3GflHDhN7Jks2t4dd2lHuzNy0Q5yqtpvhBCff CAd5fYavKrGqRqpTMnr0Dz+21Mi20NhOF6XD8vDdK0LlvLKO2KYpfu7N/aXf81uqcof0 pwtw== X-Gm-Message-State: AOAM530JlJqnz1oFR0Z2V49nZksJJRA9aPJR8C5RUAIHK55PNRplJs1B 5cMD0DfLzF/pjaEch5y6+8NYAwwAKdE= X-Google-Smtp-Source: ABdhPJzF4hYei8GXCcaVzreQN7yoHQrxIsIPPDb8NAoxu5S/DnKgB9WiVTduMy9RWOl4ZyhovfAxFg== X-Received: by 2002:a5d:560e:: with SMTP id l14mr14584147wrv.10.1616353026459; Sun, 21 Mar 2021 11:57:06 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id p6sm16433995wru.2.2021.03.21.11.57.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 21 Mar 2021 11:57:06 -0700 (PDT) Subject: Re: bug#47286: 28.0.50; [PATCH] Replace "(default %s)" with 'format-prompt' To: Gabriel , 47286@debbugs.gnu.org References: <87o8fc1p1q.fsf@gmail.com> From: Dmitry Gutov Message-ID: <2454249f-5987-8f04-a58e-0596f572bb0e@yandex.ru> Date: Sun, 21 Mar 2021 20:57:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 47286 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 21.03.2021 20:31, Gabriel wrote: > Thanks for pointing it out. I just searched for the current source tree > of master branch for ocurrences of "(default %s)", so I am not sure if I > changed some package that shouldn't be update. If so, I will promptly > update the patch. > > Perhaps project.el could use a similar fallback that exists on > cperl-mode.el (commit 3a95f4fc12df0a570ad413e099a22bf901b7346d): > > ;; Available in Emacs 28: format-prompt > (defalias 'cperl--format-prompt > (if (fboundp 'format-prompt) 'format-prompt > (lambda (msg default) > (if default (format "%s (default %s): " msg default) > (concat msg ": "))))) Sounds reasonable to me. Also note that project--completing-read-strict includes as (string-equal default "") check added in 2be537e64. Perhaps format-prompt could use it as well. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 21 20:03:31 2021 Received: (at submit) by debbugs.gnu.org; 22 Mar 2021 00:03:31 +0000 Received: from localhost ([127.0.0.1]:55715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lO82c-000615-MC for submit@debbugs.gnu.org; Sun, 21 Mar 2021 20:03:30 -0400 Received: from lists.gnu.org ([209.51.188.17]:34282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lO82Y-00060u-Gb for submit@debbugs.gnu.org; Sun, 21 Mar 2021 20:03:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37058) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lO82X-0000OS-Pg for bug-gnu-emacs@gnu.org; Sun, 21 Mar 2021 20:03:26 -0400 Received: from mail-mw2nam10olkn2104.outbound.protection.outlook.com ([40.92.42.104]:3810 helo=NAM10-MW2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lO82V-0005vR-Rb for bug-gnu-emacs@gnu.org; Sun, 21 Mar 2021 20:03:25 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QhZ3l6wmk5oYaV3cOH1tcH9ZrzDw7CvHVSLmWCOuCQSpH6FDkx+H862wn+G5ex/VxGP0QX1l48KExC4DkJiZ87sJhi4yhgk42WvvZadbcG2CYkw80v6YH6Tl7ECXfPDK3I6rTL8gXmFJ1CJ0w3Dfmom9QbiRR9HqIAvEWsIVyllMhMFUChsS5RMz8Hwju00uc7PEgPo2NSaP2WFqdxP1NH5O9h9YQHAZEd6iyTsIzt6RXvR0cGK/y+n+vuXGpUSUAOM6LwbncIl1wcFakSAbhKS+L3Zf1G6/ftgTsMakXQjJ6jkzPFu9JavOmlBFFmct3DuZmKdm2yca6HYmDoNG8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kF8VusoktH2VROaBO6Jo6pFr89EOJIQ2TxpM4OMqc3U=; b=ggMwlVYPskdPD7i1Qpj0c1x80omo4WtlRRT0Z7ppIUDJQxXrpzR/WqMU9/sHYbWAdQ21tdcz1eUKOO/j723LWwvkxA4CedItfm7qmw88HbwNjBfTZ09re3ESrvb/YDE6aCX94LBzfjunr2y2rCxwgYV1WMw6q5IL6SjOweGQBZjzzqZ4I2ID/VDLIAaj5FZJXX41p+YOsI4+DfVDx17vquVnwjMX0AFGLwEMx/xb9+HLzX/3OebgoGl4DBviOCGFxZQyj+LPzP8YwvNg7a7N2fgN/ngcHP8oJ7UaQZRJVUAs/yLGBTrpj7GVCdSQ/AbmvMS6PqIclw3y4jtrmFGzyA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kF8VusoktH2VROaBO6Jo6pFr89EOJIQ2TxpM4OMqc3U=; b=FKNFb+haJsUWwzcncVPTRgHkZyPUm0Fl1nKfAFZcgKz4sn7g6kPmMy2cpDIy61UwioaPbwhzGUzh3C8qSiI0noMf9W8uz1Q0iqZ+Hq5TkwLXoL1tIj/6AD8+VOZYAsLNEPFD4BuiqZwWNXq5Jmno0zSe0U8ZcLMFrtrKCvHkfZlBanywnTVhJnwh8pFKRd65BlCZiDO9I/NsTasmudkffx5EKZRicdCrgis6TCgYXn2dOQnsoAF4sLowtMXUyFR44r/fBPFtC6SnuZe/uLL+LxmUNyIfcB7Mhr0W0zrB+MHGKlmkO0y1NVp2YdaOe0tQrK8HQmIkNMo5ybMzJctKSA== Received: from MW2NAM10FT024.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e87::42) by MW2NAM10HT100.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e87::312) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18; Mon, 22 Mar 2021 00:03:21 +0000 Received: from CH2PR01MB5879.prod.exchangelabs.com (2a01:111:e400:7e87::44) by MW2NAM10FT024.mail.protection.outlook.com (2a01:111:e400:7e87::455) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18 via Frontend Transport; Mon, 22 Mar 2021 00:03:21 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:26D1AD210F532D607E14F9FC12BE2850047E5AC304B447B42B78053C2C0BA924; UpperCasedChecksum:346B7EDEF51D945A44C50F056C5D2A1DD5174187DE33352BEF2B4681FDC18AAD; SizeAsReceived:7683; Count:45 Received: from CH2PR01MB5879.prod.exchangelabs.com ([fe80::592f:9a58:d8cd:d9c9]) by CH2PR01MB5879.prod.exchangelabs.com ([fe80::592f:9a58:d8cd:d9c9%7]) with mapi id 15.20.3955.025; Mon, 22 Mar 2021 00:03:20 +0000 From: Gabriel To: bug-gnu-emacs@gnu.org Subject: Re: bug#47286: 28.0.50; [PATCH] Replace "(default %s)" with 'format-prompt' References: <87o8fc1p1q.fsf@gmail.com> <2454249f-5987-8f04-a58e-0596f572bb0e@yandex.ru> Date: Sun, 21 Mar 2021 21:03:15 -0300 In-Reply-To: <2454249f-5987-8f04-a58e-0596f572bb0e@yandex.ru> (Dmitry Gutov's message of "Sun, 21 Mar 2021 20:57:04 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Content-Type: text/plain X-TMN: [Er6CnTtOVGtWo2gMyxFLSZDsIOpbBvBSGwYOPtGfR16gOueerkBDW0t+TOlwwfHD] X-ClientProxiedBy: CP3P284CA0107.BRAP284.PROD.OUTLOOK.COM (2603:10d6:103:6f::22) To CH2PR01MB5879.prod.exchangelabs.com (2603:10b6:610:3c::12) X-Microsoft-Original-Message-ID: <87r1k8qcl8.fsf@hotmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from precision5540 (2804:431:c7f3:ee67:60a0:ed63:b5e6:b5cb) by CP3P284CA0107.BRAP284.PROD.OUTLOOK.COM (2603:10d6:103:6f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18 via Frontend Transport; Mon, 22 Mar 2021 00:03:19 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 45 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: e4863f2a-a358-4654-638b-08d8ecc5e6f2 X-MS-TrafficTypeDiagnostic: MW2NAM10HT100: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: e5SSOYNatvHPfiwn1veWG+fgcF2tF1wgts8D85ni2diG2q09z673tgHK88+SibbWUXZ+stVuLlL/q8yQZjtR7Y7Q1E1etTLFDnAFmlc+/rNBYC3T1n0vh71BYfbygXzWuj+rDU6IqV25rT+szYmE1g5ojzFN55d4KvrhKThwdv+eO+/viQGgICJ6w0zQ92Ong1fDFz3ncx8qLfLRZRcjCC3PkOSQG0IzAXj7wb6mbr1Mp7L/dpa2ONmp5B9llz9XXRgi5TugFfmxph/AtAJiAGdCJL6MbGx/+m4p9hFe4YV9bkkTxToVaeqg6lr4F+56Xnrdeol+Mtw6UapfwtZYQ+dfkDsQXOHexi65fb4+L76HzMUwQXIR2+8WbNG3/5TqgbQp3ncVxPNGCfLa6y496Q== X-MS-Exchange-AntiSpam-MessageData: bqOZSs2PwaDSkIlhNNt7MQX0a6QVwksGPUJSKV2UIC1xxRSdlpvu6rg/TQ3iH2pNJ47SNEwgicg7BZzqXg7naOY8Fv0SJEqb/6LGaxY9+BbWZ690vXOhJhUMOyt3H487Xc/0cdTRe1nKTfoBx6EuYvUR0of4GB3btmF0m9GsYV0RIm2MZeObZuxsi7Uo9ZEcw0KN6oQKKw5exCUAVxaTRg== X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-Network-Message-Id: e4863f2a-a358-4654-638b-08d8ecc5e6f2 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Mar 2021 00:03:20.6169 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: MW2NAM10FT024.eop-nam10.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2NAM10HT100 Received-SPF: pass client-ip=40.92.42.104; envelope-from=gabriel376@hotmail.com; helo=NAM10-MW2-obe.outbound.protection.outlook.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) Dmitry Gutov writes: > Also note that project--completing-read-strict includes as (string-equal default > "") check added in 2be537e64. > > Perhaps format-prompt could use it as well. Do you mean to add a new check to 'format-prompt' to consider an empty DEFAULT as nil, e.g., to not show it on minibuffer prompt in case the value of the DEFAULT argument is an empty string ? Also, maybe another useful check for 'format-prompt' would remove the ": " suffix from the PROMPT argument, to avoid displaying something like "prompt: : ", which could avoid regressions when migrating existing code. Example of the new 'format-prompt': (defun format-prompt (prompt default &rest format-args) "Format PROMPT with DEFAULT according to `minibuffer-default-prompt-format'. If FORMAT-ARGS is nil, PROMPT is used as a plain string. If FORMAT-ARGS is non-nil, PROMPT is used as a format control string, and FORMAT-ARGS are the arguments to be substituted into it. See `format' for details. If DEFAULT is a list, the first element is used as the default. If not, the element is used as is. If DEFAULT is nil or an empty string, no \"default value\" string is included in the return value." (let* ((suffix ": ") (prompt (if (string-suffix-p suffix prompt) (substring prompt 0 (* -1 (length suffix))) prompt)) (default (if (equal "" default) nil default)) (formatted-prompt (if (null format-args) prompt (apply #'format prompt format-args))) (formatted-default (and default (format minibuffer-default-prompt-format (if (consp default) (car default) default))))) (concat formatted-prompt formatted-default suffix))) From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 21 20:49:08 2021 Received: (at 47286) by debbugs.gnu.org; 22 Mar 2021 00:49:08 +0000 Received: from localhost ([127.0.0.1]:55733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lO8kl-00077y-SU for submit@debbugs.gnu.org; Sun, 21 Mar 2021 20:49:08 -0400 Received: from mail-wr1-f44.google.com ([209.85.221.44]:34443) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lO8kj-00077T-D1 for 47286@debbugs.gnu.org; Sun, 21 Mar 2021 20:49:06 -0400 Received: by mail-wr1-f44.google.com with SMTP id j7so14929132wrd.1 for <47286@debbugs.gnu.org>; Sun, 21 Mar 2021 17:49:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=fVsqWli98bTFMVKVzxoPo8CFzuF8EL0TTgl9s3UiUpk=; b=NYIY7XEyGtHf5eTiPNEnT+drZxRS7kv/Rf46tbnVXYvpAyEuGqHbCyWmNCITD12vqg 7WUFcM6Kv5DHU0G8Mskw7MNN2q9UIfjfbAXtkZKQiHGVNYqwvjcwdNQt9KzUGdemPhKY ubU8+hGDp65t2ltqlbM+IQtxhBkMOF0De7qDmoC7UW08iRDV1dZHKACG0eYEXIF/41JB UEOgbQWxC0/W7yweExs7tS8x+6vq4pAIskpGkw7p2NupLvxJoYpWE7USWZM4s8/vgQPX dri8oFWom/0ohOz3YN0ZbmeSYBBbuhOK7wZwe24FJs0usYwI1l7QqSlq5rgob19eKv70 JOaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=fVsqWli98bTFMVKVzxoPo8CFzuF8EL0TTgl9s3UiUpk=; b=Ap6jTXJNk4g+HAWfuYElnQM0C5bwZNvugX7/G1Qda9tWSYh5neP0zA7ZJL+i35yUwE iPlUxf4gq9zi7WPZbJZ6DUsCeQ++AJ3KUKEN9LdapRVeVXdfYqrJ0gyi4+5lbH+RANj1 7hCAIXNt82Vx6sCbYgFharE+SE1udg7csSEDXhQKxSJKDpbn6uS+NLxuvEStlUpd8liA d5Lvtvm/Cw3qt9VrwnY5bVGopcqmFHD6RUya1RlV7Vq7Oh3DXkOzxzFE6FPE9gWjA8ZR Y5J+A45JmhdtG2TfdCYh5gaR5udNci0ehx8uR+uZ7gSIYkyStTUcw/06w2Yq1L8guRDL HUKw== X-Gm-Message-State: AOAM531KZz+yhfR4/t1qC3nnXD3yGKVLbw7vcfSDP5vDMIwclZrhx0Tg YVaECH+Cxw8gjWoFzqNgwsAyu3Q//aU= X-Google-Smtp-Source: ABdhPJxMJ9Rr+u25FNDuDw2I4HNMEYKU71pXHf6e8MDRLjlvhFg6Z5Z5O+XfOInIPWoaqrYgI64Ujw== X-Received: by 2002:a5d:63c8:: with SMTP id c8mr15263137wrw.299.1616374139511; Sun, 21 Mar 2021 17:48:59 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id b12sm7478646wrf.39.2021.03.21.17.48.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 21 Mar 2021 17:48:58 -0700 (PDT) Subject: Re: bug#47286: 28.0.50; [PATCH] Replace "(default %s)" with 'format-prompt' To: Gabriel , 47286@debbugs.gnu.org References: <87o8fc1p1q.fsf@gmail.com> <2454249f-5987-8f04-a58e-0596f572bb0e@yandex.ru> From: Dmitry Gutov Message-ID: <0c74e9b8-1100-30a4-f229-81c859a8ee2d@yandex.ru> Date: Mon, 22 Mar 2021 02:48:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 47286 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 22.03.2021 02:03, Gabriel wrote: > Dmitry Gutov writes: >> Also note that project--completing-read-strict includes as (string-equal default >> "") check added in 2be537e64. >> >> Perhaps format-prompt could use it as well. > > Do you mean to add a new check to 'format-prompt' to consider an empty > DEFAULT as nil, e.g., to not show it on minibuffer prompt in case the > value of the DEFAULT argument is an empty string ? Yup. > Also, maybe another useful check for 'format-prompt' would remove the > ": " suffix from the PROMPT argument, to avoid displaying something like > "prompt: : ", which could avoid regressions when migrating existing > code. My (weak) preference would be on "no": whether the prompt is showing an extra ":" should be apparent from very brief testing of the code. It's not like it will show up only if DEFAULT is non-nil, for instance. So no need to complicate the implementation. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 22 15:06:49 2021 Received: (at 47286) by debbugs.gnu.org; 22 Mar 2021 19:06:49 +0000 Received: from localhost ([127.0.0.1]:58682 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOPt2-0006s4-Vd for submit@debbugs.gnu.org; Mon, 22 Mar 2021 15:06:49 -0400 Received: from quimby.gnus.org ([95.216.78.240]:46108) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOPt1-0006rq-Vx for 47286@debbugs.gnu.org; Mon, 22 Mar 2021 15:06:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=VEbgAXW+ruEtszZR1uBPOCk5v8Iv92F7G8PNs4mx+mY=; b=owgonA7eUUKAMqBoABNAExKtH7 gka0Se4nmFQVu9y+j9mm+5kvuHTTdqKvuk0a3/yAW8njwVQIpLjVxSLoRdaDE+TwLrHPh/9VXGSgX F21oOjzv8o+Kc/2IZNi2Uka3eC8ah/KypYjq/ZG7otskJwvnwPcHnJSXwy5V2YwOo0jY=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lOPst-0000iW-2q; Mon, 22 Mar 2021 20:06:41 +0100 From: Lars Ingebrigtsen To: Gabriel Subject: Re: bug#47286: 28.0.50; [PATCH] Replace "(default %s)" with 'format-prompt' References: <87o8fc1p1q.fsf@gmail.com> X-Now-Playing: Tuxedomoon's _Holy Wars_: "In a manner of speaking" Date: Mon, 22 Mar 2021 20:06:37 +0100 In-Reply-To: (Gabriel's message of "Sun, 21 Mar 2021 15:31:29 -0300") Message-ID: <8735wnhute.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Gabriel writes: > Thanks for pointing it out. I just searched for the current source tree > of master branch for ocurrences of "(default %s)", so I am not sure if I > changed some package that shouldn't be update. If [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47286 Cc: 47286@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Gabriel writes: > Thanks for pointing it out. I just searched for the current source tree > of master branch for ocurrences of "(default %s)", so I am not sure if I > changed some package that shouldn't be update. If so, I will promptly > update the patch. The files that have a line like ;; Package-Requires: ((emacs "26.1") (xref "1.0.2")) or similar should be handled with more care, yes -- they have to be backwards-compatible, and `format-prompt' is new in Emacs 28. So if you could re-spin the patch without changes to files like that, I'll get it applied (it looks good otherwise). There are some packages that are maintained for older Emacs versions, too, but we unfortunately have no markup to say that explicitly. Looking over the list, I think this affects only these two files, and should also be removed from the patch: lisp/progmodes/cc-styles.el lisp/progmodes/verilog-mode.el -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 22 23:48:17 2021 Received: (at submit) by debbugs.gnu.org; 23 Mar 2021 03:48:17 +0000 Received: from localhost ([127.0.0.1]:59230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOY1f-0000ZT-Gv for submit@debbugs.gnu.org; Mon, 22 Mar 2021 23:48:16 -0400 Received: from lists.gnu.org ([209.51.188.17]:47056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOY1b-0000ZK-KW for submit@debbugs.gnu.org; Mon, 22 Mar 2021 23:48:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52236) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOY1a-0002oY-Sa for bug-gnu-emacs@gnu.org; Mon, 22 Mar 2021 23:48:11 -0400 Received: from mail-dm6nam10olkn2035.outbound.protection.outlook.com ([40.92.41.35]:12636 helo=NAM10-DM6-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOY1V-0008Nz-Ku for bug-gnu-emacs@gnu.org; Mon, 22 Mar 2021 23:48:10 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W+Kl3t1WII2rMx1JTxKeIrhFVDIyyIPSGNJ4wwFRt6Jl93uAyIwaCqrw1Rt13VCTwSPVTe4E8+Cp86bAPevvOPotTWpgOJOso3DwMa9kLkbD3f4jpceLrgxTsSIHmlzIaxrn6AkEmGk9/HmeYb4z/9JIpEIlIPkR4gdFIYqbkGEjg7xFBdH+IMM3by2uVyfyFcfGoss7l4rhQ33JJZoCWI8FsU8focjRtMZcE6vxqPBIGiU/2bV/5Ex9JnVL8WKyiGAvKAKZBECkNYM7Ig81+7MDBkLz4clE6jbJ3f/M6kTnNmWWwFxoMggspmMD+UUIQ2qQp7LujTp9pGZ5JkurtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yM9oNTWrC8yWMTXoNuJOSndwe6rfH4Ml8I7zwLwPc3U=; b=lxTI5ML5OCiN1BespNwbA21GSl/kQJXR9R8SichFFNco1EibOgxlmGkOexeU927LWh+IU6hXYhIwMEk/Ln6Q066rbQrojG/AAqIgUHELOGEcFytoVbA9b0nHcq044MqY5wpLLsA9Vh6DinsxAudem3pFshIxfly55Z9mnu5ptoyJEjrkoXY4yd9QAucm4fX9kFpwfgDxXaco7App9HHoTzS7QafVVi37JimKEZ7zAqQ6zdgvUn2d2GzEhJ7abjZTNNUAfL/maKS/fRwZTcWAMuW5jmai+811dtTRFcXHHr7MJtrgdSizc9fCEC6VwlK08UrxzchFutHGxYqdW6HTJg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yM9oNTWrC8yWMTXoNuJOSndwe6rfH4Ml8I7zwLwPc3U=; b=EUJUPzq1OkGcqmhci6KO1zofKV1wXU89E1X0jlgjFn26/ZNNUriGFNitbMqgx+8vcGWAgNA6il+6lX5wHisTXJ7FMRAutnVRH+xizAytkuzucyzeDCKBzGoFKA46JkkVPDGUgKbw/svtOHrR0Ybv1bea0AIf/maYp7qNQD2NZMt3z64VcBnjo2BegUxl61eHGbJ/fUOV1eFAc5LzPAQU2k2Aa/kOU05nLCFy7Pfu5U/+2ycVBP0aojJStiwz4vk4f7H0MPMup1b8y9ejsvY17L6tSGDIYca6rnIxnD3F9cVjhCYkFWiNk9GVa8jFLMWjRywB51KAACXcd6kw7jZBCA== Received: from BN7NAM10FT020.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e8f::43) by BN7NAM10HT192.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e8f::468) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18; Tue, 23 Mar 2021 03:48:01 +0000 Received: from CH2PR01MB5879.prod.exchangelabs.com (2a01:111:e400:7e8f::4e) by BN7NAM10FT020.mail.protection.outlook.com (2a01:111:e400:7e8f::111) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18 via Frontend Transport; Tue, 23 Mar 2021 03:48:01 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:9BCA299C0A2F3E2ED1399E3F42C960AF4DF9B30663B2443CCE5CABA13C4F8ED7; UpperCasedChecksum:7E8C1E76DCB39AE825A8DC3A3F1DC85F9DFF430546BFE7C50B56D43B0CF1C243; SizeAsReceived:7635; Count:45 Received: from CH2PR01MB5879.prod.exchangelabs.com ([fe80::592f:9a58:d8cd:d9c9]) by CH2PR01MB5879.prod.exchangelabs.com ([fe80::592f:9a58:d8cd:d9c9%7]) with mapi id 15.20.3955.025; Tue, 23 Mar 2021 03:48:01 +0000 From: Gabriel To: bug-gnu-emacs@gnu.org Subject: Re: bug#47286: 28.0.50; [PATCH] Replace "(default %s)" with 'format-prompt' References: <87o8fc1p1q.fsf@gmail.com> <8735wnhute.fsf@gnus.org> Date: Tue, 23 Mar 2021 00:47:55 -0300 In-Reply-To: <8735wnhute.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 22 Mar 2021 20:06:37 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Content-Type: multipart/mixed; boundary="=-=-=" X-TMN: [G8/wX3bvm0vNfJ1L+Jvlc0J61bIxzdwR+Q6+0p77/jWMyXZ5S3kthGqmKgBmF7Xb] X-ClientProxiedBy: CPYP284CA0050.BRAP284.PROD.OUTLOOK.COM (2603:10d6:103:81::19) To CH2PR01MB5879.prod.exchangelabs.com (2603:10b6:610:3c::12) X-Microsoft-Original-Message-ID: <87ft0msf84.fsf@hotmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from precision5540 (2804:431:c7f3:ee67:7c97:80e4:fd3:7915) by CPYP284CA0050.BRAP284.PROD.OUTLOOK.COM (2603:10d6:103:81::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18 via Frontend Transport; Tue, 23 Mar 2021 03:47:58 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 45 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: e76493ee-69e9-4241-57ba-08d8edae7374 X-MS-TrafficTypeDiagnostic: BN7NAM10HT192: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: L6GLkfzHciAxpkaXi8U8uPFAFZaEsQxwMfAaAl3oJLGO+pjL6Nwg71q98ZLJrIWtkIa5DpYU8s80PBuQsbOm66ISyFl6nNX0Q72TQz3hqj0Mq/gKc8zf9c8DsGB1ZPKeEE0DNtCYYf/vFz27rpwqIlKRSJYPtTDcNV5HDR0iBVJ4VWcFqwLLfO+7/vNsVRErVgWodx71Uv+MkwewSh6qfZ59Yhp86MiEf3Tmr9BhtlAc4Qn0dNrBsWnb9JMltcOAEARRzEOR/qkpbperyt7AE2lI6PvhSHFdmvznJzqZC48TtxhcewuBr8KMwoF40kOBKmut3+ggag2VqwzGXe9sbfa47uE9clcZ7g4DXzf2dNoQgFznVgtf97dL3xcEXoMrFmNNZmaBYCL4uGy0JkmvLw== X-MS-Exchange-AntiSpam-MessageData: 6yr9quIVT/gOs2UWvdORl+Ls84Y8p+/INGbyR9jdoD4ZFYHDKbYpzIxKJpD4jNiApuF8LEWTM0LFsDKq8+sr+NNrX4JCGPL7yieiZsZNq9N1HVcEGZH3GLe6QaZpR8VWMMJKr8xdyvxXrCpaBT2Bm6P49RNek6VZCKYOOkImwOJ7aPlySIUHDwDo07auqm2EGk/6CnmfYrS82ihX5sjx2w== X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-Network-Message-Id: e76493ee-69e9-4241-57ba-08d8edae7374 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Mar 2021 03:48:01.6456 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: BN7NAM10FT020.eop-nam10.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7NAM10HT192 Received-SPF: pass client-ip=40.92.41.35; envelope-from=gabriel376@hotmail.com; helo=NAM10-DM6-obe.outbound.protection.outlook.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) --=-=-= Content-Type: text/plain > > The files that have a line like > > ;; Package-Requires: ((emacs "26.1") (xref "1.0.2")) > > or similar should be handled with more care, yes -- they have to be > backwards-compatible, and `format-prompt' is new in Emacs 28. So if you > could re-spin the patch without changes to files like that, I'll get it > applied (it looks good otherwise). > > There are some packages that are maintained for older Emacs versions, > too, but we unfortunately have no markup to say that explicitly. > Looking over the list, I think this affects only these two files, and > should also be removed from the patch: > > lisp/progmodes/cc-styles.el > lisp/progmodes/verilog-mode.el Hi Lars, Thanks so much for your review. Here is an updated patch that removes the mentioned files (project.el, cc-styles.el and verilog-mode.el) and updates the 'format-prompt' function with the suggestion from Dmitry Gutov to consider an empty DEFAULT as nil. Let me know if something could be improved. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Replace-default-s-with-format-prompt.patch >From 396112bddddbb27df17c812d0e5d211098a3638b Mon Sep 17 00:00:00 2001 From: Gabriel do Nascimento Ribeiro Date: Mon, 22 Mar 2021 20:46:02 -0300 Subject: [PATCH] Replace "(default %s)" with 'format-prompt' * lisp/cmuscheme.el (scheme-load-file, scheme-compile-file): * lisp/comint.el (comint-get-source): * lisp/emulation/viper-cmd.el (viper-quote-region, viper-kill-buffer) (viper-query-replace, viper-read-string-with-history): * lisp/eshell/esh-mode.el (eshell-find-tag): * lisp/gnus/gnus-sum.el (gnus-articles-to-read) (gnus-summary-search-article-forward) (gnus-summary-search-article-backward): * lisp/international/mule-cmds.el (set-input-method, toggle-input-method) (describe-input-method, set-language-environment) (describe-language-environment): * lisp/mh-e/mh-gnus.el (mh-mml-minibuffer-read-disposition): * lisp/mh-e/mh-letter.el (mh-insert-letter): * lisp/mh-e/mh-mime.el (mh-display-with-external-viewer) (mh-mime-save-parts, mh-mh-forward-message) (mh-mml-query-cryptographic-method, mh-minibuffer-read-type): * lisp/mh-e/mh-seq.el (mh-read-seq, mh-read-range): * lisp/mh-e/mh-utils.el (mh-prompt-for-folder): * lisp/progmodes/etags.el (find-tag-tag): (find-tag-noselect, find-tag, find-tag-other-window) (find-tag-other-frame, find-tag-regexp): * lisp/progmodes/idlwave.el (idlwave-find-module): * lisp/progmodes/inf-lisp.el (lisp-load-file, lisp-compile-file): * lisp/progmodes/tcl.el (tcl-load-file, tcl-restart-with-file): * lisp/progmodes/xref.el (xref--read-identifier): (xref-find-definitions, xref-find-definitions-other-window) (xref-find-definitions-other-frame, xref-find-references): * lisp/ses.el (ses-read-printer): (ses-read-cell-printer, ses-read-column-printer) (ses-read-default-printer, ses-define-local-printer): * lisp/subr.el (read-number): * lisp/term.el (term-get-source): * src/minibuf.c (read-buffer): Remove prompt suffix and use 'format-prompt'. * lisp/minibuffer.el (format-prompt): Ignore DEFAULT empty strings. --- lisp/cmuscheme.el | 4 ++-- lisp/comint.el | 6 ++---- lisp/emulation/viper-cmd.el | 31 ++++++++++++------------------- lisp/eshell/esh-mode.el | 2 +- lisp/gnus/gnus-sum.el | 31 ++++++++++++++----------------- lisp/international/mule-cmds.el | 10 +++++----- lisp/mh-e/mh-gnus.el | 2 +- lisp/mh-e/mh-letter.el | 5 +---- lisp/mh-e/mh-mime.el | 20 +++++++------------- lisp/mh-e/mh-seq.el | 16 +++++----------- lisp/mh-e/mh-utils.el | 7 +++---- lisp/minibuffer.el | 5 +++-- lisp/progmodes/etags.el | 16 ++++++---------- lisp/progmodes/idlwave.el | 2 +- lisp/progmodes/inf-lisp.el | 4 ++-- lisp/progmodes/tcl.el | 4 ++-- lisp/progmodes/xref.el | 15 +++++---------- lisp/ses.el | 12 +++++------- lisp/subr.el | 4 ++-- lisp/term.el | 6 ++---- src/minibuf.c | 4 ++-- 21 files changed, 83 insertions(+), 123 deletions(-) diff --git a/lisp/cmuscheme.el b/lisp/cmuscheme.el index 772891d5d3..d43cdb15c0 100644 --- a/lisp/cmuscheme.el +++ b/lisp/cmuscheme.el @@ -421,7 +421,7 @@ scheme-prev-l/c-dir/file (defun scheme-load-file (file-name) "Load a Scheme file FILE-NAME into the inferior Scheme process." - (interactive (comint-get-source "Load Scheme file: " scheme-prev-l/c-dir/file + (interactive (comint-get-source "Load Scheme file" scheme-prev-l/c-dir/file scheme-source-modes t)) ; t because `load' ; needs an exact name (comint-check-source file-name) ; Check to see if buffer needs saved. @@ -433,7 +433,7 @@ scheme-load-file (defun scheme-compile-file (file-name) "Compile a Scheme file FILE-NAME in the inferior Scheme process." - (interactive (comint-get-source "Compile Scheme file: " + (interactive (comint-get-source "Compile Scheme file" scheme-prev-l/c-dir/file scheme-source-modes nil)) ; nil because COMPILE doesn't diff --git a/lisp/comint.el b/lisp/comint.el index 65072b0137..b04d404676 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -2946,7 +2946,7 @@ comint-get-source then the filename reader will only accept a file that exists. A typical use: - (interactive (comint-get-source \"Compile file: \" prev-lisp-dir/file + (interactive (comint-get-source \"Compile file\" prev-lisp-dir/file \\='(lisp-mode) t))" (let* ((def (comint-source-default prev-dir/file source-modes)) (stringfile (comint-extract-string)) @@ -2959,9 +2959,7 @@ comint-get-source (car def))) (deffile (if sfile-p (file-name-nondirectory stringfile) (cdr def))) - (ans (read-file-name (if deffile (format "%s(default %s) " - prompt deffile) - prompt) + (ans (read-file-name (format-prompt prompt deffile) defdir (concat defdir deffile) mustmatch-p))) diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index 42d6c1eb19..728f790a96 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el @@ -1786,7 +1786,7 @@ viper-quote-region (do-not-change-default t)) (setq quote-str (viper-read-string-with-history - "Quote string: " + "Quote string" nil 'viper-quote-region-history ;; FIXME: Use comment-region. @@ -1995,24 +1995,17 @@ viper-read-string-with-history #'viper-minibuffer-standard-hook (if (or (not (listp old)) (eq (car old) 'lambda)) (list old) old)))) - (val "") - (padding "") - temp-msg) + (val "")) (setq keymap (or keymap minibuffer-local-map) initial (or initial "") - viper-initial initial - temp-msg (if default - (format "(default %s) " default) - "")) + viper-initial initial) (setq viper-incomplete-ex-cmd nil) - (setq val (read-from-minibuffer prompt - (concat temp-msg initial val padding) - keymap nil history-var)) - (setq minibuffer-setup-hook nil - padding (viper-array-to-string (this-command-keys)) - temp-msg "") + (setq val (read-from-minibuffer (format-prompt prompt default) + nil + keymap nil history-var default)) + (setq minibuffer-setup-hook nil) ;; the following tries to be smart about what to put in history (if (not (string= val (car (symbol-value history-var)))) (push val (symbol-value history-var))) @@ -3825,7 +3818,7 @@ viper-kill-buffer (let (buffer buffer-name) (setq buffer-name (funcall viper-read-buffer-function - (format "Kill buffer (%s): " + (format-prompt "Kill buffer" (buffer-name (current-buffer))))) (setq buffer (if (null buffer-name) @@ -4171,8 +4164,8 @@ viper-query-replace (interactive) (let (str) (setq str (viper-read-string-with-history - (if viper-re-query-replace "Query replace regexp: " - "Query replace: ") + (if viper-re-query-replace "Query replace regexp" + "Query replace") nil ; no initial 'viper-replace1-history (car viper-replace1-history) ; default @@ -4187,7 +4180,7 @@ viper-query-replace (query-replace-regexp str (viper-read-string-with-history - (format-message "Query replace regexp `%s' with: " str) + (format-message "Query replace regexp `%s' with" str) nil ; no initial 'viper-replace1-history (car viper-replace1-history) ; default @@ -4195,7 +4188,7 @@ viper-query-replace (query-replace str (viper-read-string-with-history - (format-message "Query replace `%s' with: " str) + (format-message "Query replace `%s' with" str) nil ; no initial 'viper-replace1-history (car viper-replace1-history) ; default diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index d29b010ea0..f9dbce9770 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el @@ -458,7 +458,7 @@ eshell-find-tag (let ((inhibit-read-only t) (no-default (eobp)) (find-tag-default-function 'ignore)) - (setq tagname (car (find-tag-interactive "Find tag: " no-default))) + (setq tagname (car (find-tag-interactive "Find tag" no-default))) (with-suppressed-warnings ((obsolete find-tag)) (find-tag tagname next-p regexp-p)))) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 97da550353..c30f9a5f35 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -5977,14 +5977,15 @@ gnus-articles-to-read (input (read-string (if only-read-p - (format - "How many articles from %s (available %d, default %d): " - (gnus-group-real-name gnus-newsgroup-name) - number default) - (format - "How many articles from %s (%d default): " - (gnus-group-real-name gnus-newsgroup-name) - default)) + (format-prompt + "How many articles from %s (available %d)" + default + (gnus-group-real-name gnus-newsgroup-name) + number) + (format-prompt + "How many articles from %s" + default + (gnus-group-real-name gnus-newsgroup-name))) nil nil (number-to-string default)))) @@ -9514,11 +9515,9 @@ gnus-summary-search-article-forward (interactive (list (read-string - (format "Search article %s (regexp%s): " - (if current-prefix-arg "backward" "forward") - (if gnus-last-search-regexp - (concat ", default " gnus-last-search-regexp) - ""))) + (format-prompt "Search article %s (regexp)" + gnus-last-search-regexp + (if current-prefix-arg "backward" "forward"))) current-prefix-arg) gnus-summary-mode) (if (string-equal regexp "") @@ -9537,10 +9536,8 @@ gnus-summary-search-article-backward (interactive (list (read-string - (format "Search article backward (regexp%s): " - (if gnus-last-search-regexp - (concat ", default " gnus-last-search-regexp) - "")))) + (format-prompt "Search article backward (regexp)" + gnus-last-search-regexp))) gnus-summary-mode) (gnus-summary-search-article-forward regexp 'backward)) diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index e4bdf50f52..743b638d06 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -1524,7 +1524,7 @@ set-input-method (interactive (let* ((default (or (car input-method-history) default-input-method))) (list (read-input-method-name - (if default "Select input method (default %s): " "Select input method: ") + (format-prompt "Select input method" default) default t) t))) (activate-input-method input-method) @@ -1569,7 +1569,7 @@ toggle-input-method (if (or arg (not default)) (progn (read-input-method-name - (if default "Input method (default %s): " "Input method: " ) + (format-prompt "Input method" default) default t)) default)) (unless default-input-method @@ -1620,7 +1620,7 @@ describe-input-method "Describe input method INPUT-METHOD." (interactive (list (read-input-method-name - "Describe input method (default current choice): "))) + (format-prompt "Describe input method" current-input-method)))) (if (and input-method (symbolp input-method)) (setq input-method (symbol-name input-method))) (help-setup-xref (list #'describe-input-method @@ -1929,7 +1929,7 @@ set-language-environment the new language environment, it runs `set-language-environment-hook'." (interactive (list (read-language-name nil - "Set language environment (default English): "))) + (format-prompt "Set language environment" "English")))) (if language-name (if (symbolp language-name) (setq language-name (symbol-name language-name))) @@ -2144,7 +2144,7 @@ describe-language-environment (interactive (list (read-language-name 'documentation - "Describe language environment (default current choice): "))) + (format-prompt "Describe language environment" current-language-environment)))) (if (null language-name) (setq language-name current-language-environment)) (if (or (null language-name) diff --git a/lisp/mh-e/mh-gnus.el b/lisp/mh-e/mh-gnus.el index 6a9851662a..7898d7eece 100644 --- a/lisp/mh-e/mh-gnus.el +++ b/lisp/mh-e/mh-gnus.el @@ -129,7 +129,7 @@ mh-mml-minibuffer-read-disposition (unless default (setq default (mml-content-disposition type filename))) (let ((disposition (completing-read - (format "Disposition (default %s): " default) + (format-prompt "Disposition" default) '(("attachment") ("inline") ("")) nil t nil nil default))) (if (not (equal disposition "")) diff --git a/lisp/mh-e/mh-letter.el b/lisp/mh-e/mh-letter.el index f5ad73d800..107a0ae5e4 100644 --- a/lisp/mh-e/mh-letter.el +++ b/lisp/mh-e/mh-letter.el @@ -390,10 +390,7 @@ mh-insert-letter (or mh-sent-from-msg (nth 0 (mh-translate-range folder "cur"))) (nth 0 (mh-translate-range folder "cur")))) (message - (read-string (concat "Message number" - (or (and default - (format " (default %d): " default)) - ": ")) + (read-string (format-prompt "Message number" default) nil nil (if (numberp default) (int-to-string default) diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el index 70df9e6b0f..df3c711e3d 100644 --- a/lisp/mh-e/mh-mime.el +++ b/lisp/mh-e/mh-mime.el @@ -259,9 +259,7 @@ mh-display-with-external-viewer (methods (mapcar (lambda (x) (list (cdr (assoc 'viewer x)))) (mailcap-mime-info type 'all))) (def (caar methods)) - (prompt (format "Viewer%s: " (if def - (format " (default %s)" def) - ""))) + (prompt (format-prompt "Viewer" def)) (method (completing-read prompt methods nil nil nil nil def)) (folder mh-show-folder-buffer) (buffer-read-only nil)) @@ -395,9 +393,9 @@ mh-mime-save-parts ((and (or prompt (equal t mh-mime-save-parts-default-directory)) mh-mime-save-parts-directory) - (read-directory-name (format - "Store in directory (default %s): " - mh-mime-save-parts-directory) + (read-directory-name (format-prompt + "Store in directory" + mh-mime-save-parts-directory) "" mh-mime-save-parts-directory t "")) ((stringp mh-mime-save-parts-default-directory) mh-mime-save-parts-default-directory) @@ -1258,11 +1256,7 @@ mh-mh-forward-message (interactive (list (mml-minibuffer-read-description) (mh-prompt-for-folder "Message from" mh-sent-from-folder nil) - (read-string (concat "Messages" - (if (numberp mh-sent-from-msg) - (format " (default %d): " - mh-sent-from-msg) - ": "))))) + (read-string (format-prompt "Messages" mh-sent-from-msg)))) (beginning-of-line) (insert "#forw [") (and description @@ -1596,7 +1590,7 @@ mh-mml-query-cryptographic-method (if current-prefix-arg (let ((def (or (car mh-mml-cryptographic-method-history) mh-mml-method-default))) - (completing-read (format "Method (default %s): " def) + (completing-read (format-prompt "Method" def) '(("pgp") ("pgpmime") ("smime")) nil t nil 'mh-mml-cryptographic-method-history def)) mh-mml-method-default)) @@ -1731,7 +1725,7 @@ mh-minibuffer-read-type (type (or (and (not (equal probed-type "application/octet-stream")) probed-type) (completing-read - (format "Content type (default %s): " default) + (format-prompt "Content type" default) (mapcar #'list (mailcap-mime-types)))))) (if (not (equal type "")) type diff --git a/lisp/mh-e/mh-seq.el b/lisp/mh-e/mh-seq.el index e8a03f6704..4a464a3f55 100644 --- a/lisp/mh-e/mh-seq.el +++ b/lisp/mh-e/mh-seq.el @@ -390,10 +390,7 @@ mh-read-seq the NOT-EMPTY flag is non-nil, and supply an optional DEFAULT sequence. A reply of `%' defaults to the first sequence containing the current message." - (let* ((input (completing-read (format "%s sequence%s: " prompt - (if default - (format " (default %s)" default) - "")) + (let* ((input (completing-read (format-prompt "%s sequence" default prompt) (mh-seq-names mh-seq-list) nil nil nil 'mh-sequence-history)) (seq (cond ((equal input "%") @@ -646,13 +643,10 @@ mh-read-range ((stringp default) default) ((symbolp default) (symbol-name default)))) (prompt (cond ((and guess large default) - (format "%s (folder has %s messages, default %s)" - prompt (car counts) default)) - ((and guess large) - (format "%s (folder has %s messages)" - prompt (car counts))) + (format-prompt "%s (folder has %s messages)" + default prompt (car counts))) (default - (format "%s (default %s)" prompt default)))) + (format-prompt prompt default)))) (minibuffer-local-completion-map mh-range-completion-map) (seq-list (if (eq folder mh-current-folder) mh-seq-list @@ -662,7 +656,7 @@ mh-read-range (mh-seq-names seq-list))) (input (cond ((and (not ask-flag) unseen) (symbol-name mh-unseen-seq)) ((and (not ask-flag) (not large)) "all") - (t (completing-read (format "%s: " prompt) + (t (completing-read prompt 'mh-range-completion-function nil nil nil 'mh-range-history default)))) msg-list) diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el index d7c607df5c..8cb68f5cf1 100644 --- a/lisp/mh-e/mh-utils.el +++ b/lisp/mh-e/mh-utils.el @@ -758,10 +758,9 @@ mh-prompt-for-folder used in searching." (if (null default) (setq default "")) - (let* ((default-string (cond (default-string (format " (default %s)" default-string)) - ((equal "" default) "") - (t (format " (default %s)" default)))) - (prompt (format "%s folder%s: " prompt default-string)) + (let* ((default-string (or default-string + (if (equal default "") nil default))) + (prompt (format-prompt "%s folder" default-string prompt)) (mh-current-folder-name mh-current-folder) read-name folder-name) (while (and (setq read-name (mh-folder-completing-read diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 55825e32fc..1c9b268942 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -3941,13 +3941,14 @@ format-prompt If DEFAULT is a list, the first element is used as the default. If not, the element is used as is. -If DEFAULT is nil, no \"default value\" string is included in the -return value." +If DEFAULT is nil or an empty string, no \"default value\" string +is included in the return value." (concat (if (null format-args) prompt (apply #'format prompt format-args)) (and default + (length> default 0) (format minibuffer-default-prompt-format (if (consp default) (car default) diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 023c90cca5..13717b1b89 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -836,11 +836,7 @@ find-tag-tag "Read a tag name, with defaulting and completion." (let* ((completion-ignore-case (find-tag--completion-ignore-case)) (default (find-tag--default)) - (spec (completing-read (if default - (format "%s (default %s): " - (substring string 0 (string-match "[ :]+\\'" string)) - default) - string) + (spec (completing-read (format-prompt string default) (tags-lazy-completion-table) nil nil nil nil default))) (if (equal spec "") @@ -899,7 +895,7 @@ find-tag-noselect Contrast this with the ring of marks gone to by the command. See documentation of variable `tags-file-name'." - (interactive (find-tag-interactive "Find tag: ")) + (interactive (find-tag-interactive "Find tag")) (setq find-tag-history (cons tagname find-tag-history)) ;; Save the current buffer's value of `find-tag-hook' before @@ -971,7 +967,7 @@ find-tag See documentation of variable `tags-file-name'." (declare (obsolete xref-find-definitions "25.1")) - (interactive (find-tag-interactive "Find tag: ")) + (interactive (find-tag-interactive "Find tag")) (let* ((buf (find-tag-noselect tagname next-p regexp-p)) (pos (with-current-buffer buf (point)))) (condition-case nil @@ -1000,7 +996,7 @@ find-tag-other-window See documentation of variable `tags-file-name'." (declare (obsolete xref-find-definitions-other-window "25.1")) - (interactive (find-tag-interactive "Find tag other window: ")) + (interactive (find-tag-interactive "Find tag other window")) ;; This hair is to deal with the case where the tag is found in the ;; selected window's buffer; without the hair, point is moved in both @@ -1041,7 +1037,7 @@ find-tag-other-frame See documentation of variable `tags-file-name'." (declare (obsolete xref-find-definitions-other-frame "25.1")) - (interactive (find-tag-interactive "Find tag other frame: ")) + (interactive (find-tag-interactive "Find tag other frame")) (let ((pop-up-frames t)) (with-suppressed-warnings ((obsolete find-tag-other-window)) (find-tag-other-window tagname next-p)))) @@ -1065,7 +1061,7 @@ find-tag-regexp See documentation of variable `tags-file-name'." (declare (obsolete xref-find-apropos "25.1")) - (interactive (find-tag-interactive "Find tag regexp: " t)) + (interactive (find-tag-interactive "Find tag regexp" t)) ;; We go through find-tag-other-window to do all the display hair there. (funcall (if other-window 'find-tag-other-window 'find-tag) regexp next-p t)) diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index e8e55ae96d..b72d9da748 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -7820,7 +7820,7 @@ idlwave-find-module (name (idlwave-completing-read (if (or (not this-buffer) (assoc default list)) - (format "Module (Default %s): " default) + (format-prompt "Module" default) (format "Module in this file: ")) list)) type class) diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index 146ed4dca4..af6ccce3d6 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el @@ -487,7 +487,7 @@ lisp-source-modes (defun lisp-load-file (file-name) "Load a Lisp file into the inferior Lisp process." - (interactive (comint-get-source "Load Lisp file: " lisp-prev-l/c-dir/file + (interactive (comint-get-source "Load Lisp file" lisp-prev-l/c-dir/file lisp-source-modes nil)) ; nil because LOAD ; doesn't need an exact name (comint-check-source file-name) ; Check to see if buffer needs saved. @@ -500,7 +500,7 @@ lisp-load-file (defun lisp-compile-file (file-name) "Compile a Lisp file in the inferior Lisp process." - (interactive (comint-get-source "Compile Lisp file: " lisp-prev-l/c-dir/file + (interactive (comint-get-source "Compile Lisp file" lisp-prev-l/c-dir/file lisp-source-modes nil)) ; nil = don't need ; suffix .lisp (comint-check-source file-name) ; Check to see if buffer needs saved. diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el index 82e1343e05..f6a50bf1a8 100644 --- a/lisp/progmodes/tcl.el +++ b/lisp/progmodes/tcl.el @@ -1413,7 +1413,7 @@ tcl-load-file (list ;; car because comint-get-source returns a list holding the ;; filename. - (car (comint-get-source "Load Tcl file: " + (car (comint-get-source "Load Tcl file" (or (and (derived-mode-p 'tcl-mode) (buffer-file-name)) @@ -1433,7 +1433,7 @@ tcl-restart-with-file Prefix argument means switch to the Tcl buffer afterwards." (interactive (list - (car (comint-get-source "Restart with Tcl file: " + (car (comint-get-source "Restart with Tcl file" (or (and (derived-mode-p 'tcl-mode) (buffer-file-name)) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index ea52befec5..3cb4247b4b 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -1192,12 +1192,7 @@ xref--read-identifier (xref--prompt-p this-command)) (let ((id (completing-read - (if def - (format "%s (default %s): " - (substring prompt 0 (string-match - "[ :]+\\'" prompt)) - def) - prompt) + (format-prompt prompt def) (xref-backend-identifier-completion-table backend) nil nil nil 'xref--read-identifier-history def))) @@ -1257,19 +1252,19 @@ xref-find-definitions definition for IDENTIFIER, display it in the selected window. Otherwise, display the list of the possible definitions in a buffer where the user can select from the list." - (interactive (list (xref--read-identifier "Find definitions of: "))) + (interactive (list (xref--read-identifier "Find definitions of"))) (xref--find-definitions identifier nil)) ;;;###autoload (defun xref-find-definitions-other-window (identifier) "Like `xref-find-definitions' but switch to the other window." - (interactive (list (xref--read-identifier "Find definitions of: "))) + (interactive (list (xref--read-identifier "Find definitions of"))) (xref--find-definitions identifier 'window)) ;;;###autoload (defun xref-find-definitions-other-frame (identifier) "Like `xref-find-definitions' but switch to the other frame." - (interactive (list (xref--read-identifier "Find definitions of: "))) + (interactive (list (xref--read-identifier "Find definitions of"))) (xref--find-definitions identifier 'frame)) ;;;###autoload @@ -1280,7 +1275,7 @@ xref-find-references With prefix argument, or if `xref-prompt-for-identifier' is t, always prompt for the identifier. If `xref-prompt-for-identifier' is nil, prompt only if there's no usable symbol at point." - (interactive (list (xref--read-identifier "Find references of: "))) + (interactive (list (xref--read-identifier "Find references of"))) (xref--find-xrefs identifier 'references identifier nil)) ;;;###autoload diff --git a/lisp/ses.el b/lisp/ses.el index a11c754abc..6058d48ed1 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -2653,9 +2653,7 @@ ses-read-printer (barf-if-buffer-read-only) (if (eq default t) (setq default "") - (setq prompt (format "%s (default %S): " - (substring prompt 0 -2) - default))) + (setq prompt (format-prompt prompt default))) (dolist (key ses-completion-keys) (define-key ses-mode-edit-map key 'ses-read-printer-complete-symbol)) ;; make it globally visible, so that it can be visible from the minibuffer. @@ -2702,7 +2700,7 @@ ses-read-cell-printer ;;Range contains differing printer functions (setq default t) (throw 'ses-read-cell-printer t)))))) - (list (ses-read-printer (format "Cell %S printer: " ses--curcell) + (list (ses-read-printer (format "Cell %S printer" ses--curcell) default)))) (unless (eq newval t) (ses-begin-change) @@ -2716,7 +2714,7 @@ ses-read-column-printer (interactive (let ((col (cdr (ses-sym-rowcol ses--curcell)))) (ses-check-curcell) - (list col (ses-read-printer (format "Column %s printer: " + (list col (ses-read-printer (format "Column %s printer" (ses-column-letter col)) (ses-col-printer col))))) @@ -2731,7 +2729,7 @@ ses-read-default-printer "Set the default printer function for cells that have no other. See `ses-read-cell-printer' for input forms." (interactive - (list (ses-read-printer "Default printer: " ses--default-printer))) + (list (ses-read-printer "Default printer" ses--default-printer))) (unless (eq newval t) (ses-begin-change) (ses-set-parameter 'ses--default-printer newval) @@ -3773,7 +3771,7 @@ ses-define-local-printer (setq name (intern name)) (let* ((cur-printer (gethash name ses--local-printer-hashmap)) (default (and cur-printer (ses--locprn-def cur-printer)))) - (setq def (ses-read-printer (format "Enter definition of printer %S: " name) + (setq def (ses-read-printer (format "Enter definition of printer %S" name) default))) (list name def))) diff --git a/lisp/subr.el b/lisp/subr.el index ef0e5e6f78..a2c1280fc1 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2806,9 +2806,9 @@ read-number (when default1 (setq prompt (if (string-match "\\(\\):[ \t]*\\'" prompt) - (replace-match (format " (default %s)" default1) t t prompt 1) + (replace-match (format minibuffer-default-prompt-format default1) t t prompt 1) (replace-regexp-in-string "[ \t]*\\'" - (format " (default %s) " default1) + (format minibuffer-default-prompt-format default1) prompt t t)))) (while (progn diff --git a/lisp/term.el b/lisp/term.el index 6beb17fb66..d41895ad3d 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -2535,7 +2535,7 @@ term-check-source ;; then the filename reader will only accept a file that exists. ;; ;; A typical use: -;; (interactive (term-get-source "Compile file: " prev-lisp-dir/file +;; (interactive (term-get-source "Compile file" prev-lisp-dir/file ;; '(lisp-mode) t)) ;; This is pretty stupid about strings. It decides we're in a string @@ -2566,9 +2566,7 @@ term-get-source (car def))) (deffile (if sfile-p (file-name-nondirectory stringfile) (cdr def))) - (ans (read-file-name (if deffile (format "%s(default %s) " - prompt deffile) - prompt) + (ans (read-file-name (format-prompt prompt deffile) defdir (concat defdir deffile) mustmatch-p))) diff --git a/src/minibuf.c b/src/minibuf.c index d58924ae52..c9831fd50f 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1490,8 +1490,8 @@ DEFUN ("read-buffer", Fread_buffer, Sread_buffer, 1, 4, 0, STRING_MULTIBYTE (prompt)); } - AUTO_STRING (format, "%s (default %s): "); - prompt = CALLN (Fformat, format, prompt, + prompt = CALLN (Ffuncall, intern("format-prompt"), + prompt, CONSP (def) ? XCAR (def) : def); } -- 2.27.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 24 05:32:45 2021 Received: (at 47286) by debbugs.gnu.org; 24 Mar 2021 09:32:45 +0000 Received: from localhost ([127.0.0.1]:33978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOzsb-0001af-Es for submit@debbugs.gnu.org; Wed, 24 Mar 2021 05:32:45 -0400 Received: from quimby.gnus.org ([95.216.78.240]:36954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOzsZ-0001W8-G9 for 47286@debbugs.gnu.org; Wed, 24 Mar 2021 05:32:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ewpIeOPfv88KliBUdPUbrilKpzt3uvIgBZj93JpWbFQ=; b=qVGGkkBW8Il0ngYBeGTIeSktvW QIaUPPOOhpTioEVOA+bliuoV7Yf9+Q2f1GMYu5QdBi12n6magwycHIEfIXw1ZiIwz/r2UjugSlOuF dt6jCOjABu2LdAgUdAsO6cvimBlqGca2GHznoYrdEcnl1gufZB7YlmoAn37SaJEMlA1M=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lOzsQ-0007lQ-Pa; Wed, 24 Mar 2021 10:32:37 +0100 From: Lars Ingebrigtsen To: Gabriel Subject: Re: bug#47286: 28.0.50; [PATCH] Replace "(default %s)" with 'format-prompt' References: <87o8fc1p1q.fsf@gmail.com> <8735wnhute.fsf@gnus.org> X-Now-Playing: In The Nursery's _Twins_: "The Outsider" Date: Wed, 24 Mar 2021 10:32:31 +0100 In-Reply-To: (Gabriel's message of "Tue, 23 Mar 2021 00:47:55 -0300") Message-ID: <87im5gew28.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Gabriel writes: > Thanks so much for your review. Here is an updated patch that removes > the mentioned files (project.el, cc-styles.el and verilog-mode.el) and > updates the 'format-prompt' function with the suggest [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47286 Cc: 47286@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Gabriel writes: > Thanks so much for your review. Here is an updated patch that removes > the mentioned files (project.el, cc-styles.el and verilog-mode.el) and > updates the 'format-prompt' function with the suggestion from Dmitry > Gutov to consider an empty DEFAULT as nil. Let me know if something > could be improved. Looks good to me (although that latter change could probably have been a separate patch for clarity). Pushed now to Emacs 28. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 24 05:32:55 2021 Received: (at control) by debbugs.gnu.org; 24 Mar 2021 09:32:55 +0000 Received: from localhost ([127.0.0.1]:33981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOzsk-0001b1-LQ for submit@debbugs.gnu.org; Wed, 24 Mar 2021 05:32:55 -0400 Received: from quimby.gnus.org ([95.216.78.240]:36968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOzsi-0001ao-TK for control@debbugs.gnu.org; Wed, 24 Mar 2021 05:32:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=QtAqLOTSQqG5O4R1pDki99yva5OpfTVt7djTjQOVr7Y=; b=t3cIBJMmMm/8RtyF2Tlq6uibyl PxO1CBsvEqc/94Kn06NgGsYA3woyk7XxGxaQjgxfOekVHjra63NSYslBKDYFUIqzSG59gWwPDpkuG TylrJ7g7pzQJUbiyt4I6tso4jzCKLSYGAC7rDr+a5MG4/5FLvIvMsifUKR23o7imi9rc=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lOzsb-0007lX-7h for control@debbugs.gnu.org; Wed, 24 Mar 2021 10:32:47 +0100 Date: Wed, 24 Mar 2021 10:32:43 +0100 Message-Id: <87h7l0ew1w.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #47286 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 47286 fixed close 47286 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 47286 fixed close 47286 28.1 quit From unknown Mon Jun 23 04:09:37 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 21 Apr 2021 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator