[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 31acc2d 2/3: Update style/breqn.el to package ve
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 31acc2d 2/3: Update style/breqn.el to package version 0.98j |
Date: |
Tue, 5 May 2020 12:24:35 -0400 (EDT) |
branch: externals/auctex
commit 31acc2d02784cdd70a5a338a49c3e5a07e2a71f5
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>
Update style/breqn.el to package version 0.98j
* style/breqn.el (LaTeX-breqn-key-val-options): Delete no-op keys
"background" and "color".
(LaTeX-breqn-key-val-options-local): Delete now unneeded variable,
also from the style hook.
(LaTeX-breqn-env): Use `LaTeX-breqn-key-val-options' instead of
`LaTeX-breqn-key-val-options-local'.
(LaTeX-breqn-update-color-keys): Delete function and entry for
`TeX-auto-cleanup-hook'.
---
style/breqn.el | 42 ++++++------------------------------------
1 file changed, 6 insertions(+), 36 deletions(-)
diff --git a/style/breqn.el b/style/breqn.el
index f22696c..3a89860 100644
--- a/style/breqn.el
+++ b/style/breqn.el
@@ -1,6 +1,6 @@
-;;; breqn.el --- AUCTeX style for `breqn.sty' (v0.98e)
+;;; breqn.el --- AUCTeX style for `breqn.sty' (v0.98j)
-;; Copyright (C) 2017--2019 Free Software Foundation, Inc.
+;; Copyright (C) 2017--2020 Free Software Foundation, Inc.
;; Author: Arash Esbati <address@hidden>
;; Maintainer: address@hidden
@@ -26,7 +26,7 @@
;;; Commentary:
-;; This file adds support for `breqn.sty' (v0.98e) from 2017/01/27.
+;; This file adds support for `breqn.sty' (v0.98j) from 2020/04/19.
;; `breqn.sty' is part of TeXLive.
;; In breqn documentation, there is the following statement:
@@ -50,10 +50,6 @@
(require 'latex)
-;; Silence the compiler:
-(declare-function LaTeX-color-definecolor-list "color" ())
-(declare-function LaTeX-xcolor-definecolor-list "xcolor" ())
-
(defvar LaTeX-breqn-key-val-options
'(("style" ("\\tiny" "\\scriptsize" "\\footnotesize" "\\small"
"\\normalsize" "\\large" "\\Large" "\\LARGE"
@@ -64,16 +60,10 @@
("spread")
("frame")
("framesep")
- ("background")
- ("color")
("breakdepth"))
"Key=value options for breqn environments.
The keys \"label\" and \"labelprefix\" are omitted.")
-(defvar LaTeX-breqn-key-val-options-local nil
- "Buffer-local key=value options for breqn environments.")
-(make-variable-buffer-local 'LaTeX-breqn-key-val-options-local)
-
(defvar LaTeX-breqn-key-val-label-regexp
`(,(concat
"\\\\begin{"
@@ -92,43 +82,23 @@ Keys offered for key=val query depend on ENV. \"label\" and
(cond ((or (string= env "dgroup")
(string= env "dgroup*"))
(append '(("noalign") ("brace"))
- LaTeX-breqn-key-val-options-local))
+ LaTeX-breqn-key-val-options))
((or (string= env "darray")
(string= env "darray*"))
(append '(("noalign") ("brace") ("cols"
("{}")))
- LaTeX-breqn-key-val-options-local))
- (t LaTeX-breqn-key-val-options-local)))))
+ LaTeX-breqn-key-val-options))
+ (t LaTeX-breqn-key-val-options)))))
(LaTeX-insert-environment env (when (and keyvals
(not (string= keyvals "")))
(concat LaTeX-optop keyvals LaTeX-optcl)))
(LaTeX-env-label-as-keyval nil nil keyvals env)))
-(defun LaTeX-breqn-update-color-keys ()
- "Update color relevant keys from `LaTeX-breqn-key-val-options-local'."
- (when (or (member "xcolor" (TeX-style-list))
- (member "color" (TeX-style-list)))
- (let* ((colorcmd (if (member "xcolor" (TeX-style-list))
- #'LaTeX-xcolor-definecolor-list
- #'LaTeX-color-definecolor-list))
- (keys '("color" "background"))
- (tmp (copy-alist LaTeX-breqn-key-val-options-local)))
- (dolist (x keys)
- (setq tmp (assq-delete-all (car (assoc x tmp)) tmp))
- (push (list x (mapcar #'car (funcall colorcmd))) tmp))
- (setq LaTeX-breqn-key-val-options-local
- (copy-alist tmp)))))
-
-(add-hook 'TeX-auto-cleanup-hook #'LaTeX-breqn-update-color-keys t)
(add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
(TeX-add-style-hook
"breqn"
(lambda ()
- ;; Local version of key-val options
- (setq LaTeX-breqn-key-val-options-local
- (copy-alist LaTeX-breqn-key-val-options))
-
;; Add breqn to parser:
(TeX-auto-add-regexp LaTeX-breqn-key-val-label-regexp)