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

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

[elpa] scratch/auctex-lexbind 2852adf 11/13: Activate lexical-binding ev


From: Stefan Monnier
Subject: [elpa] scratch/auctex-lexbind 2852adf 11/13: Activate lexical-binding everywhere
Date: Tue, 23 Mar 2021 13:56:57 -0400 (EDT)

branch: scratch/auctex-lexbind
commit 2852adff623c3ad60f72c2288c8b86036b436b9b
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    Activate lexical-binding everywhere
    
    Also, add an underscore at the beginning of unused arguments to
    silence warnings.
    
    * bib-cite.el (bib-highlight-mouse): Remove unused vars `extent`
    and `local-extent-list`.
    
    * latex.el (LaTeX-label): Remove unused var `label`.
    (LaTeX-math-mode-map): Move before first use.
    
    * preview.el.in (preview-start-dvipng, preview-start-dvips):
    Remove unused var `file`.
    
    * tex-fold.el (TeX-fold-macro-nth-arg): Remove unused var `close-string`.
    (TeX-fold-hide-item): Remove unused var `face`.
    
    * tex-font.el (tex-font-lock-keywords-2): Remove unused var `type`.
    
    * tex-info.el (Texinfo-mark-section): Rework to avoid relying on
    dynamic scoping to access local vars.
    
    * toolbar-x.el (toolbarx-test-toolbar-type): Remove unused vars
    `all-but-def-opts` and `all-opts`; remove always-t var `good-jobs`.
---
 auctex.el.in                      |  2 +-
 bib-cite.el                       |  4 ++--
 context.el                        |  2 +-
 font-latex.el                     |  7 ++++---
 latex.el                          | 23 ++++++++++++----------
 lpath.el                          |  4 ++--
 multi-prompt.el                   |  4 ++--
 preview.el.in                     | 27 +++++++++++++-------------
 tests/context/context-test.el     |  4 ++--
 tests/japanese/error-parsing.el   |  4 ++--
 tests/japanese/parse-timing.el    |  4 ++--
 tests/japanese/preview-latex.el   |  4 ++--
 tests/latex/font-latex-test.el    |  4 ++--
 tests/latex/latex-test.el         |  4 ++--
 tests/latex/preview-latex-test.el |  4 ++--
 tests/latex/texmathp-test.el      |  4 ++--
 tests/tex/command-expansion.el    |  4 ++--
 tests/tex/error-parsing.el        |  4 ++--
 tests/tex/navigation.el           |  4 ++--
 tests/tex/path-expansion.el       |  4 ++--
 tex-bar.el                        |  8 ++++----
 tex-buf.el                        | 12 ++++++------
 tex-fold.el                       |  7 ++++---
 tex-font.el                       |  4 ++--
 tex-info.el                       | 40 ++++++++++++++++++++-------------------
 tex-mik.el                        |  4 ++--
 tex-site.el.in                    |  2 +-
 tex-style.el                      |  2 +-
 tex-wizard.el                     |  2 +-
 tex.el                            | 10 +++++-----
 toolbar-x.el                      | 17 +++++++++--------
 31 files changed, 118 insertions(+), 111 deletions(-)

diff --git a/auctex.el.in b/auctex.el.in
index b38b133..377c733 100644
--- a/auctex.el.in
+++ b/auctex.el.in
@@ -1,4 +1,4 @@
-;;; auctex.el --- Integrated environment for *TeX*
+;;; auctex.el --- Integrated environment for *TeX*  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2014-2020 Free Software Foundation, Inc.
 
diff --git a/bib-cite.el b/bib-cite.el
index 3ae2c79..b21bdcb 100644
--- a/bib-cite.el
+++ b/bib-cite.el
@@ -1,4 +1,4 @@
-;;; bib-cite.el --- test
+;;; bib-cite.el --- test  -*- lexical-binding: t; -*-
 ;; bib-cite.el - Display \cite, \ref or \label / Extract refs from BiBTeX file.
 
 ;; Copyright (C) 1994-1999, 2001, 2003-2005, 2014-2021 Free Software 
