auctex-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/auctex 509a71b436 16/18: Revert "Mark options as buffer


From: Tassilo Horn
Subject: [elpa] externals/auctex 509a71b436 16/18: Revert "Mark options as buffer-local with the :local keyword"
Date: Sun, 17 Mar 2024 07:37:13 -0400 (EDT)

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

    Revert "Mark options as buffer-local with the :local keyword"
    
    This reverts commit 77a02f837a0d32e2f7b47764d6e7f64ad76001ba.
    
    The defcustom :local tag isn't handled correctly in Emacs 27.1.
    This issue was fixed with commit dea3d6aa18 and is available with
    Emacs 27.2.  AUCTeX can't use this tag until Emacs 28 the minimum
    required version.
    
    * tex.el (TeX-kill-process-without-query): Don't use :local
    keyword as well.
---
 context.el |  8 +++----
 latex.el   | 32 +++++++++++++++-------------
 tex.el     | 72 ++++++++++++++++++++++++++++++++------------------------------
 3 files changed, 58 insertions(+), 54 deletions(-)

diff --git a/context.el b/context.el
index 86991ccf93..29bbccd66a 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
-  :local t)
+  :safe #'stringp)
+(make-variable-buffer-local 'ConTeXt-Mark-version)
 
 (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
-  :local t)
+  :type 'string)
+(make-variable-buffer-local 'ConTeXt-default-environment)
 
 (TeX-auto-add-type "environment" "ConTeXt")
 
diff --git a/latex.el b/latex.el
index 1f84598d4e..8dfbf4fe86 100644
--- a/latex.el
+++ b/latex.el
@@ -1,6 +1,6 @@
 ;;; latex.el --- Support for LaTeX documents.  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 1991, 1993-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1991, 1993-2023 Free Software Foundation, Inc.
 
 ;; Maintainer: auctex-devel@gnu.org
 ;; Keywords: tex
@@ -69,8 +69,9 @@
   "Default options to documentclass.
 A comma-seperated list of strings."
   :group 'LaTeX-environment
-  :type '(repeat (string :format "%v"))
-  :local t)
+  :type '(repeat (string :format "%v")))
+
+(make-variable-buffer-local 'LaTeX-default-options)
 
 (defcustom LaTeX-insert-into-comments t
   "Whether insertion commands stay in comments.
@@ -560,8 +561,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
-  :local t)
+  :type 'string)
+(make-variable-buffer-local 'LaTeX-default-environment)
 
 (defvar-local LaTeX-default-document-environment nil
   "The default environment when creating new ones with
@@ -1008,8 +1009,8 @@ optional argument is omitted.)"
   :group 'LaTeX-environment
   :type '(choice (const :tag "Do not prompt" nil)
                  (const :tag "Empty" "")
-                 (string :format "%v"))
-  :local t)
+                 (string :format "%v")))
+(make-variable-buffer-local 'LaTeX-float)
 
 (defcustom LaTeX-top-caption-list nil
   "List of float environments with top caption."
@@ -1053,14 +1054,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
-  :local t)
+  :type 'string)
+(make-variable-buffer-local 'LaTeX-default-format)
 
 (defcustom LaTeX-default-width "1.0\\linewidth"
   "Default width for minipage and tabular* environments."
   :group 'LaTeX-environment
-  :type 'string
-  :local t)
+  :type 'string)
+(make-variable-buffer-local 'LaTeX-default-width)
 
 (defcustom LaTeX-default-position ""
   "Default position for array and tabular environments.
@@ -1068,8 +1069,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)
-  :local t)
+                 string))
+(make-variable-buffer-local 'LaTeX-default-position)
 
 (defcustom LaTeX-equation-label "eq:"
   "Default prefix to equation labels."
@@ -1154,8 +1155,9 @@ corresponding entry."
   :group 'LaTeX-label
   :type '(repeat (cons (string :tag "Environment")
                        (choice (string :tag "Label prefix")
-                               (symbol :tag "Label prefix symbol"))))
-  :local t)
+                               (symbol :tag "Label prefix symbol")))))
+
+(make-variable-buffer-local 'LaTeX-label-alist)
 
 (defvar TeX-read-label-prefix nil
   "Initial input for the label in `TeX-read-label'.")
diff --git a/tex.el b/tex.el
index f24752b75d..053a0ade6d 100644
--- a/tex.el
+++ b/tex.el
@@ -526,8 +526,8 @@ string."
 
 (defcustom TeX-command-extra-options ""
   "String with the extra options to be given to the TeX processor."
-  :type 'string
-  :local t)
+  :type 'string)
+(make-variable-buffer-local 'TeX-command-extra-options)
 
 (defvar TeX-command-text nil
   "Dynamically bound by `TeX-command-expand'.")
@@ -1601,8 +1601,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)))
-  :local t)
+  :safe (lambda (arg) (memq arg (mapcar #'car TeX-engine-alist-builtin))))
+(make-variable-buffer-local 'TeX-engine)
 
 (defun TeX-engine-set (type)
   "Set TeX engine to TYPE.
@@ -2117,17 +2117,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.
-  :local t)
+  :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)
 
 (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
-  :local t)
+  :safe #'booleanp)
+(make-variable-buffer-local 'TeX-PDF-via-dvips-ps2pdf)
 (make-obsolete-variable 'TeX-PDF-via-dvips-ps2pdf 'TeX-PDF-from-DVI "11.90")
 
 (defun TeX-PDF-from-DVI ()
@@ -2158,21 +2158,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
-  :local t)
+  :type 'string)
+  (make-variable-buffer-local 'TeX-command-BibTeX)
 
 (defcustom TeX-command-Biber "Biber"
   "The name of the Biber entry in `TeX-command-list'."
   :group 'TeX-command-name
-  :type 'string
-  :local t)
+  :type 'string)
+  (make-variable-buffer-local 'TeX-command-Biber)
 
 (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
-  :local t)
+  :type 'string)
+  (make-variable-buffer-local 'TeX-command-Show)
 
 (defcustom TeX-command-Print "Print"
   "The name of the Print entry in `TeX-command-Print'."
@@ -2293,8 +2293,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)))))
-  :local t)
+              (member x (quote (t nil shared dwim))))))
+(make-variable-buffer-local 'TeX-master)
 
 (defcustom TeX-one-master "\\.\\(texi?\\|dtx\\)$"
   "Regular expression matching ordinary TeX files.
@@ -2532,8 +2532,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"))
-  :local t)
+                 (string :tag "Custom" "build")))
+(make-variable-buffer-local 'TeX-output-dir)
 
 (defun TeX--master-output-dir (master-dir relative-to-master &optional ensure)
   "Return the directory path where output files should be placed.
@@ -3266,8 +3266,9 @@ 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
-  :local t)
+  :type 'string)
+
+(make-variable-buffer-local 'TeX-default-macro)
 
 (defcustom TeX-insert-braces t
   "If non-nil, append an empty pair of braces after inserting a macro.
@@ -3288,8 +3289,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?")))
-  :local t)
+                       (boolean :tag "Append braces?"))))
+(make-variable-buffer-local 'TeX-insert-braces-alist)
 
 (defcustom TeX-insert-macro-default-style 'show-optional-args
   "Specifies whether `TeX-insert-macro' will ask for all optional arguments.
@@ -4308,8 +4309,8 @@ It can also be a name of a variable having such value."
                         (group (regexp :tag "Match")
                                (sexp :tag "Groups")
                                symbol)))
