auctex-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/auctex 77a02f837a 30/43: Mark options as buffer-local w


From: Tassilo Horn
Subject: [elpa] externals/auctex 77a02f837a 30/43: Mark options as buffer-local with the :local keyword
Date: Wed, 7 Feb 2024 06:07:13 -0500 (EST)

branch: externals/auctex
commit 77a02f837a0d32e2f7b47764d6e7f64ad76001ba
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>

    Mark options as buffer-local with the :local keyword
    
    * context.el (ConTeXt-Mark-version, ConTeXt-default-environment):
    * latex.el (LaTeX-default-options, LaTeX-default-environment)
    (LaTeX-float, LaTeX-default-format, LaTeX-default-width)
    (LaTeX-default-position, LaTeX-label-alist):
    * tex.el (TeX-command-extra-options, TeX-PDF-from-DVI)
    (TeX-PDF-via-dvips-ps2pdf, TeX-command-BibTeX)
    (TeX-command-Biber, TeX-command-Show, TeX-master)
    (TeX-output-dir, TeX-default-macro, TeX-insert-braces-alist)
    (TeX-auto-regexp-list, TeX-auto-parse-length)
    (TeX-auto-x-parse-length, TeX-auto-x-regexp-list)
    (TeX-default-extension): Set the :local keyword to t to mark the
    option as automatically buffer-local.
---
 context.el |  8 +++----
 latex.el   | 32 ++++++++++++++--------------
 tex.el     | 70 ++++++++++++++++++++++++++++++--------------------------------
 3 files changed, 53 insertions(+), 57 deletions(-)

diff --git a/context.el b/context.el
index 10c1c180d3..c219237dda 100644
--- a/context.el
+++ b/context.el
@@ -496,8 +496,8 @@ in your init file such as .emacs.d/init.el or .emacs."
   "ConTeXt Mark version used for running ConTeXt."
   :type 'string
   :group 'TeX-command
-  :safe #'stringp)
-(make-variable-buffer-local 'ConTeXt-Mark-version)
+  :safe #'stringp
+  :local t)
 
 (defun ConTeXt-numbered-section-heading ()
   "Hook to prompt for ConTeXt section name.
@@ -626,8 +626,8 @@ for a label to be inserted after the sectioning command."
 (defcustom ConTeXt-default-environment "itemize"
   "The default environment when creating new ones with `ConTeXt-environment'."
   :group 'ConTeXt-environment
-  :type 'string)
-(make-variable-buffer-local 'ConTeXt-default-environment)
+  :type 'string
+  :local t)
 
 (TeX-auto-add-type "environment" "ConTeXt")
 
diff --git a/latex.el b/latex.el
index 8d734eff04..6da12d457b 100644
--- a/latex.el
+++ b/latex.el
@@ -1,6 +1,6 @@
 ;;; latex.el --- Support for LaTeX documents.  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 1991, 1993-2023 Free Software Foundation, Inc.
+;; Copyright (C) 1991, 1993-2024 Free Software Foundation, Inc.
 
 ;; Maintainer: auctex-devel@gnu.org
 ;; Keywords: tex
@@ -69,9 +69,8 @@
   "Default options to documentclass.
 A comma-seperated list of strings."
   :group 'LaTeX-environment
-  :type '(repeat (string :format "%v")))
-
-(make-variable-buffer-local 'LaTeX-default-options)
+  :type '(repeat (string :format "%v"))
+  :local t)
 
 (defcustom LaTeX-insert-into-comments t
   "Whether insertion commands stay in comments.
@@ -554,8 +553,8 @@ The behaviour of this hook is controlled by variable 
`LaTeX-section-label'."
 It is overridden by `LaTeX-default-document-environment' when it
 is non-nil and the current environment is \"document\"."
   :group 'LaTeX-environment
-  :type 'string)
-(make-variable-buffer-local 'LaTeX-default-environment)
+  :type 'string
+  :local t)
 
 (defvar-local LaTeX-default-document-environment nil
   "The default environment when creating new ones with
@@ -1002,8 +1001,8 @@ optional argument is omitted.)"
   :group 'LaTeX-environment
   :type '(choice (const :tag "Do not prompt" nil)
                  (const :tag "Empty" "")
-                 (string :format "%v")))
-(make-variable-buffer-local 'LaTeX-float)
+                 (string :format "%v"))
+  :local t)
 
 (defcustom LaTeX-top-caption-list nil
   "List of float environments with top caption."
@@ -1047,14 +1046,14 @@ code listings and take a caption and label."
 (defcustom LaTeX-default-format ""
   "Default format for array and tabular environments."
   :group 'LaTeX-environment
-  :type 'string)
-(make-variable-buffer-local 'LaTeX-default-format)
+  :type 'string
+  :local t)
 
 (defcustom LaTeX-default-width "1.0\\linewidth"
   "Default width for minipage and tabular* environments."
   :group 'LaTeX-environment
-  :type 'string)
-(make-variable-buffer-local 'LaTeX-default-width)
+  :type 'string
+  :local t)
 
 (defcustom LaTeX-default-position ""
   "Default position for array and tabular environments.
@@ -1062,8 +1061,8 @@ If nil, act like the empty string is given, but do not 
prompt."
   :group 'LaTeX-environment
   :type '(choice (const :tag "Do not prompt" nil)
                  (const :tag "Empty" "")
-                 string))
-(make-variable-buffer-local 'LaTeX-default-position)
+                 string)
+  :local t)
 
 (defcustom LaTeX-equation-label "eq:"
   "Default prefix to equation labels."
@@ -1148,9 +1147,8 @@ corresponding entry."
   :group 'LaTeX-label
   :type '(repeat (cons (string :tag "Environment")
                        (choice (string :tag "Label prefix")
-                               (symbol :tag "Label prefix symbol")))))
-
-(make-variable-buffer-local 'LaTeX-label-alist)
+                               (symbol :tag "Label prefix symbol"))))
+  :local t)
 
 (defvar TeX-read-label-prefix nil
   "Initial input for the label in `TeX-read-label'.")