Foundation, Inc.
@@ -1220,7 +1220,7 @@ See variables bib-etags-command and bib-etags-filename"
   ;; *all of code was here*
   ;;      )
   (save-excursion
-    (let ((s)(e)(extent)(local-extent-list bib-ext-list)
+    (let ((s)(e);; (extent) (local-extent-list bib-ext-list)
           (inhibit-read-only t)
           (modified (buffer-modified-p))) ;put-text-property changing this?
       ;; * peta Wed Nov  8 16:27:29 1995 -- better remove the mouse face
diff --git a/context.el b/context.el
index e3a32aa..435bd18 100644
--- a/context.el
+++ b/context.el
@@ -1646,7 +1646,7 @@ Use `ConTeXt-Mark-version' to choose the command."
    ;; In any other case fall back on Mark II.
    (t
     (concat
-     (let ((engine (eval (nth 4 (TeX-engine-in-engine-alist TeX-engine)))))
+     (let ((engine (eval (nth 4 (TeX-engine-in-engine-alist TeX-engine)) t)))
        (when engine
          (format "--engine=%s " engine)))
      (unless (eq ConTeXt-current-interface "en")
diff --git a/font-latex.el b/font-latex.el
index 554c2d8..cf72831 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -227,7 +227,8 @@ Emacs."
 Probably you don't want to customize this face directly.  Better
 change the base face `font-latex-sectioning-5-face' or customize the
 variable `font-latex-fontify-sectioning'." ',num)
-          :group 'font-latex-highlighting-faces)))))
+          :group 'font-latex-highlighting-faces)
+       t))))
 
 (font-latex-make-sectioning-faces font-latex-sectioning-max)
 
@@ -474,7 +475,7 @@ You have to restart Emacs for a change of this variable to 
take effect."
                                   ;; Name of the face
                                   (symbol-name
                                    (let ((face (nth 2 spec)))
-                                     (if (symbolp face) face (eval face))))
+                                     (if (symbolp face) face (eval face t))))
                                   "'.\n"
                                   ;; List of keywords
                                   (with-temp-buffer
@@ -1352,7 +1353,7 @@ Take care when the actually fonfified region was extended 
beyond END."
 ;; Copy and adaption of `tex-font-lock-unfontify-region' from
 ;; tex-mode.el in GNU Emacs on 2004-08-04.
 ;; (XEmacs passes a third argument to the function.)
-(defun font-latex-unfontify-region (beg end &rest ignored)
+(defun font-latex-unfontify-region (beg end &rest _ignored)
   "Unfontify region from BEG to END."
   (font-lock-default-unfontify-region beg end)
   (remove-list-of-text-properties beg end '(script-level invisible))
diff --git a/latex.el b/latex.el
index 9e22628..6b46848 100644
--- a/latex.el
+++ b/latex.el
@@ -1129,7 +1129,7 @@ returned, nil if it is empty."
            "")
           (t
            nil)))
-        label)
+        ) ;; label
     (when (symbolp TeX-read-label-prefix)
       (setq TeX-read-label-prefix (symbol-value TeX-read-label-prefix)))
     (when TeX-read-label-prefix
@@ -2007,13 +2007,13 @@ It will setup BibTeX to store keys in an auto file."
 If EXPR evaluate to true, parse THEN as an argument list, else
 parse ELSE as an argument list.  The compatibility argument
 OPTIONAL is ignored."
-  (TeX-parse-arguments (if (eval expr) then else)))
+  (TeX-parse-arguments (if (eval expr t) then else)))
 
 (defun TeX-arg-eval (optional &rest args)
   "Evaluate ARGS and insert value in buffer.
 If OPTIONAL is non-nil, insert the resulting value as an optional
 argument, otherwise as a mandatory one."
-  (TeX-argument-insert (eval args) optional))
+  (TeX-argument-insert (eval args t) optional))
 
 (defvar TeX-read-label-prefix nil
   "Initial input for the label in `TeX-read-label.'")
