[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 217b46b2: Allow `preview-scale-function' as a file-local variable
From: |
Arash Esbati |
Subject: |
master 217b46b2: Allow `preview-scale-function' as a file-local variable |
Date: |
Tue, 17 Oct 2023 11:33:28 -0400 (EDT) |
branch: master
commit 217b46b2cf8ab98dd535677e8e2756d416731499
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
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 af0997aa..1e1b5ee5 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'.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 217b46b2: Allow `preview-scale-function' as a file-local variable,
Arash Esbati <=