diff --git a/tex.el b/tex.el
index 5a35d98177..7691b75959 100644
--- a/tex.el
+++ b/tex.el
@@ -511,8 +511,8 @@ string."
 
 (defcustom TeX-command-extra-options ""
   "String with the extra options to be given to the TeX processor."
-  :type 'string)
-(make-variable-buffer-local 'TeX-command-extra-options)
+  :type 'string
+  :local t)
 
 (defvar TeX-command-text nil
   "Dynamically bound by `TeX-command-expand'.")
@@ -1579,8 +1579,8 @@ It should be one of the following symbols:\n\n"
   :type `(choice ,@(mapcar (lambda (x)
                              `(const :tag ,(nth 1 x) ,(car x)))
                            (TeX-engine-alist)))
-  :safe (lambda (arg) (memq arg (mapcar #'car TeX-engine-alist-builtin))))
-(make-variable-buffer-local 'TeX-engine)
+  :safe (lambda (arg) (memq arg (mapcar #'car TeX-engine-alist-builtin)))
+  :local t)
 
 (defun TeX-engine-set (type)
   "Set TeX engine to TYPE.
@@ -2093,17 +2093,17 @@ Programs should not use this variable directly but the 
function
           (const :tag "No DVI to PDF conversion" nil)
           (const :tag "dvips - ps2pdf sequence" "Dvips")
           (const :tag "dvipdfmx" "Dvipdfmx"))
-  :safe #'string-or-null-p)
-;; If you plan to support new values of `TeX-PDF-from-DVI' remember to update
-;; `TeX-command-default' accordingly.
-(make-variable-buffer-local 'TeX-PDF-from-DVI)
+  :safe #'string-or-null-p
+  ;; If you plan to support new values of `TeX-PDF-from-DVI' remember
+  ;; to update `TeX-command-default' accordingly.
+  :local t)
 
 (defcustom TeX-PDF-via-dvips-ps2pdf nil
   "Whether to produce PDF output through the (La)TeX - dvips - ps2pdf 
sequence."
   :group 'TeX-command
   :type 'boolean
-  :safe #'booleanp)
-(make-variable-buffer-local 'TeX-PDF-via-dvips-ps2pdf)
+  :safe #'booleanp
+  :local t)
 (make-obsolete-variable 'TeX-PDF-via-dvips-ps2pdf 'TeX-PDF-from-DVI "11.90")
 
 (defun TeX-PDF-from-DVI ()
@@ -2134,21 +2134,21 @@ for backward compatibility."
 (defcustom TeX-command-BibTeX "BibTeX"
   "The name of the BibTeX entry in `TeX-command-list'."
   :group 'TeX-command-name
-  :type 'string)
-  (make-variable-buffer-local 'TeX-command-BibTeX)
+  :type 'string
+  :local t)
 
 (defcustom TeX-command-Biber "Biber"
   "The name of the Biber entry in `TeX-command-list'."
   :group 'TeX-command-name
-  :type 'string)
-  (make-variable-buffer-local 'TeX-command-Biber)
+  :type 'string
+  :local t)
 
 (defcustom TeX-command-Show "View"
   "The default command to show (view or print) a TeX file.
 Must be the car of an entry in `TeX-command-list'."
   :group 'TeX-command-name
-  :type 'string)
-  (make-variable-buffer-local 'TeX-command-Show)
+  :type 'string
+  :local t)
 
 (defcustom TeX-command-Print "Print"
   "The name of the Print entry in `TeX-command-Print'."
@@ -2269,8 +2269,8 @@ It is suggested that you use the File Variables (see the 
info node
                  (string :format "%v"))
   :safe (lambda (x)
           (or (stringp x)
-              (member x (quote (t nil shared dwim))))))
-(make-variable-buffer-local 'TeX-master)
+              (member x (quote (t nil shared dwim)))))
+  :local t)
 
 (defcustom TeX-one-master "\\.\\(texi?\\|dtx\\)$"
   "Regular expression matching ordinary TeX files.
@@ -2508,8 +2508,8 @@ is assumed to be the same as the directory of 
`TeX-master'."
   :group 'TeX-file
   :safe #'string-or-null-p
   :type '(choice (const :tag "Directory of master file" nil)
-                 (string :tag "Custom" "build")))
-(make-variable-buffer-local 'TeX-output-dir)
+                 (string :tag "Custom" "build"))
+  :local t)
 
 (defun TeX--master-output-dir (master-dir relative-to-master &optional ensure)
   "Return the directory path where output files should be placed.
@@ -3238,9 +3238,8 @@ See `completion-at-point-functions'."
 (defcustom TeX-default-macro "ref"
   "The default macro when creating new ones with `TeX-insert-macro'."
   :group 'TeX-macro
-  :type 'string)
-
-(make-variable-buffer-local 'TeX-default-macro)
+  :type 'string
+  :local t)
 
 (defcustom TeX-insert-braces t
   "If non-nil, append an empty pair of braces after inserting a macro.
@@ -3261,8 +3260,8 @@ will use its value to decide what to do, whatever the 
value of
 the variable `TeX-insert-braces'."
   :group 'TeX-macro
   :type '(repeat (cons (string :tag "Macro name")
-                       (boolean :tag "Append braces?"))))
-(make-variable-buffer-local 'TeX-insert-braces-alist)
+                       (boolean :tag "Append braces?")))
+  :local t)
 
 (defcustom TeX-insert-macro-default-style 'show-optional-args
   "Specifies whether `TeX-insert-macro' will ask for all optional arguments.
@@ -4228,8 +4227,8 @@ It can also be a name of a variable having such value."
                         (group (regexp :tag "Match")
                                (sexp :tag "Groups")
                                symbol)))
-  :group 'TeX-parse)
-  (make-variable-buffer-local 'TeX-auto-regexp-list)
+  :group 'TeX-parse
+  :local t)
 
 (defun TeX-auto-add-regexp (regexp)
   "Add REGEXP to `TeX-auto-regexp-list' if not already a member."
@@ -4276,16 +4275,16 @@ alter the numbering of any ordinary, non-shy groups.")
 (defcustom TeX-auto-parse-length 999999
   "Maximal length of TeX file (in characters) that will be parsed."
   :group 'TeX-parse
-  :type 'integer)
-  (make-variable-buffer-local 'TeX-auto-parse-length)
+  :type 'integer#
+  :local t)
 
 (defcustom TeX-auto-x-parse-length 0
   "Maximum length of TeX file that will be parsed additionally.
 Use `TeX-auto-x-regexp-list' for parsing the region between
 `TeX-auto-parse-length' and this value."
   :group 'TeX-parse
-  :type 'integer)
-  (make-variable-buffer-local 'TeX-auto-x-parse-length)
+  :type 'integer
+  :local t)
 
 (defcustom TeX-auto-x-regexp-list 'LaTeX-auto-label-regexp-list
   "List of regular expressions used for additional parsing.
@@ -4302,8 +4301,8 @@ See `TeX-auto-x-parse-length'."
                         (group (regexp :tag "Match")
                                (sexp :tag "Groups")
                                symbol)))
-  :group 'TeX-parse)
-  (make-variable-buffer-local 'TeX-auto-x-regexp-list)
+  :group 'TeX-parse
+  :local t)
 
 (defun TeX-regexp-group-count (regexp)
   "Return number of groups in a REGEXP.  This is not foolproof:
@@ -4453,9 +4452,8 @@ Check for potential LaTeX environments."
 (defcustom TeX-default-extension "tex"
   "Default extension for TeX files."
   :group 'TeX-file-extension
-  :type 'string)
-
-  (make-variable-buffer-local 'TeX-default-extension)
+  :type 'string
+  :local t)
 
 (defvar TeX-doc-extensions
   '("dvi" "pdf" "ps" "txt" "html" "dvi\\.gz" "pdf\\.gz" "ps\\.gz" "txt\\.gz"




reply via email to

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