@@ -3058,7 +3058,7 @@ for the key.  Use PROMPT as the prompt string."
   (multi-prompt-key-value
    (TeX-argument-prompt optional prompt "Options (k=v)")
    (if (symbolp key-val-alist)
-       (eval key-val-alist)
+       (eval key-val-alist t)
      key-val-alist)))
 
 (defun TeX-arg-key-val (optional key-val-alist &optional prompt)
@@ -4787,6 +4787,8 @@ of verbatim constructs are not considered."
 
 ;;; Math Minor Mode
 
+(defvar LaTeX-math-mode-map)
+
 (defgroup LaTeX-math nil
   "Mathematics in AUCTeX."
   :group 'LaTeX-macro)
@@ -5467,7 +5469,6 @@ See also `LaTeX-math-menu'."
                                 (integer :tag "Number")))))
 
 (defvar LaTeX-math-mode-menu)
-(defvar LaTeX-math-mode-map)
 (define-minor-mode LaTeX-math-mode
   "A minor mode with easy access to TeX math macros.
 
@@ -5728,7 +5729,7 @@ the last entry in the menu."
             (if (= rest outer) (setq inner (1+ inner)))))
         result))))
 
-(defun LaTeX-section-menu-filter (ignored)
+(defun LaTeX-section-menu-filter (_ignored)
   "Filter function for the section submenu in the mode menu.
 The argument IGNORED is not used in any way."
   (TeX-update-style)
@@ -5787,11 +5788,13 @@ corresponds to the variables 
`LaTeX-environment-menu-name' and
     ["Complete Macro" TeX-complete-symbol
      :help "Complete the current macro or environment name"]
     ,(list LaTeX-environment-menu-name
-           :filter (lambda (ignored) (LaTeX-environment-menu-filter
-                                      LaTeX-environment-menu-name)))
+           :filter (lambda (_ignored)
+                     (LaTeX-environment-menu-filter
+                      LaTeX-environment-menu-name)))
     ,(list LaTeX-environment-modify-menu-name
-           :filter (lambda (ignored) (LaTeX-environment-menu-filter
-                                      LaTeX-environment-modify-menu-name)))
+           :filter (lambda (_ignored)
+                     (LaTeX-environment-menu-filter
+                      LaTeX-environment-modify-menu-name)))
     ["Close Environment" LaTeX-close-environment
      :help "Insert the \\end part of the current environment"]
     ["Item" LaTeX-insert-item
diff --git a/lpath.el b/lpath.el
index 5613683..f43a984 100644
--- a/lpath.el
+++ b/lpath.el
@@ -1,6 +1,6 @@
-;;; This file is only used for installing AUCTeX.
+;;; This file is only used for installing AUCTeX.  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2013 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2021  Free Software Foundation, Inc.
 
 ;;; It is not a part of AUCTeX itself.
 
diff --git a/multi-prompt.el b/multi-prompt.el
index 884eddc..5ca3422 100644
--- a/multi-prompt.el
+++ b/multi-prompt.el
@@ -1,4 +1,4 @@
-;;; multi-prompt.el --- Completing read of multiple strings
+;;; multi-prompt.el --- Completing read of multiple strings  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
 
@@ -174,7 +174,7 @@ This is achieved by eval'ing all variables in the value 
parts of
 the alist elements."
   (mapcar (lambda (x)
             (if (and (cadr x) (symbolp (cadr x)) (not (functionp (cadr x))))
-                (cons (car x) (list (eval (cadr x))))
+                (cons (car x) (list (eval (cadr x) t)))
               x))
           table))
 
diff --git a/preview.el.in b/preview.el.in
index 2789a0e..9d2bc42 100644
--- a/preview.el.in
+++ b/preview.el.in
@@ -1,7 +1,6 @@
-;;; preview.el --- embed preview LaTeX images in source buffer
+;;; preview.el --- embed preview LaTeX images in source buffer  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2001-2006, 2010-2015,
-;;               2017-2021  Free Software Foundation, Inc.
+;; Copyright (C) 2001-2021  Free Software Foundation, Inc.
 
 ;; Author: David Kastrup
 ;; Keywords: tex, wp, convenience
@@ -1737,7 +1736,7 @@ Consults `preview-transparent-color'."
    file type ascent border))
 
 (put 'preview-filter-specs :type
-     (lambda (keyword value &rest args)
+     (lambda (_keyword value &rest args)
        (if (image-type-available-p value)
            `(image :type ,value
                    ,@(preview-filter-specs-1 args))
