branch: externals/auctex commit 96cad452137f8ff98dff4fde8d0ff847f4598d03 Author: Arash Esbati <ar...@gnu.org> Commit: Arash Esbati <ar...@gnu.org>
; Use `defvar-local' * preview.el.in (TeX-active-tempdir, preview-parsed-font-size) (preview-parsed-magnification, preview-parsed-pdfoutput) (preview-parsed-counters, preview-parsed-tightpage) (preview-gs-queue, preview-gs-outstanding, preview-gs-answer) (preview-gs-image-type, preview-gs-sequence, preview-scale) (preview-colors, preview-gs-init-string, preview-ps-file) (preview-gs-dsc, preview-resolution, preview-gs-command-line) (preview-gs-file, preview-last-location) (preview-buffer-has-counters): Use `defvar-local'. --- preview.el.in | 70 +++++++++++++++++++++++------------------------------------ 1 file changed, 27 insertions(+), 43 deletions(-) diff --git a/preview.el.in b/preview.el.in index 1e1b5ee5ab..0fa211ccfc 100644 --- a/preview.el.in +++ b/preview.el.in @@ -1,6 +1,6 @@ ;;; preview.el --- embed preview LaTeX images in source buffer -*- lexical-binding: t; -*- -;; Copyright (C) 2001-2023 Free Software Foundation, Inc. +;; Copyright (C) 2001-2024 Free Software Foundation, Inc. ;; Author: David Kastrup ;; Keywords: tex, wp, convenience @@ -245,9 +245,8 @@ that is." (apply (car hook) (append (cdr hook) rest))))) -(defvar TeX-active-tempdir nil +(defvar-local TeX-active-tempdir nil "List of directory name, top directory name and reference count.") -(make-variable-buffer-local 'TeX-active-tempdir) (defcustom preview-bb-filesize 1024 "Size of file area scanned for bounding box information." @@ -289,21 +288,20 @@ If `preview-fast-conversion' is set, this option is not :group 'preview-gs :type 'number) -(defvar preview-parsed-font-size nil +(defvar-local preview-parsed-font-size nil "Font size as parsed from the log of LaTeX run.") -(make-variable-buffer-local 'preview-parsed-font-size) -(defvar preview-parsed-magnification nil + +(defvar-local preview-parsed-magnification nil "Magnification as parsed from the log of LaTeX run.") -(make-variable-buffer-local 'preview-parsed-magnification) -(defvar preview-parsed-pdfoutput nil + +(defvar-local preview-parsed-pdfoutput nil "PDFoutput as parsed from the log of LaTeX run.") -(make-variable-buffer-local 'preview-parsed-pdfoutput) -(defvar preview-parsed-counters nil + +(defvar-local preview-parsed-counters nil "Counters as parsed from the log of LaTeX run.") -(make-variable-buffer-local 'preview-parsed-counters) -(defvar preview-parsed-tightpage nil + +(defvar-local preview-parsed-tightpage nil "Tightpage as parsed from the log of LaTeX run.") -(make-variable-buffer-local 'preview-parsed-tightpage) (defun preview-get-magnification () "Get magnification from `preview-parsed-magnification'." @@ -364,14 +362,12 @@ See also `preview-gs-command'." :group 'preview-gs :type '(repeat string)) -(defvar preview-gs-queue nil +(defvar-local preview-gs-queue nil "List of overlays to convert using gs. Buffer-local to the appropriate TeX process buffer.") -(make-variable-buffer-local 'preview-gs-queue) -(defvar preview-gs-outstanding nil +(defvar-local preview-gs-outstanding nil "Overlays currently processed.") -(make-variable-buffer-local 'preview-gs-outstanding) (defcustom preview-gs-outstanding-limit 2 "Number of requests allowed to be outstanding. @@ -390,49 +386,40 @@ follow changes in the displayed buffer area faster." (< value 10)))) :tag "small number")) -(defvar preview-gs-answer nil +(defvar-local preview-gs-answer nil "Accumulated answer of Ghostscript process.") -(make-variable-buffer-local 'preview-gs-answer) -(defvar preview-gs-image-type nil +(defvar-local preview-gs-image-type nil "Image type for gs produced images.") -(make-variable-buffer-local 'preview-gs-image-type) -(defvar preview-gs-sequence nil +(defvar-local preview-gs-sequence nil "Pair of sequence numbers for gs produced images.") -(make-variable-buffer-local 'preview-gs-sequence) -(defvar preview-scale nil +(defvar-local preview-scale nil "Screen scale of images. Magnify by this factor to make images blend with other screen content. Buffer-local to rendering buffer.") -(make-variable-buffer-local 'preview-scale) -(defvar preview-colors nil +(defvar-local preview-colors nil "Color setup list. An array with elements 0, 1 and 2 for background, foreground and border colors, respectively. Each element is a list of 3 real numbers between 0 and 1, or nil of nothing special should be done for the color") -(make-variable-buffer-local 'preview-colors) -(defvar preview-gs-init-string nil +(defvar-local preview-gs-init-string nil "Ghostscript setup string.") -(make-variable-buffer-local 'preview-gs-init-string) -(defvar preview-ps-file nil +(defvar-local preview-ps-file nil "PostScript file name for fast conversion.") -(make-variable-buffer-local 'preview-ps-file) -(defvar preview-gs-dsc nil +(defvar-local preview-gs-dsc nil "Parsed DSC information.") -(make-variable-buffer-local 'preview-gs-dsc) -(defvar preview-resolution nil +(defvar-local preview-resolution nil "Screen resolution where rendering started. Cons-cell of x and y resolution, given in dots per inch. Buffer-local to rendering buffer.") -(make-variable-buffer-local 'preview-resolution) (defun preview-gs-resolution (scale xres yres) "Generate resolution argument for gs. @@ -452,10 +439,9 @@ show as response of Ghostscript." (overlay-put ov 'queued nil)) ov)) -(defvar preview-gs-command-line nil) -(make-variable-buffer-local 'preview-gs-command-line) -(defvar preview-gs-file nil) -(make-variable-buffer-local 'preview-gs-file) +(defvar-local preview-gs-command-line nil) + +(defvar-local preview-gs-file nil) (defcustom preview-fast-conversion t "Set this for single-file PostScript conversion. @@ -1993,9 +1979,8 @@ purposes." (defvar preview-temporary-opened nil) -(defvar preview-last-location nil +(defvar-local preview-last-location nil "Restored cursor position marker for reopened previews.") -(make-variable-buffer-local 'preview-last-location) (defun preview-mark-point () "Mark position for fake intangibility." @@ -2565,8 +2550,7 @@ it gets deleted as well." (setcdr file nil) (delete-directory (nth 0 tempdir))))))))) -(defvar preview-buffer-has-counters nil) -(make-variable-buffer-local 'preview-buffer-has-counters) +(defvar-local preview-buffer-has-counters nil) (defun preview-place-preview (snippet start end box counters tempdir place-opts)