[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 4004dc6b: Simplify the function `LaTeX-array-update-column-letter
From: |
Arash Esbati |
Subject: |
master 4004dc6b: Simplify the function `LaTeX-array-update-column-letters' |
Date: |
Thu, 1 Sep 2022 04:39:01 -0400 (EDT) |
branch: master
commit 4004dc6b8f61d45ebdc9dc750e25c6fe024b855e
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
Simplify the function `LaTeX-array-update-column-letters'
* style/array.el (LaTeX-array-update-column-letters): Simplify by
using seq-functions. Fix docstring.
---
style/array.el | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/style/array.el b/style/array.el
index be7baf36..b564e055 100644
--- a/style/array.el
+++ b/style/array.el
@@ -1,6 +1,6 @@
;;; array.el --- AUCTeX style for `array.sty' -*- lexical-binding: t; -*-
-;; Copyright (C) 2013-2021 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2022 Free Software Foundation, Inc.
;; Author: Mads Jensen <mje@inducks.org>
;; Maintainer: auctex-devel@gnu.org
@@ -56,16 +56,11 @@ package.")
(LaTeX-array-update-column-letters)))
(defun LaTeX-array-update-column-letters ()
- "Update and uniquify the value of `LaTeX-array-column-letters'
-and make it buffer local. "
+ "Update and uniquify the local value of `LaTeX-array-column-letters'."
(set (make-local-variable 'LaTeX-array-column-letters)
- (mapconcat #'identity
- (TeX-delete-duplicate-strings
- (split-string
- (concat LaTeX-array-column-letters
- (mapconcat #'car (LaTeX-array-newcolumntype-list)
""))
- "" t))
- "")))
+ (let* ((newtypes (mapconcat #'car (LaTeX-array-newcolumntype-list) ""))
+ (alltypes (concat LaTeX-array-column-letters newtypes)))
+ (seq-concatenate 'string (seq-uniq alltypes #'=)))))
(add-hook 'TeX-auto-prepare-hook #'LaTeX-array-auto-prepare t)
(add-hook 'TeX-auto-cleanup-hook #'LaTeX-array-auto-cleanup t)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 4004dc6b: Simplify the function `LaTeX-array-update-column-letters',
Arash Esbati <=