From 983d0df5e186d445d2b1936536363e9343fd0c60 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Fri, 1 Nov 2013 07:35:35 +0400 Subject: [PATCH] * lisp/progmodes/ruby-mode.el (ruby-indent-tabs-mode) (ruby-indent-level, ruby-comment-column, ruby-deep-arglist): Add property :safe. (ruby-deep-arglist): Add property :type. --- lisp/ChangeLog | 7 +++++++ lisp/progmodes/ruby-mode.el | 22 ++++++++++++---------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3cf01adddef..e99950276d8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2013-11-01 Bozhidar Batsov + + * progmodes/ruby-mode.el (ruby-indent-tabs-mode) + (ruby-indent-level, ruby-comment-column, ruby-deep-arglist): + Add property :safe. + (ruby-deep-arglist): Add property :type. + 2013-10-31 Glenn Morris * Makefile.in (custom-deps, finder-data): No need to setq the target diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 441f166396e..1a49f705dcb 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -216,20 +216,28 @@ This should only be called after matching against `ruby-here-doc-beg-re'." (defcustom ruby-indent-tabs-mode nil "Indentation can insert tabs in Ruby mode if this is non-nil." - :type 'boolean :group 'ruby) + :type 'boolean + :group 'ruby + :safe 'booleanp) (defcustom ruby-indent-level 2 "Indentation of Ruby statements." - :type 'integer :group 'ruby) + :type 'integer + :group 'ruby + :safe 'integerp) (defcustom ruby-comment-column (default-value 'comment-column) "Indentation column of comments." - :type 'integer :group 'ruby) + :type 'integer + :group 'ruby + :safe 'integerp) (defcustom ruby-deep-arglist t "Deep indent lists in parenthesis when non-nil. Also ignores spaces after parenthesis when 'space." - :group 'ruby) + :type 'boolean + :group 'ruby + :safe 'booleanp) (defcustom ruby-deep-indent-paren '(?\( ?\[ ?\] t) "Deep indent lists in parenthesis when non-nil. @@ -260,12 +268,6 @@ explicitly declared in magic comment." "Use `ruby-encoding-map' to set encoding magic comment if this is non-nil." :type 'boolean :group 'ruby) -;; Safe file variables -(put 'ruby-indent-tabs-mode 'safe-local-variable 'booleanp) -(put 'ruby-indent-level 'safe-local-variable 'integerp) -(put 'ruby-comment-column 'safe-local-variable 'integerp) -(put 'ruby-deep-arglist 'safe-local-variable 'booleanp) - ;;; SMIE support (require 'smie) -- 2.39.2