emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/auctex 8585c4d 19/23: Update style/bigstrut.el to packa


From: Tassilo Horn
Subject: [elpa] externals/auctex 8585c4d 19/23: Update style/bigstrut.el to package version 2.6
Date: Sat, 23 Jan 2021 04:10:09 -0500 (EST)

branch: externals/auctex
commit 8585c4d4a242fe490a874ea453ccfce152f59840
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>

    Update style/bigstrut.el to package version 2.6
    
    * style/bigstrut.el ("bigstrut"): Remove non-existent macro
    \bigstrutsetup.
    Add \bigstrutjot to list of lengths.
    Add fontification support for \bigstrut.
    (TeX-arg-bigstrut): Fix prompt and the usage of
    `TeX-argument-prompt'.  Make the function more AUCTeX standard.
---
 style/bigstrut.el | 28 +++++++++++++++++++---------
 1 file changed, 19 insertions(+), 9 deletions(-)

diff --git a/style/bigstrut.el b/style/bigstrut.el
index 71ea835..32b6c9b 100644
--- a/style/bigstrut.el
+++ b/style/bigstrut.el
@@ -1,6 +1,6 @@
 ;;; bigstrut.el --- AUCTeX style for `bigstrut.sty'  -*- lexical-binding: t; 
-*-
 
-;; Copyright (C) 2012, 2014, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2012, 2014--2021 Free Software Foundation, Inc.
 
 ;; Author: Mads Jensen <mje@inducks.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -25,7 +25,7 @@
 
 ;;; Commentary:
 
-;; This file adds support for `bigstrut.sty'.
+;; This file adds support for `bigstrut.sty', v2.6 from 2021/01/02.
 
 ;;; Code:
 
@@ -35,16 +35,26 @@
  "bigstrut"
  (lambda ()
    (TeX-add-symbols
-    "bigstrutsetup"
-    '("bigstrut" [ TeX-arg-bigstrut ])))
+    '("bigstrut" [ TeX-arg-bigstrut ]))
+
+   (LaTeX-add-lengths "bigstrutjot")
+
+   ;; Fontification
+   (when (and (featurep 'font-latex)
+              (eq TeX-install-font-lock 'font-latex-setup))
+     (font-latex-add-keywords '(("bigstrut" "["))
+                              'function)))
  TeX-dialect)
 
-(defun TeX-arg-bigstrut (optional &optional _prompt)
-  "Prompt for the optional argument in \\bigstrut."
+(defun TeX-arg-bigstrut (optional &optional prompt)
+  "Prompt for the optional argument in \\bigstrut.
+If OPTIONAL is non-nil, insert the argument in brackets.  PROMPT
+replaces the standard one."
   (TeX-argument-insert
-   (completing-read (TeX-argument-prompt
-     optional "Strut to top (t) or bottom (b)" nil t)
-                    (mapcar 'list '("t" "b")) nil t)
+   (completing-read
+    (TeX-argument-prompt
+     optional prompt "Strut to top (t) or bottom (b)")
+    '("t" "b"))
    optional))
 
 (defvar LaTeX-bigstrut-package-options nil



reply via email to

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