bug-auctex
[Top][All Lists]
Advanced

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

bug#66485: 13.2.1; preview-scale-function should be safe for numberp


From: Arash Esbati
Subject: bug#66485: 13.2.1; preview-scale-function should be safe for numberp
Date: Mon, 16 Oct 2023 23:09:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

David Kastrup <dak@gnu.org> writes:

> Possibly
>
> (lambda (x) (and (numberp x) (<= 0.1 x 10)))

Yes, of course, thanks.  I'll push the following change tomorrow unless
there are other comments:

--8<---------------cut here---------------start------------->8---
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'.
--8<---------------cut here---------------end--------------->8---

Best, Arash





reply via email to

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