-  :group 'TeX-parse
-  :local t)
+  :group 'TeX-parse)
+  (make-variable-buffer-local 'TeX-auto-regexp-list)
 
 (defun TeX-auto-add-regexp (regexp)
   "Add REGEXP to `TeX-auto-regexp-list' if not already a member."
@@ -4356,16 +4357,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
-  :local t)
+  :type 'integer)
+  (make-variable-buffer-local 'TeX-auto-parse-length)
 
 (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
-  :local t)
+  :type 'integer)
+  (make-variable-buffer-local 'TeX-auto-x-parse-length)
 
 (defcustom TeX-auto-x-regexp-list 'LaTeX-auto-label-regexp-list
   "List of regular expressions used for additional parsing.
@@ -4382,8 +4383,8 @@ See `TeX-auto-x-parse-length'."
                         (group (regexp :tag "Match")
                                (sexp :tag "Groups")
                                symbol)))
-  :group 'TeX-parse
-  :local t)
+  :group 'TeX-parse)
+  (make-variable-buffer-local 'TeX-auto-x-regexp-list)
 
 (defun TeX-regexp-group-count (regexp)
   "Return number of groups in a REGEXP.  This is not foolproof:
@@ -4533,8 +4534,9 @@ Check for potential LaTeX environments."
 (defcustom TeX-default-extension "tex"
   "Default extension for TeX files."
   :group 'TeX-file-extension
-  :type 'string
-  :local t)
+  :type 'string)
+
+  (make-variable-buffer-local 'TeX-default-extension)
 
 (defvar TeX-doc-extensions
   '("dvi" "pdf" "ps" "txt" "html" "dvi\\.gz" "pdf\\.gz" "ps\\.gz" "txt\\.gz"
@@ -8766,9 +8768,9 @@ Return nil only if no process buffer exists."
 (defcustom TeX-kill-process-without-query nil
   "If non-nil, abort a running document process without user query."
   :type 'boolean
-  :local t
   :safe #'booleanp
   :group 'TeX-command)
+(make-variable-buffer-local 'TeX-kill-process-without-query)
 
 (defun TeX-process-check (name)
   "Check if a process for the TeX document NAME already exists.




reply via email to

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