[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb e89d93e 1/2: Fix customization types of ebdb-defau
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb e89d93e 1/2: Fix customization types of ebdb-default-*-class options |
Date: |
Sat, 21 Nov 2020 19:49:45 -0500 (EST) |
branch: externals/ebdb
commit e89d93e20e1b7527e3ee4e4bac1bb6dadf02c871
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>
Fix customization types of ebdb-default-*-class options
* ebdb.el (ebdb-default-record-class, ebdb-default-name-class,
ebdb-default-mail-class, ebdb-default-phone-class,
ebdb-default-address-class ebdb-default-notes-class): 'class was not a
valid customization type; instead use restricted-sexp with a lambda.
---
ebdb.el | 36 ++++++++++++++++++++++++++++++------
1 file changed, 30 insertions(+), 6 deletions(-)
diff --git a/ebdb.el b/ebdb.el
index b3a221e..74052eb 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -171,7 +171,11 @@ might consider setting it to t."
(defcustom ebdb-default-record-class 'ebdb-record-person
"The default class to use for new records."
:group 'ebdb-eieio
- :type 'class)
+ :type '(restricted-sexp
+ :match-alternatives ((lambda (cls)
+ (and cls
+ (child-of-class-p
+ cls 'ebdb-record))))))
(defcustom ebdb-default-name-class 'ebdb-field-name-complex
"The default name class to use for person records.
@@ -179,27 +183,47 @@ might consider setting it to t."
Organization names are currently hard-coded to use
`ebdb-field-name-simple'."
:group 'ebdb-eieio
- :type 'class)
+ :type '(restricted-sexp
+ :match-alternatives ((lambda (cls)
+ (and cls
+ (child-of-class-p
+ cls 'ebdb-field-name))))))
(defcustom ebdb-default-mail-class 'ebdb-field-mail
"The default class to use for mail fields."
:group 'ebdb-eieio
- :type 'class)
+ :type '(restricted-sexp
+ :match-alternatives ((lambda (cls)
+ (and cls
+ (child-of-class-p
+ cls 'ebdb-field-mail))))))
(defcustom ebdb-default-phone-class 'ebdb-field-phone
"The default class to use for phone fields."
:group 'ebdb-eieio
- :type 'class)
+ :type '(restricted-sexp
+ :match-alternatives ((lambda (cls)
+ (and cls
+ (child-of-class-p
+ cls 'ebdb-field-phone))))))
(defcustom ebdb-default-address-class 'ebdb-field-address
"The default class to use for address fields."
:group 'ebdb-eieio
- :type 'class)
+ :type '(restricted-sexp
+ :match-alternatives ((lambda (cls)
+ (and cls
+ (child-of-class-p
+ cls 'ebdb-field-address))))))
(defcustom ebdb-default-notes-class 'ebdb-field-notes
"The default class to use for notes fields."
:group 'ebdb-eieio
- :type 'class)
+ :type '(restricted-sexp
+ :match-alternatives ((lambda (cls)
+ (and cls
+ (child-of-class-p
+ cls 'ebdb-field-notes))))))
(defcustom ebdb-try-speedups nil
"When non-nil, try to speed up loading by disabling checks.