auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] GNU AUCTeX branch, lexical-binding-attempt-1, updated. bd


From: Tassilo Horn
Subject: [AUCTeX-diffs] GNU AUCTeX branch, lexical-binding-attempt-1, updated. bdcf4d954e9b09575facec065243c005012318c4
Date: Sun, 4 Oct 2020 03:55:10 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, lexical-binding-attempt-1 has been updated
       via  bdcf4d954e9b09575facec065243c005012318c4 (commit)
      from  021d822f0db5aa67dcc3d5de3e992f2952d24f95 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit bdcf4d954e9b09575facec065243c005012318c4
Author: Tassilo Horn <tsdh@gnu.org>
Date:   Sun Oct 4 09:53:16 2020 +0200

    Enable lexical-binding for texmathp.el
    
    * texmathp.el (texmathp-compile): Use `push' on places rather than `set' and
    `symbol-value' on locals partly pointing to symbols naming globals.

diff --git a/texmathp.el b/texmathp.el
index 733f639..37658f3 100644
--- a/texmathp.el
+++ b/texmathp.el
@@ -1,4 +1,4 @@
-;;; texmathp.el -- Code to check if point is inside LaTeX math environment
+;;; texmathp.el -- Code to check if point is inside LaTeX math environment  
-*- lexical-binding: t; -*-
 
 ;; Copyright (C) 1998, 2004, 2017, 2020 Free Software Foundation, Inc.
 
@@ -181,15 +181,14 @@ customize (customize calls it when setting the variable)."
   (setq texmathp-tex-commands1 (append texmathp-tex-commands
                                       texmathp-tex-commands-default))
   (let ((list (reverse texmathp-tex-commands1))
-       var entry type switches togglers)
+       entry type switches togglers)
     (while (setq entry (car list))
       (setq type (nth 1 entry)
-           list (cdr list)
-           var (cond ((memq type '(env-on env-off)) 'texmathp-environments)
-                     ((memq type '(arg-on arg-off)) 'texmathp-macros)
-                     ((memq type '(sw-on sw-off))   'switches)
-                     ((memq type '(sw-toggle))      'togglers)))
-      (set var (cons (car entry) (symbol-value var))))
+           list (cdr list))
+      (cond ((memq type '(env-on env-off)) (push (car entry) 
texmathp-environments))
+           ((memq type '(arg-on arg-off)) (push (car entry) texmathp-macros))
+           ((memq type '(sw-on sw-off))   (push (car entry) switches))
+           ((memq type '(sw-toggle))      (push (car entry) togglers))))
     (setq texmathp-onoff-regexp
          (concat "\\(?:[^\\]\\|\\`\\)"
                  (regexp-opt switches t))

-----------------------------------------------------------------------

Summary of changes:
 texmathp.el | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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