@@ -1818,7 +1817,7 @@ to require redumping of a format."
   :type 'string)
 
 (defun preview-preamble-changed-function
-  (ov after-change beg end &optional length)
+  (ov _after-change _beg _end &optional _length)
   "Hook function for change hooks on preamble.
 See info node `(elisp) Overlay Properties' for
 definition of OV, AFTER-CHANGE, BEG, END and LENGTH."
@@ -1903,7 +1902,7 @@ Disable it if that is the case.  Ignores text properties."
   (setq preview-change-list nil))
 
 (defun preview-handle-insert-in-front
-  (ov after-change beg end &optional length)
+  (ov after-change _beg end &optional _length)
   "Hook function for `insert-in-front-hooks' property.
 See info node `(elisp) Overlay Properties' for
 definition of OV, AFTER-CHANGE, BEG, END and LENGTH."
@@ -1914,7 +1913,7 @@ definition of OV, AFTER-CHANGE, BEG, END and LENGTH."
     (preview-register-change ov)))
 
 (defun preview-handle-insert-behind
-  (ov after-change beg end &optional length)
+  (ov after-change beg _end &optional _length)
   "Hook function for `insert-behind-hooks' property.
 This is needed in case `insert-before-markers' is used at the
 end of the overlay.  See info node `(elisp) Overlay Properties'
@@ -1926,7 +1925,7 @@ for definition of OV, AFTER-CHANGE, BEG, END and LENGTH."
     (preview-register-change ov)))
 
 (defun preview-handle-modification
-  (ov after-change beg end &optional length)
+  (ov after-change _beg _end &optional _length)
   "Hook function for `modification-hooks' property.
 See info node `(elisp) Overlay Properties' for
 definition of OV, AFTER-CHANGE, BEG, END and LENGTH."
@@ -2208,7 +2207,7 @@ active (`transient-mark-mode'), it is run through 
`preview-region'."
       (file-error nil))
     (overlay-put ovr 'filenames nil)))
 
-(defun preview-delete (ovr &rest ignored)
+(defun preview-delete (ovr &rest _ignored)
   "Delete preview overlay OVR, taking any associated file along.
 IGNORED arguments are ignored, making this function usable as
 a hook in some cases"
@@ -2305,7 +2304,7 @@ kept."
             (setq ctr (delete elt ctr)))))
   (apply #'concat ctr))
 
-(defun desktop-buffer-preview-misc-data (&rest ignored)
+(defun desktop-buffer-preview-misc-data (&rest _ignored)
   "Hook function that extracts previews for persistent sessions."
   (unless (buffer-modified-p)
     (setq preview-last-counter nil)
@@ -3698,7 +3697,7 @@ The fourth value is the transparent border thickness."
 
 (defun preview-start-dvipng ()
   "Start a DviPNG process.."
-  (let* ((file preview-gs-file)
+  (let* (;; (file preview-gs-file)
          tempdir
          (res (/ (* (car preview-resolution)
                     (preview-hook-enquiry preview-scale))
@@ -3739,7 +3738,7 @@ The fourth value is the transparent border thickness."
 (defun preview-start-dvips (&optional fast)
   "Start a DviPS process.
 If FAST is set, do a fast conversion."
-  (let* ((file preview-gs-file)
+  (let* (;; (file preview-gs-file)
          tempdir
          (command (with-current-buffer TeX-command-buffer
                     (prog1
@@ -4088,7 +4087,7 @@ environments is selected."
   (interactive "p")
   (save-excursion
     (let (currenv)
-      (dotimes (i (1- count))
+      (dotimes (_ (1- count))
         (setq currenv (LaTeX-current-environment))
         (if (string= currenv "document")
             (error "No enclosing outer environment found"))
@@ -4152,7 +4151,7 @@ It returns the started process."
                                      geometry))))
 
 (defun TeX-inline-preview-internal (command file pr-file
-                                    commandbuff dumped-cons master
+                                    commandbuff dumped-cons _master
                                     geometry
                                     &optional str)
   "Internal stuff for previewing.
diff --git a/tests/context/context-test.el b/tests/context/context-test.el
index 1fcc999..4eeab4b 100644
--- a/tests/context/context-test.el
+++ b/tests/context/context-test.el
@@ -1,6 +1,6 @@
-;;; context-test.el --- tests for ConTeXt mode
+;;; context-test.el --- tests for ConTeXt mode  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2017 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2021  Free Software Foundation, Inc.
 
 ;; This file is part of AUCTeX.
 
diff --git a/tests/japanese/error-parsing.el b/tests/japanese/error-parsing.el
index da6a413..36f3ca5 100644
--- a/tests/japanese/error-parsing.el
+++ b/tests/japanese/error-parsing.el
@@ -1,6 +1,6 @@
-;;; error-parsing.el --- tests for error parsing
+;;; error-parsing.el --- tests for error parsing  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2017 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2021  Free Software Foundation, Inc.
 
 ;; This file is part of AUCTeX.
 
diff --git a/tests/japanese/parse-timing.el b/tests/japanese/parse-timing.el
index a05b06f..15051bc 100644
--- a/tests/japanese/parse-timing.el
+++ b/tests/japanese/parse-timing.el
@@ -1,6 +1,6 @@
-;;; parse-timing.el --- tests for parse timing
+;;; parse-timing.el --- tests for parse timing  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2017 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2021  Free Software Foundation, Inc.
 
 ;; This file is part of AUCTeX.
 
diff --git a/tests/japanese/preview-latex.el b/tests/japanese/preview-latex.el
index ec54f11..0d03982 100644
--- a/tests/japanese/preview-latex.el
+++ b/tests/japanese/preview-latex.el
@@ -1,6 +1,6 @@
-;;; preview-latex.el --- tests for preview-latex compatibility
+;;; preview-latex.el --- tests for preview-latex compatibility  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2017, 2018 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2021 Free Software Foundation, Inc.
 
 ;; This file is part of AUCTeX.
 
diff --git a/tests/latex/font-latex-test.el b/tests/latex/font-latex-test.el
index 82579a3..7484d03 100644
--- a/tests/latex/font-latex-test.el
+++ b/tests/latex/font-latex-test.el
@@ -1,6 +1,6 @@
-;;; font-latex-test.el --- tests for font-latex
+;;; font-latex-test.el --- tests for font-latex  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2021  Free Software Foundation, Inc.
 
 ;; This file is part of AUCTeX.
 
diff --git a/tests/latex/latex-test.el b/tests/latex/latex-test.el
index 4600ad6..6f70d95 100644
--- a/tests/latex/latex-test.el
+++ b/tests/latex/latex-test.el
@@ -1,6 +1,6 @@
-;;; latex-test.el --- tests for LaTeX mode
+;;; latex-test.el --- tests for LaTeX mode  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2014--2019 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2021  Free Software Foundation, Inc.
 
 ;; This file is part of AUCTeX.
 
diff --git a/tests/latex/preview-latex-test.el 
b/tests/latex/preview-latex-test.el
index a8375cb..8c7d831 100644
--- a/tests/latex/preview-latex-test.el
+++ b/tests/latex/preview-latex-test.el
@@ -1,6 +1,6 @@
-;;; preview-latex.el --- tests for preview-latex compatibility
+;;; preview-latex.el --- tests for preview-latex compatibility  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2018 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2021  Free Software Foundation, Inc.
 
 ;; This file is part of AUCTeX.
 
diff --git a/tests/latex/texmathp-test.el b/tests/latex/texmathp-test.el
index eeda1c9..3fb6f54 100644
--- a/tests/latex/texmathp-test.el
+++ b/tests/latex/texmathp-test.el
@@ -1,6 +1,6 @@
-;;; texmathp-test.el --- tests for texmathp
+;;; texmathp-test.el --- tests for texmathp  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2021  Free Software Foundation, Inc.
 
 ;; This file is part of AUCTeX.
 
diff --git a/tests/tex/command-expansion.el b/tests/tex/command-expansion.el
index cc5d9d8..5407867 100644
--- a/tests/tex/command-expansion.el
+++ b/tests/tex/command-expansion.el
@@ -1,6 +1,6 @@
-;;; command-expansion.el --- tests for TeX command expansion
+;;; command-expansion.el --- tests for TeX command expansion  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2014, 2018, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2021  Free Software Foundation, Inc.
 
 ;; This file is part of AUCTeX.
 
diff --git a/tests/tex/error-parsing.el b/tests/tex/error-parsing.el
index ca82132..6cde540 100644
--- a/tests/tex/error-parsing.el
+++ b/tests/tex/error-parsing.el
@@ -1,6 +1,6 @@
-;;; error-parsing.el --- tests for error parsing
+;;; error-parsing.el --- tests for error parsing  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2016 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2021  Free Software Foundation, Inc.
 
 ;; This file is part of AUCTeX.
 
diff --git a/tests/tex/navigation.el b/tests/tex/navigation.el
index d429be6..4debb44 100644
--- a/tests/tex/navigation.el
+++ b/tests/tex/navigation.el
@@ -1,6 +1,6 @@
-;;; navigation.el --- tests for navigation function in TeX buffer
+;;; navigation.el --- tests for navigation function in TeX buffer  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2019 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2021  Free Software Foundation, Inc.
 
 ;; This file is part of AUCTeX.
 
diff --git a/tests/tex/path-expansion.el b/tests/tex/path-expansion.el
index c30e64d..2246e92 100644
--- a/tests/tex/path-expansion.el
+++ b/tests/tex/path-expansion.el
@@ -1,6 +1,6 @@
-;;; path-expansion.el --- tests for path expansion
+;;; path-expansion.el --- tests for path expansion  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2017 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2021  Free Software Foundation, Inc.
 
 ;; This file is part of AUCTeX.
 
diff --git a/tex-bar.el b/tex-bar.el
index 72fe1dc..abec658 100644
--- a/tex-bar.el
+++ b/tex-bar.el
@@ -189,7 +189,7 @@ format of the argument MEANING-ALIST in the mentioned 
function."
         (labels))
     (dolist (m-alist TeX-bar-TeX-all-button-alists)
       (setq labels nil)
-      (dolist (as (eval m-alist))
+      (dolist (as (eval m-alist t))
         (setq labels (cons (car as) labels)))
       (setq assqs-button-alists (cons (cons m-alist (nreverse labels))
                                       assqs-button-alists)))
@@ -219,7 +219,7 @@ format of the argument MEANING-ALIST in the mentioned 
function."
                             (let ((append-list))
                               (dolist (elt TeX-bar-TeX-all-button-alists)
                                 (setq append-list (append append-list
-                                                          (eval elt))))
+                                                          (eval elt t))))
                               append-list)))
 
 (defcustom TeX-bar-LaTeX-buttons
@@ -334,7 +334,7 @@ format of the argument MEANING-ALIST in the mentioned 
function."
         (labels))
     (dolist (m-alist TeX-bar-LaTeX-all-button-alists)
       (setq labels nil)
-      (dolist (as (eval m-alist))
+      (dolist (as (eval m-alist t))
         (setq labels (cons (car as) labels)))
       (setq assqs-button-alists (cons (cons m-alist (nreverse labels))
                                       assqs-button-alists)))
@@ -368,7 +368,7 @@ format of the argument MEANING-ALIST in the mentioned 
function."
                             (let ((append-list))
                               (dolist (elt TeX-bar-LaTeX-all-button-alists)
                                 (setq append-list (append append-list
-                                                          (eval elt))))
+                                                          (eval elt t))))
                               append-list)))
 
 ;;; Experimental Symbol Toolbar
diff --git a/tex-buf.el b/tex-buf.el
index ddb71b6..601d5a0 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -178,14 +178,14 @@ pinned region will get unpinned and vice versa."
   (let* ((begin (or TeX-command-region-begin (region-beginning)))
          (end (or TeX-command-region-end (region-end)))
          (TeX-region-extra
-         ;; Write out counter information to region.
-         (concat (and (fboundp 'preview--counter-information)
-                      (preview--counter-information begin))
-                 TeX-region-extra)))
+          ;; Write out counter information to region.
+          (concat (and (fboundp 'preview--counter-information)
+                       (preview--counter-information begin))
+                  TeX-region-extra)))
     (TeX-region-create (TeX-region-file TeX-default-extension)
                        (buffer-substring-no-properties begin end)
                        (file-name-nondirectory (buffer-file-name))
-                       (TeX-current-offset begin))))
+                       (TeX-current-offset TeX--begin))))
 
 (defun TeX-command-region (&optional override-confirm)
   "Run TeX on the current region.
@@ -1384,7 +1384,7 @@ Error parsing on \\[next-error] should work with a bit of 
luck."
   "Execute Lisp function or function call given as the string COMMAND.
 Parameters NAME and FILE are ignored."
   (let ((fun (car (read-from-string command))))
-    (if (functionp fun) (funcall fun) (eval fun))))
+    (if (functionp fun) (funcall fun) (eval fun t))))
 
 (defun TeX-run-discard-or-function (name command file)
   "Start COMMAND as process or execute it as a Lisp function.
diff --git a/tex-fold.el b/tex-fold.el
index d448890..2cf320e 100644
--- a/tex-fold.el
+++ b/tex-fold.el
@@ -1,4 +1,4 @@
-;;; tex-fold.el --- Fold TeX macros.
+;;; tex-fold.el --- Fold TeX macros.  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2004-2021  Free Software Foundation, Inc.
 
@@ -588,7 +588,7 @@ backward compatibility and always nil."
            (open-char (if delims (car delims) ?{))
            (open-string (char-to-string open-char))
            (close-char (if delims (cdr delims) ?}))
-           (close-string (char-to-string close-char))
+           ;; (close-string (char-to-string close-char))
            content-start content-end)
       (goto-char macro-start)
       (if (condition-case nil
@@ -794,7 +794,8 @@ That means, put respective properties onto overlay OV."
                     (t (or (TeX-fold-macro-nth-arg spec ov-start ov-end)
                            "[Error: No content found]"))))
          (display-string (if (listp computed) (car computed) computed))
-         (face (when (listp computed) (cadr computed))))
+         ;; (face (when (listp computed) (cadr computed)))
+         )
     ;; Do nothing if the overlay is empty.
     (when (and ov-start ov-end)
       ;; Cater for zero-length display strings.
diff --git a/tex-font.el b/tex-font.el
index 9fa53b3..5f483d8 100644
--- a/tex-font.el
+++ b/tex-font.el
@@ -1,4 +1,4 @@
-;;; tex-font.el --- Font-Lock support stolen from Emacs 21.
+;;; tex-font.el --- Font-Lock support stolen from Emacs 21.  -*- 
lexical-binding: t; -*-
 ;;
 ;; Copyright (C) 1985-2021  Free Software Foundation, Inc.
 
@@ -91,7 +91,7 @@
                                        "boldsymbol" "pmb")
                                      t))
                    (italic (regexp-opt '("textit" "textsl" "emph") t))
-                   (type (regexp-opt '("texttt" "textmd" "textrm" "textsf") t))
+                   ;; (type (regexp-opt '("texttt" "textmd" "textrm" "textsf") 
t))
                    ;;
                    ;; Names of commands whose arg should be fontified as a 
citation.
                    (citations (regexp-opt
diff --git a/tex-info.el b/tex-info.el
index e50fccc..185f755 100644
--- a/tex-info.el
+++ b/tex-info.el
@@ -1,4 +1,4 @@
-;;; tex-info.el --- Support for editing Texinfo source.
+;;; tex-info.el --- Support for editing Texinfo source.  -*- lexical-binding: 
t; -*-
 
 ;; Copyright (C) 1993-2021  Free Software Foundation, Inc.
 
@@ -171,7 +171,7 @@ environments."
     ;; Only change point and mark after beginning and end were found.
     ;; Point should not end up in the middle of nowhere if the search fails.
     (save-excursion
-      (dotimes (c count)
+      (dotimes (_ count)
         (Texinfo-find-env-end))
       (setq end (line-beginning-position 2))
       (goto-char cur)
@@ -247,20 +247,22 @@ the section."
                     (point)))))));  (if ...)
     (when (and beg end)
       ;; now take also enclosing node of beg and end
-      (dolist
-          (boundary '(beg end))
-        (when (symbol-value (intern (concat "is-" (symbol-name boundary)
-                                            "-section")))
-          (save-excursion
-            (goto-char (symbol-value boundary))
-            (while
-                (and
-                 (null (bobp))
-                 (progn
-                   (beginning-of-line 0)
-                   (looking-at "^\\s-*\\($\\|@\\(c\\|comment\\)\\_>\\)"))))
-            (when  (looking-at "^\\s-*@node\\_>")
-              (set boundary (point))))))
+      (let ((before-@node
+             (lambda (pos)
+               (save-excursion
+                 (goto-char pos)
+                 (while (and
+                         (null (bobp))
+                         (progn
+                           (beginning-of-line 0)
+                           (looking-at
+                            "^\\s-*\\($\\|@\\(c\\|comment\\)\\_>\\)"))))
+                 (when (looking-at "^\\s-*@node\\_>")
+                   (point))))))
+        (when is-beg-section
+          (setq beg (or (funcall before-@node beg) beg)))
+        (when is-end-section
+          (setq end (or (funcall before-@node end) end))))
 
       (push-mark end)
       (goto-char beg)
@@ -391,7 +393,7 @@ for @node."
               (progn (skip-chars-forward "^,") (forward-char 2))
             (throw 'break nil)))))))
 
-(defun Texinfo-arg-nodename (optional &optional prompt definition)
+(defun Texinfo-arg-nodename (optional &optional prompt _definition)
   "Prompt for a node name completing with known node names.
 OPTIONAL is ignored.
 Use PROMPT as the prompt string.
@@ -403,13 +405,13 @@ each invocation."
                                     (Texinfo-make-node-list))))
     (insert "{" (Texinfo-nodename-escape node-name) "}" )))
 
-(defun Texinfo-arg-lrc (optional &rest args)
+(defun Texinfo-arg-lrc (_optional &rest _args)
   (let ((l (read-from-minibuffer "Enter left part: "))
         (c (read-from-minibuffer "Enter center part: "))
         (r (read-from-minibuffer "Enter right part: ")))
     (insert " " l " @| " c " @| " r)))
 
-(defun Texinfo-arg-next-line (optional &rest args)
+(defun Texinfo-arg-next-line (_optional &rest _args)
   "Go to the beginning of next line if we are at the end of line. Otherwise 
insert an end-of-line."
   (if (eolp)  (forward-line) (insert "\n")))
 
diff --git a/tex-mik.el b/tex-mik.el
index fdf72a1..1f27d3a 100644
--- a/tex-mik.el
+++ b/tex-mik.el
@@ -1,6 +1,6 @@
-;;; tex-mik.el --- MiKTeX support for AUCTeX.
+;;; tex-mik.el --- MiKTeX support for AUCTeX.  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 1999, 2000, 2001, 2004, 2016 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2021  Free Software Foundation, Inc.
 
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Maintainer: auctex-devel@gnu.org
diff --git a/tex-site.el.in b/tex-site.el.in
index c4b5d0d..847bedd 100644
--- a/tex-site.el.in
+++ b/tex-site.el.in
@@ -1,4 +1,4 @@
-;;; tex-site.el - Site specific variables.  Don't edit.
+;;; tex-site.el - Site specific variables.  Don't edit.  -*- lexical-binding: 
t; -*-
 
 ;; Copyright (C) 2005-2021  Free Software Foundation, Inc.
 ;;
diff --git a/tex-style.el b/tex-style.el
index 13811e4..d1b513b 100644
--- a/tex-style.el
+++ b/tex-style.el
@@ -1,4 +1,4 @@
-;;; tex-style.el --- Customizable variables for AUCTeX style files
+;;; tex-style.el --- Customizable variables for AUCTeX style files  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 2005-2021  Free Software Foundation, Inc.
 
diff --git a/tex-wizard.el b/tex-wizard.el
index 5299d32..1597e27 100644
--- a/tex-wizard.el
+++ b/tex-wizard.el
@@ -1,4 +1,4 @@
-;;; tex-wizard.el --- Check the TeX configuration
+;;; tex-wizard.el --- Check the TeX configuration  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2003-2021 Free Software Foundation, Inc.
 
diff --git a/tex.el b/tex.el
index b6d1530..214fa41 100644
--- a/tex.el
+++ b/tex.el
@@ -1472,7 +1472,7 @@ predicates are true, nil otherwise."
         (result t)
         elt)
     (while (and (setq elt (pop pred-symbols)) result)
-      (unless (eval (cadr (assq elt pred-defs)))
+      (unless (eval (cadr (assq elt pred-defs)) t)
         (setq result nil)))
     result))
 
@@ -1803,7 +1803,7 @@ raise the Emacs frame like so:
   :type 'function
   :group 'TeX-view)
 
-(defun TeX-source-correlate-sync-source (file linecol &rest ignored)
+(defun TeX-source-correlate-sync-source (file linecol &rest _ignored)
   "Show TeX FILE with point at LINECOL.
 This function is called when emacs receives a SyncSource signal
 emitted from the Evince document viewer.  IGNORED absorbs an
@@ -3213,7 +3213,7 @@ Or alternatively:
                  (close (if (and (nth 3 entry)
                                  (listp (nth 3 entry))
                                  (symbolp (car (nth 3 entry))))
-                            (eval (nth 3 entry))
+                            (eval (nth 3 entry) t)
                           (nth 3 entry)))
                  (begin (match-beginning sub))
                  (end (match-end sub))
@@ -3614,7 +3614,7 @@ Unless optional argument COMPLETE is non-nil, ``: '' will 
be appended."
 (defun TeX-arg-maybe (symbol list form)
   "Evaluates FORM, if SYMBOL is an element of LIST."
   (when (memq symbol list)
-    (eval form)))
+    (eval form t)))
 
 (defun TeX-arg-free (optional &rest args)
   "Parse its arguments but use no braces when they are inserted."
@@ -4652,7 +4652,7 @@ If optional argument STRIP is non-nil, remove file 
extension."
          (rawdirs (nth 2 spec))
          (exts (nth 3 spec))
          expdirs dirs local-files)
-    (setq exts (if (symbolp exts) (eval exts) exts))
+    (setq exts (if (symbolp exts) (eval exts t) exts))
     (or (TeX-search-files-kpathsea kpse-var exts scope nodir strip)
         (progn
           (unless (eq scope 'global)
diff --git a/toolbar-x.el b/toolbar-x.el
index e17ee02..4e87d41 100644
--- a/toolbar-x.el
+++ b/toolbar-x.el
@@ -1,4 +1,4 @@
-;;; toolbar-x.el --- fancy toolbar handling in Emacs
+;;; toolbar-x.el --- fancy toolbar handling in Emacs  -*- lexical-binding: t; 
-*-
 
 ;; Copyright (C) 2004-2021  Free Software Foundation, Inc.
 
@@ -457,10 +457,11 @@ VAL (see documentation of function 
`toolbarx-process-symbol')."
   (let ((toolbarx-test-toolbar-type-simple
          (lambda (obj)
            (let* ((val (toolbarx-option-value obj))
-                  (all-but-def-opts '(top bottom left right))
-                  (all-opts '(default top bottom left right))
-                  (good-obj t))
-             (cons good-obj val)))))
+                  ;; (all-but-def-opts '(top bottom left right))
+                  ;; (all-opts '(default top bottom left right))
+                  ;; (good-obj t)
+                  )
+             (cons t val)))))
     (toolbarx-eval-function-or-symbol obj toolbarx-test-toolbar-type-simple)))
 
 (defun toolbarx-test-dropdown-type (obj)
@@ -623,7 +624,7 @@ value, and after that a list in the same format as 
SWITCHES."
    ((eq (car group) :eval-group)
     (let ((current-switches switches))
       (dolist (elt (cdr group) current-switches)
-        (let ((eval-elt (eval elt)))
+        (let ((eval-elt (eval elt t)))
           (setq current-switches
                 (toolbarx-process-group (if (listp eval-elt)
                                             eval-elt
@@ -1071,7 +1072,7 @@ function `toolbar-install-toolbar'."
                                                filtered-props-temp))))))))
          (insert (or (not (memq :insert filtered-props))
                      ;; (memq :insert filtered-props)
-                     (eval (nth 1 (memq :insert filtered-props))))))
+                     (eval (nth 1 (memq :insert filtered-props)) t))))
     (when insert
       (cond
        (t
@@ -1151,7 +1152,7 @@ recursively as SWITCHES.  USED-KEYS is a list which `car' 
is
 been used as keys in the keymap `tool-bar-map'."
   (dolist (button switches)
     (if (eq (car button) :insert)
-        (when (eval (cadr button))
+        (when (eval (cadr button) t)
           (toolbarx-emacs-refresh-process-button-or-insert-list (cddr button)
                                                                 used-keys
                                                                 keymap))



reply via email to

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