auctex-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 1adb687a: Fix query of optional arguments


From: Arash Esbati
Subject: master 1adb687a: Fix query of optional arguments
Date: Mon, 27 Mar 2023 05:43:26 -0400 (EDT)

branch: master
commit 1adb687a9d8816763c787abf751367925788b909
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>

    Fix query of optional arguments
    
    * style/thmtools.el (LaTeX-thmtools-env-label): Add ?\r (RET) to
    list of valid chars for input.
---
 style/thmtools.el | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/style/thmtools.el b/style/thmtools.el
index dcf02db8..cee27908 100644
--- a/style/thmtools.el
+++ b/style/thmtools.el
@@ -1,6 +1,6 @@
 ;;; thmtools.el --- AUCTeX style for `thmtools.sty' (v0.72)  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2018--2022 Free Software Foundation, Inc.
+;; Copyright (C) 2018--2023 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -205,8 +205,8 @@ Select the content of the optional argument with a key:
 RET in order to leave it empty.")
          (choice (read-char-choice
                   (TeX-argument-prompt
-                   nil nil "Heading (h), Key=val (k), Empty (RET)")
-                  '(?h ?k)))
+                   nil nil "Heading (h), Key=val (k), Empty (RET), Help (C-h)")
+                  '(?h ?k ?\r)))
          (opthead (cond ((= choice ?h)
                          (TeX-read-string
                           (TeX-argument-prompt t nil "Heading")))
@@ -222,7 +222,11 @@ RET in order to leave it empty.")
                             ;; much easier for AUCTeX and RefTeX
                             ;; ("label")
                             ("listhack" ("true" "false")))))
-                        (t ""))))
+                        (t
+                         ;; Clear minibuffer and don't leave the ugly
+                         ;; ^M there and return an empty string:
+                         (message nil)
+                         ""))))
     (LaTeX-insert-environment environment
                               (when (and opthead
                                          (not (string= opthead "")))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]