branch: master commit 4004dc6b8f61d45ebdc9dc750e25c6fe024b855e Author: Arash Esbati <ar...@gnu.org> Commit: Arash Esbati <ar...@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 <m...@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)