branch: externals/ebdb commit 7f51a4e1ae8be101ef09048908a1d6d9e8baa50d Author: Eric Abrahamsen <e...@ericabrahamsen.net> Commit: Eric Abrahamsen <e...@ericabrahamsen.net>
Make explicit "full" formatter * ebdb-com.el (ebdb-full-formatter): New defconst holding the formatter used for displaying all a record's fields, even internal fields. (ebdb-display-records-completely): Use this new formatter. The old "clone" trick added a new spurious formatter to the formatter tracker every time it was called. --- ebdb-com.el | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/ebdb-com.el b/ebdb-com.el index c7afbff..7688b01 100644 --- a/ebdb-com.el +++ b/ebdb-com.el @@ -428,6 +428,14 @@ position-marker mark)." :type 'ebdb-formatter-ebdb-oneline :group 'ebdb-record-display) +(defconst ebdb-full-formatter + (make-instance 'ebdb-formatter-ebdb-multiline + :include nil :exclude nil + :combine nil :collapse nil + :object-name "full formatter") + "Formatter used for displaying all values of a record. +This formatter should not be changed.") + (defun ebdb-available-ebdb-formatters () "A list of formatters available in the *EBDB* buffer. This list is also used for toggling layouts." @@ -1852,14 +1860,9 @@ With any other non-nil ARG, RECORDS are displayed expanded." ;;;###autoload (defun ebdb-display-records-completely (records) - "Display RECORDS using layout `full-multi-line' (i.e., display all fields)." + "Display all fields of RECORDS." (interactive (list (ebdb-do-records))) - (let* ((record (ebdb-current-record t)) - (current-fmt (nth 1 record)) - ;; TODO: Something weird happens with duplication of - ;; formatter objects when we do this. - (fmt (clone current-fmt :include nil :exclude nil))) - (ebdb-redisplay-records records fmt))) + (ebdb-redisplay-records records ebdb-full-formatter)) ;;;###autoload (defun ebdb-display-records-with-fmt (records fmt)