[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/5] tildify.el: Improve defcustom's types.
From: |
Michal Nazarewicz |
Subject: |
[PATCH 1/5] tildify.el: Improve defcustom's types. |
Date: |
Sun, 2 Mar 2014 22:55:31 +0100 |
From: Michal Nazarewicz <address@hidden>
Add more tags explaining what each value means and replace
“sexp” used in `tildify-ignored-environments-alist' with
a full type declaration.
---
lisp/textmodes/tildify.el | 34 ++++++++++++++++++++++++++++++----
1 file changed, 30 insertions(+), 4 deletions(-)
diff --git a/lisp/textmodes/tildify.el b/lisp/textmodes/tildify.el
index 9732e7f..f534bdb 100644
--- a/lisp/textmodes/tildify.el
+++ b/lisp/textmodes/tildify.el
@@ -3,7 +3,7 @@
;; Copyright (C) 1997-2014 Free Software Foundation, Inc.
;; Author: Milan Zamazal <address@hidden>
-;; Version: 4.5
+;; Version: 4.5.1
;; Keywords: text, TeX, SGML, wp
;; This file is part of GNU Emacs.
@@ -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 ***
--
1.9.0.279.gdc9e3eb
- [PATCH 0/5] Auto tildify improvements, Michal Nazarewicz, 2014/03/02
- [PATCH 2/5] tildify.el: Change XML hard space to numeric reference., Michal Nazarewicz, 2014/03/02
- [PATCH 3/5] tildify.el: Optimise environments regexes, Michal Nazarewicz, 2014/03/02
- [PATCH 1/5] tildify.el: Improve defcustom's types.,
Michal Nazarewicz <=
- [PATCH 4/5] tildify.el: Rewrite `tildify-region' and co., add foreach function., Michal Nazarewicz, 2014/03/02
- [PATCH 5/5] tildify.el: Add `auto-tildify' and `auto-tildify-mode'., Michal Nazarewicz, 2014/03/02