branch: externals/ebdb commit 730fca27b3f0399b31973b4464b5a7a54d42b855 Author: Eric Abrahamsen <e...@ericabrahamsen.net> Commit: Eric Abrahamsen <e...@ericabrahamsen.net>
Make sure editing role fields on organization records always works * ebdb-com.el (ebdb-edit-field-customize): Had done this for the regular field editing routine, but neglected the "customize object" editing routine. --- ebdb-com.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ebdb-com.el b/ebdb-com.el index 02f837e..ba0fcbc 100644 --- a/ebdb-com.el +++ b/ebdb-com.el @@ -1886,6 +1886,11 @@ commands, called from an *EBDB* buffer, and the lower-level (ebdb-current-field))) (let ((new-field (clone field))) (eieio-customize-object new-field) + ;; If the user is editing a role field from an organization + ;; record, do a switcharoo. + (when (and (ebdb-record-organization-p record) + (ebdb-field-role-p field)) + (setq record (ebdb-gethash (slot-value field 'record-uuid) 'uuid))) ;; The following two variables are buffer-local, and we're hoping ;; this will make them local to the customization buffer: ie, an ;; arbitrary number of *Customize* buffers can be opened, and the