all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bozhidar Batsov <bozhidar.batsov@gmail.com>
To: emacs-devel@gnu.org
Subject: [PATCH] * lisp/progmodes/ruby-mode.el: Mark defcustoms as safe with :safe keyword argument.
Date: Thu, 31 Oct 2013 15:23:59 +0200	[thread overview]
Message-ID: <8DEA52127F624E32800195DEA2A5F375@gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 86 bytes --]

Just a minor improvement to ruby-mode’s defcustoms.  

--  
Cheers,
Bozhidar


[-- Attachment #1.2: Type: text/html, Size: 284 bytes --]

[-- Attachment #2: 0001-lisp-progmodes-ruby-mode.el-Mark-defcustoms-as-safe-.patch --]
[-- Type: application/octet-stream, Size: 1937 bytes --]

From 37d763ea2a241bfbe8a53a62b8f19d5f1edf0f13 Mon Sep 17 00:00:00 2001
From: Bozhidar Batsov <bozhidar@batsov.com>
Date: Thu, 31 Oct 2013 15:16:58 +0200
Subject: [PATCH] * lisp/progmodes/ruby-mode.el: Mark defcustoms as safe with
 :safe   keyword argument.

---
 lisp/progmodes/ruby-mode.el | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index 441f166..d92928b 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -216,20 +216,20 @@ 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 +260,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)
-- 
1.8.4


             reply	other threads:[~2013-10-31 13:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-31 13:23 Bozhidar Batsov [this message]
2013-11-01  3:36 ` [PATCH] * lisp/progmodes/ruby-mode.el: Mark defcustoms as safe with :safe keyword argument Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8DEA52127F624E32800195DEA2A5F375@gmail.com \
    --to=bozhidar.batsov@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.