branch: externals/auctex
commit 2ac568123918895fc2720516cd973301f26014ad
Author: Ikumi Keita <[email protected]>
Commit: Ikumi Keita <[email protected]>
Ask optional argument for partial derivative macro
* style/physics.el (TeX-arg-physics-derivative): Don't skip asking
optional argument when the user omits the second derivative variable.
; Update copyright year.
---
style/physics.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/style/physics.el b/style/physics.el
index 5b19f59777..26b38fa3d2 100644
--- a/style/physics.el
+++ b/style/physics.el
@@ -1,6 +1,6 @@
;;; physics.el --- AUCTeX style for `physics' (v1.3). -*- lexical-binding: t;
-*-
-;; Copyright (C) 2022--2023 Free Software Foundation, Inc.
+;; Copyright (C) 2022--2023, 2025 Free Software Foundation, Inc.
;; Author: Ikumi Keita <[email protected]>
;; Maintainer: [email protected]
@@ -222,9 +222,9 @@ Function to derive (RET to omit, SPC RET to have empty
placeholder): "))
(var2 (and partial (not paren) (< 0 (length func))
(TeX-read-string
"Derivative variable 2nd (RET to omit): "))))
- (unless var2
- ;; XXX: Should we respect `TeX-insert-macro-default-style'?
- (TeX-arg-string t "Power" nil nil nil LaTeX-optop LaTeX-optcl))
+ (if (= 0 (length var2))
+ ;; XXX: Should we respect `TeX-insert-macro-default-style'?
+ (TeX-arg-string t "Power" nil nil nil LaTeX-optop LaTeX-optcl))
(when (and (< 0 (length func))
(not paren))
(if (equal func " ")