File: 0003-safe-local-variable.patch

package info (click to toggle)
sml-mode 6.7-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 404 kB
  • ctags: 548
  • sloc: lisp: 3,751; makefile: 6; sh: 5
file content (27 lines) | stat: -rw-r--r-- 777 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From: "Barak A. Pearlmutter" <barak+git@pearlmutter.net>
Date: Mon, 14 Sep 2015 14:46:25 +0100
Subject: safe local variable

Declare sml-indent-level to be safe for per-file initialization.
See https://bugs.debian.org/717440
which suggests
    (put 'sml-indent-level 'safe-local-variable 'integerp)
This patch instead adds an option to defcustom.
---
 sml-mode.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sml-mode.el b/sml-mode.el
index dbae4af..8939ee9 100644
--- a/sml-mode.el
+++ b/sml-mode.el
@@ -123,7 +123,8 @@
 
 (defcustom sml-indent-level 4
   "Basic indentation step for SML code."
-  :type 'integer)
+  :type 'integer
+  :safe 'integerp)
 
 (defcustom sml-indent-args sml-indent-level
   "Indentation of args placed on a separate line."