branch: main commit 4f10e5c5a0620c8cff8b5c4f7768063a0c33f259 Author: Arash Esbati <ar...@gnu.org> Commit: Arash Esbati <ar...@gnu.org>
Use `format-prompt' in styles * style/catchfilebetweentags.el (LaTeX-env-catchfilebetweentags): * style/inputenc.el (LaTeX-inputenc-package-options): * style/longtable.el (LaTeX-env-longtable): * style/ltcaption.el (LaTeX-env-longtable*): * style/ocg-p.el (LaTeX-env-ocgp-ocgtabular): * style/plext.el (LaTeX-plext-env-array): * style/xltabular.el (LaTeX-env-xltabular): Use `format-prompt' instead of constructed prompts. --- style/catchfilebetweentags.el | 2 +- style/inputenc.el | 6 ++---- style/longtable.el | 6 ++---- style/ltcaption.el | 6 ++---- style/ocg-p.el | 6 ++---- style/plext.el | 8 +++----- style/xltabular.el | 8 +++----- 7 files changed, 15 insertions(+), 27 deletions(-) diff --git a/style/catchfilebetweentags.el b/style/catchfilebetweentags.el index 7a4ed0c5..173cbdbc 100644 --- a/style/catchfilebetweentags.el +++ b/style/catchfilebetweentags.el @@ -70,7 +70,7 @@ ENVIRONMENT is ignored." (LaTeX-catchfilebetweentags-counter-inc))) (tag (concat file ":" (TeX-read-string - (if fn (format "Tag (default %s): " fn) "Tag: ") + (format-prompt "Tag" fn) nil nil (when fn (number-to-string fn)))))) (unless (bolp) (newline) diff --git a/style/inputenc.el b/style/inputenc.el index 8b0e31f6..392b0b4e 100644 --- a/style/inputenc.el +++ b/style/inputenc.el @@ -1,6 +1,6 @@ ;;; inputenc.el --- AUCTeX style for `inputenc.sty' -*- lexical-binding: t; -*- -;; Copyright (C) 2005-2024 Free Software Foundation, Inc. +;; Copyright (C) 2005-2025 Free Software Foundation, Inc. ;; Author: Arne Jørgensen <a...@arnested.dk> ;; Keywords: tex @@ -39,9 +39,7 @@ buffer-file-coding-system))) (selected 'undecided)) (setq selected (completing-read - (if default - (format "Input encoding (default %s): " default) - "Input encoding: ") + (format-prompt "Input encoding" default) (mapcar #'car latex-inputenc-coding-alist) nil nil diff --git a/style/longtable.el b/style/longtable.el index 30575861..708da248 100644 --- a/style/longtable.el +++ b/style/longtable.el @@ -1,6 +1,6 @@ ;;; longtable.el --- AUCTeX style for `longtable.sty'. -*- lexical-binding: t; -*- -;; Copyright (C) 2013--2024 Free Software Foundation, Inc. +;; Copyright (C) 2013--2025 Free Software Foundation, Inc. ;; Maintainer: auctex-devel@gnu.org ;; Author: Mosè Giordano <m...@gnu.org> @@ -60,9 +60,7 @@ insert line break macro." '("l" "r" "c") nil nil LaTeX-default-position))) (fmt (TeX-read-string - (if (string= LaTeX-default-format "") - "Format: " - (format "Format (default %s): " LaTeX-default-format)) + (format-prompt "Format" LaTeX-default-format) nil nil (if (string= LaTeX-default-format "") nil diff --git a/style/ltcaption.el b/style/ltcaption.el index 6c00f560..d434be1c 100644 --- a/style/ltcaption.el +++ b/style/ltcaption.el @@ -1,6 +1,6 @@ ;;; ltcaption.el --- AUCTeX style for `ltcaption.sty' version v1.4c -*- lexical-binding: t; -*- -;; Copyright (C) 2022--2024 Free Software Foundation, Inc. +;; Copyright (C) 2022--2025 Free Software Foundation, Inc. ;; Author: Arash Esbati <ar...@gnu.org> ;; Maintainer: auctex-devel@gnu.org @@ -53,9 +53,7 @@ '("l" "r" "c") nil nil LaTeX-default-position))) (fmt (TeX-read-string - (if (string= LaTeX-default-format "") - "Format: " - (format "Format (default %s): " LaTeX-default-format)) + (format-prompt "Format" LaTeX-default-format) nil nil (if (string= LaTeX-default-format "") nil diff --git a/style/ocg-p.el b/style/ocg-p.el index 02889fc4..a09e3d12 100644 --- a/style/ocg-p.el +++ b/style/ocg-p.el @@ -1,6 +1,6 @@ ;;; ocg-p.el --- AUCTeX style for `ocg-p.sty' (v0.4) -*- lexical-binding: t; -*- -;; Copyright (C) 2018--2023 Free Software Foundation, Inc. +;; Copyright (C) 2018--2025 Free Software Foundation, Inc. ;; Author: Arash Esbati <ar...@gnu.org> ;; Maintainer: auctex-devel@gnu.org @@ -93,9 +93,7 @@ Just like array and tabular." ; be nil, i.e. do not prompt (TeX-read-string "(Optional) Position: " LaTeX-default-position))) (fmt (TeX-read-string - (if (string= LaTeX-default-format "") - "Format: " - (format "Format (default %s): " LaTeX-default-format)) + (format-prompt "Format" LaTeX-default-format) nil nil (if (string= LaTeX-default-format "") nil diff --git a/style/plext.el b/style/plext.el index 89e89304..0d4c8f2a 100644 --- a/style/plext.el +++ b/style/plext.el @@ -1,6 +1,6 @@ ;;; plext.el --- AUCTeX style for the plext package. -*- lexical-binding: t; -*- -;; Copyright (C) 2014--2024 Free Software Foundation, Inc. +;; Copyright (C) 2014--2025 Free Software Foundation, Inc. ;; Author: Ikumi Keita <ik...@ikumi.que.jp> ;; Maintainer: auctex-devel@gnu.org @@ -55,15 +55,13 @@ (let ((dir (TeX-read-string "(Optional) Direction (t or y or z): ")) (width (if (string= env "tabular*") (TeX-read-string - (format "Width (default %s): " LaTeX-default-width) + (format-prompt "Width" LaTeX-default-width) nil nil LaTeX-default-width))) (pos (and LaTeX-default-position ; LaTeX-default-position can ; be nil, i.e. do not prompt (TeX-read-string "(Optional) Position: " LaTeX-default-position))) (fmt (TeX-read-string - (if (string= LaTeX-default-format "") - "Format: " - (format "Format (default %s): " LaTeX-default-format)) + (format-prompt "Format" LaTeX-default-format) nil nil (if (string= LaTeX-default-format "") nil diff --git a/style/xltabular.el b/style/xltabular.el index 936565c3..e9a56ed9 100644 --- a/style/xltabular.el +++ b/style/xltabular.el @@ -1,6 +1,6 @@ ;;; xltabular.el --- AUCTeX style for `xltabular.sty' (v0.05) -*- lexical-binding: t; -*- -;; Copyright (C) 2017--2024 Free Software Foundation, Inc. +;; Copyright (C) 2017--2025 Free Software Foundation, Inc. ;; Author: Arash Esbati <ar...@gnu.org> ;; Maintainer: auctex-devel@gnu.org @@ -54,12 +54,10 @@ nested curly brace pair nor escaped \"}\".") '("l" "r" "c") nil nil LaTeX-default-position))) (width (TeX-read-string - (format "Width (default %s): " LaTeX-default-width) + (format-prompt "Width" LaTeX-default-width) nil nil LaTeX-default-width)) (fmt (TeX-read-string - (if (string= LaTeX-default-format "") - "Format: " - (format "Format (default %s): " LaTeX-default-format)) + (format-prompt "Format" LaTeX-default-format) nil nil (if (string= LaTeX-default-format "") nil