From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] * lisp/progmodes/ruby-mode.el: Mark defcustoms as safe with :safe keyword argument. Date: Fri, 01 Nov 2013 07:36:19 +0400 Message-ID: <87iowcbxos.fsf@yandex.ru> References: <8DEA52127F624E32800195DEA2A5F375@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1383276996 31052 80.91.229.3 (1 Nov 2013 03:36:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 Nov 2013 03:36:36 +0000 (UTC) Cc: emacs-devel@gnu.org To: Bozhidar Batsov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 01 04:36:40 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vc5XL-0006Ii-Rt for ged-emacs-devel@m.gmane.org; Fri, 01 Nov 2013 04:36:40 +0100 Original-Received: from localhost ([::1]:60168 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vc5XL-0000un-Fa for ged-emacs-devel@m.gmane.org; Thu, 31 Oct 2013 23:36:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39354) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vc5XD-0000ub-FC for emacs-devel@gnu.org; Thu, 31 Oct 2013 23:36:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vc5X8-0001dO-9E for emacs-devel@gnu.org; Thu, 31 Oct 2013 23:36:31 -0400 Original-Received: from mail-la0-x22c.google.com ([2a00:1450:4010:c03::22c]:58827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vc5X8-0001bf-0p for emacs-devel@gnu.org; Thu, 31 Oct 2013 23:36:26 -0400 Original-Received: by mail-la0-f44.google.com with SMTP id ep20so3008592lab.31 for ; Thu, 31 Oct 2013 20:36:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=EB9JcNP45OGmMasIIWr7UrIWg+WaGH9IOyPdkuM0utQ=; b=RKz7VRmwhd+HC975XniIG+vIQrbmrD365j/EH8Gy4BBxDAbAwxT/6zGIYZhNKpOmhN tk14Wm2xC/Bxp6csZWS+1khuk96oEjpMQlK2ony73SoQzL9V3xttwCNfQR++8XFKLOHA h4+vZWAg3imzb4ECZnxLyDZUf2/4xfkcFxElLvXvXeK6gaXtyJ6QHhJkujRkEKf1s6jE u1axEW5fgek4cuByutejOnNyYyrlkcJGOQopCLKTSNRGUoY44MBbuFxSj1qzv7zHj+S2 WijR9gY02WfYOw1oIjJal0NsqbnHoByUEoJpFjyrUTL9a+x/ffvPcS/Ticps3pvcgLVS +Dtg== X-Received: by 10.112.51.101 with SMTP id j5mr497792lbo.17.1383276984929; Thu, 31 Oct 2013 20:36:24 -0700 (PDT) Original-Received: from axl ([178.252.98.87]) by mx.google.com with ESMTPSA id os9sm4923248lbb.17.2013.10.31.20.36.23 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 31 Oct 2013 20:36:24 -0700 (PDT) In-Reply-To: <8DEA52127F624E32800195DEA2A5F375@gmail.com> (Bozhidar Batsov's message of "Thu, 31 Oct 2013 15:23:59 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:164774 Archived-At: Installed with small modification, thanks. Bozhidar Batsov writes: > Just a minor improvement to ruby-mode=E2=80=99s defcustoms.=20 > > --=20 > Cheers, > Bozhidar > > > > From 37d763ea2a241bfbe8a53a62b8f19d5f1edf0f13 Mon Sep 17 00:00:00 2001 > From: Bozhidar Batsov > Date: Thu, 31 Oct 2013 15:16:58 +0200 > Subject: [PATCH] * lisp/progmodes/ruby-mode.el: Mark defcustoms as safe w= ith > :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'." >=20=20 > (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) >=20=20 > (defcustom ruby-indent-level 2 > "Indentation of Ruby statements." > - :type 'integer :group 'ruby) > + :type 'integer :group 'ruby :safe 'integerp) >=20=20 > (defcustom ruby-comment-column (default-value 'comment-column) > "Indentation column of comments." > - :type 'integer :group 'ruby) > + :type 'integer :group 'ruby :safe 'integerp) >=20=20 > (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) >=20=20 > (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) >=20=20 > -;; 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 >=20=20 > (require 'smie)