summaryrefslogtreecommitdiff
path: root/lisp/textmodes/tildify.el
diff options
context:
space:
mode:
authorMichal Nazarewicz <mina86@mina86.com>2014-06-05 16:40:26 +0200
committerMichal Nazarewicz <mina86@mina86.com>2014-06-05 16:40:26 +0200
commite01e361f93959c5a5873ac119d9e55380dbdbbaa (patch)
tree700b49a0d03723a6e5e4df5a0f8156fd8fbd40fd /lisp/textmodes/tildify.el
parent9342feecdd92b769b1f45a6feea8ad34985c5049 (diff)
downloademacs-e01e361f93959c5a5873ac119d9e55380dbdbbaa.tar.gz
tildify.el: Improve defcustom's types
* 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.
Diffstat (limited to 'lisp/textmodes/tildify.el')
-rw-r--r--lisp/textmodes/tildify.el32
1 files changed, 29 insertions, 3 deletions
diff --git a/lisp/textmodes/tildify.el b/lisp/textmodes/tildify.el
index 7aa338ef207..d61998a56d1 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 ***