branch: externals/auctex
commit 217b46b2cf8ab98dd535677e8e2756d416731499
Author: Arash Esbati <[email protected]>
Commit: Arash Esbati <[email protected]>
Allow `preview-scale-function' as a file-local variable
* preview.el.in (preview-scale-function): Allow the variable to be
set as a file-local one, but restrict the value which can be
assigned this way. (bug#66485)
---
preview.el.in | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/preview.el.in b/preview.el.in
index af0997aad6..1e1b5ee5ab 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-2022 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2023 Free Software Foundation, Inc.
;; Author: David Kastrup
;; Keywords: tex, wp, convenience
@@ -1488,6 +1488,9 @@ a fixed number."
(const 1.0)
(number :value 1.0)
(function :value preview-scale-from-face)))
+;;;###autoload
+(put 'preview-scale-function 'safe-local-variable
+ (lambda (x) (and (numberp x) (<= 0.1 x 10))))
(defcustom preview-default-document-pt 10
"Assumed document point size for `preview-scale-from-face'.