* [PATCH] * lisp/progmodes/ruby-mode.el: Mark defcustoms as safe with :safe keyword argument.
@ 2013-10-31 13:23 Bozhidar Batsov
2013-11-01 3:36 ` Dmitry Gutov
0 siblings, 1 reply; 2+ messages in thread
From: Bozhidar Batsov @ 2013-10-31 13:23 UTC (permalink / raw
To: emacs-devel
[-- 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] * lisp/progmodes/ruby-mode.el: Mark defcustoms as safe with :safe keyword argument.
2013-10-31 13:23 [PATCH] * lisp/progmodes/ruby-mode.el: Mark defcustoms as safe with :safe keyword argument Bozhidar Batsov
@ 2013-11-01 3:36 ` Dmitry Gutov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Gutov @ 2013-11-01 3:36 UTC (permalink / raw
To: Bozhidar Batsov; +Cc: emacs-devel
Installed with small modification, thanks.
Bozhidar Batsov <bozhidar.batsov@gmail.com> writes:
> Just a minor improvement to ruby-mode’s defcustoms.
>
> --
> Cheers,
> Bozhidar
>
>
>
> 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)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-01 3:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-31 13:23 [PATCH] * lisp/progmodes/ruby-mode.el: Mark defcustoms as safe with :safe keyword argument Bozhidar Batsov
2013-11-01 3:36 ` Dmitry Gutov
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.