diff options
author | Clément Pit--Claudel <clement.pitclaudel@live.com> | 2016-02-27 11:13:59 -0500 |
---|---|---|
committer | Clément Pit--Claudel <clement.pitclaudel@live.com> | 2016-02-27 11:16:54 -0500 |
commit | d5dbd0f57eb33d39b4843a9ef89ef8463c935c10 (patch) | |
tree | 515c9ba47f27d9a2ccceb095b3612450fee7780a /coq/coq-smie.el | |
parent | 2626ed51dc27abbdb44331542642c03e7f65ef3a (diff) |
Add a :safe predicate to indentation variables
This is useful if people want to set them project-locally.
Diffstat (limited to 'coq/coq-smie.el')
-rw-r--r-- | coq/coq-smie.el | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/coq/coq-smie.el b/coq/coq-smie.el index a609727a..20ff5b21 100644 --- a/coq/coq-smie.el +++ b/coq/coq-smie.el @@ -698,10 +698,14 @@ Lemma foo: forall n, :type 'boolean :group 'coq) +(defun coq-indent-safep (indent) + (>= indent 0)) + (defcustom coq-indent-proofstart 2 "Number of spaces used to indent after a proof start." :type 'integer - :group 'coq) + :group 'coq + :safe #'coq-indent-safep) (defcustom coq-indent-semicolon-tactical 2 "Number of spaces used to indent after the first tactical semi colon of a serie. @@ -718,12 +722,14 @@ Lemma foo: forall n, tac3; tac4." :type 'integer - :group 'coq) + :group 'coq + :safe #'coq-indent-safep) (defcustom coq-indent-modulestart 2 "Number of spaces used to indent after a module or section start." :type 'integer - :group 'coq) + :group 'coq + :safe #'coq-indent-safep) (defcustom coq-smie-after-bolp-indentation 2 "Number of spaces used to indent after a quantifier *not* on its own line. @@ -741,7 +747,8 @@ If it is set to 2 (default) it is as follows: x <= 0 -> x = 0. " :type 'integer - :group 'coq) + :group 'coq + :safe #'coq-indent-safep) (defcustom coq-match-indent 2 "Number of space used to indent cases of a match expression. @@ -754,7 +761,9 @@ match n with end Typical values are 2 or 4." - :type 'integer :group 'coq) + :type 'integer + :group 'coq + :safe #'coq-indent-safep) ;; - TODO: remove tokens "{ subproof" and "} subproof" but they are ;; needed by the lexers at a lot of places. |