[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#17699: [PATCH 3/7] tildify.el: Improve defcustom's types
From: |
Michal Nazarewicz |
Subject: |
bug#17699: [PATCH 3/7] tildify.el: Improve defcustom's types |
Date: |
Thu, 5 Jun 2014 13:27:32 +0200 |
* lisp/textmodes/tildify.el (tildify-pattern-alist)
(tildify-string-alist, tildify-ignored-environments-alist):
Add more tags explaining what each value means and replace
“sexp” used in `tildify-ignored-environments-alist' with
a full type declaration.
---
lisp/ChangeLog | 6 ++++++
lisp/textmodes/tildify.el | 32 +++++++++++++++++++++++++++++---
2 files changed, 35 insertions(+), 3 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 523b2a9..487e21c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,11 @@
2014-06-05 Michal Nazarewicz <mina86@mina86.com>
+ * textmodes/tildify.el (tildify-pattern-alist)
+ (tildify-string-alist, tildify-ignored-environments-alist):
+ Improve defcustom's types by adding more tags explaining what each
+ value means and replace “sexp” used in
+ `tildify-ignored-environments-alist' with a full type declaration.
+
* textmodes/tildify.el (tildify-find-env): Fix matched group
indexes in end-regex building
diff --git a/lisp/textmodes/tildify.el b/lisp/textmodes/tildify.el
index 7aa338e..d61998a 100644
--- a/lisp/textmodes/tildify.el
+++ b/lisp/textmodes/tildify.el
@@ -77,7 +77,13 @@ by the hard space character.
The form (MAJOR-MODE . SYMBOL) defines alias item for MAJOR-MODE. For this
mode, the item for the mode SYMBOL is looked up in the alist instead."
:group 'tildify
- :type '(repeat (choice (list symbol regexp integer) (cons symbol symbol))))
+ :type '(repeat (cons :tag "Entry for major mode"
+ (choice (const :tag "Default" t)
+ (symbol :tag "Major mode"))
+ (choice (list :tag "Regexp"
+ regexp
+ (integer :tag "Group "))
+ (symbol :tag "Like other")))))
(defcustom tildify-string-alist
'((latex-mode . "~")
@@ -104,7 +110,12 @@ for SGML.
The form (MAJOR-MODE . SYMBOL) defines alias item for MAJOR-MODE. For this
mode, the item for the mode SYMBOL is looked up in the alist instead."
:group 'tildify
- :type '(repeat (cons symbol (choice string symbol))))
+ :type '(repeat (cons :tag "Entry for major mode"
+ (choice (const :tag "Default" t)
+ (symbol :tag "Major mode"))
+ (choice (const :tag "No-break space (U+00A0)" "\u00A0")
+ (string :tag "String ")
+ (symbol :tag "Like other")))))
(defcustom tildify-ignored-environments-alist
'((latex-mode
@@ -160,7 +171,22 @@ END-REGEX defines end of the corresponding text part and
can be either:
subexpressions of BEG-REGEX (this is used to solve cases like
\\\\verb<character> in TeX)."
:group 'tildify
- :type '(repeat (cons symbol (choice symbol (repeat sexp)))))
+ :type '(repeat
+ (cons :tag "Entry for major mode"
+ (choice (const :tag "Default" t)
+ (symbol :tag "Major mode"))
+ (choice
+ (const :tag "None")
+ (repeat
+ :tag "Environments"
+ (cons :tag "Regexp pair"
+ (regexp :tag "Open ")
+ (choice :tag "Close"
+ (regexp :tag "Regexp")
+ (list :tag "Regexp and groups (concatenated)"
+ (choice (regexp :tag "Regexp")
+ (integer :tag "Group "))))))
+ (symbol :tag "Like other")))))
;;; *** Internal variables ***
--
2.0.0.526.g5318336
- bug#17699: Various tildify.el improvements, Michal Nazarewicz, 2014/06/05
- bug#17699: [PATCH 1/7] tildify.el: Fix end-regex building in `tildify-find-env', Michal Nazarewicz, 2014/06/05
- bug#17699: [PATCH 6/7] tildify.el: Rewrite `tildify-region' and co., add foreach function., Michal Nazarewicz, 2014/06/05
- bug#17699: [PATCH 2/7] tildify.el: Fix matched group indexes in end-regex building, Michal Nazarewicz, 2014/06/05
- bug#17699: [PATCH 7/7] * tests/automated/tildify-tests.el (tildify-test--test): Optimise the test slightly by reusing the same temporary buffer across multiple test cases., Michal Nazarewicz, 2014/06/05
- bug#17699: [PATCH 4/7] tildify.el: Better support for XML, Michal Nazarewicz, 2014/06/05
- bug#17699: [PATCH 5/7] tildify.el: Optimise environments regexes, Michal Nazarewicz, 2014/06/05
- bug#17699: [PATCH 3/7] tildify.el: Improve defcustom's types,
Michal Nazarewicz <=
- bug#17699: Various tildify.el improvements, Stefan Monnier, 2014/06/05