Subject: 24.2.50; safe-local-variable property for js indent variables

From: Daiki Ueno <[email-masked]>
Date: Wed, 22 Aug 2012 12:55:10 +0900

Hi,

Since most of js files in gnome-shell contain the following line:

// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-

I'm asked "values that may not be safe" question each time when I open
such a files.  It might be good to have :safe property for such a
variables for indent, as python.el does?

=== modified file 'lisp/progmodes/js.el'
--- lisp/progmodes/js.el	2012-07-11 23:13:41 +0000
+++ lisp/progmodes/js.el	2012-08-22 03:33:17 +0000
@@ -426,18 +426,21 @@
 (defcustom js-indent-level 4
   "Number of spaces for each indentation step in `js-mode'."
   :type 'integer
+  :safe 'integerp
   :group 'js)
 
 (defcustom js-expr-indent-offset 0
   "Number of additional spaces for indenting continued expressions.
 The value must be no less than minus `js-indent-level'."
   :type 'integer
+  :safe 'integerp
   :group 'js)
 
 (defcustom js-paren-indent-offset 0
   "Number of additional spaces for indenting expressions in parentheses.
 The value must be no less than minus `js-indent-level'."
   :type 'integer
+  :safe 'integerp
   :group 'js
   :version "24.1")
 
@@ -445,6 +448,7 @@
   "Number of additional spaces for indenting expressions in square braces.
 The value must be no less than minus `js-indent-level'."
   :type 'integer
+  :safe 'integerp
   :group 'js
   :version "24.1")
 
@@ -452,6 +456,7 @@
   "Number of additional spaces for indenting expressions in curly braces.
 The value must be no less than minus `js-indent-level'."
   :type 'integer
+  :safe 'integerp
   :group 'js
   :version "24.1")

Regards,
-- 
Daiki Ueno